File: create_package

package info (click to toggle)
mysql-workbench 6.2.3%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 102,612 kB
  • ctags: 84,593
  • sloc: ansic: 804,682; cpp: 438,759; yacc: 59,129; python: 54,293; xml: 48,851; sql: 5,512; objc: 1,414; makefile: 505; sh: 455; java: 237; ruby: 6; perl: 5; php: 1
file content (50 lines) | stat: -rwxr-xr-x 1,105 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash

if ! [ -f options ]; then 
  echo "Must run configure 1st"
  exit 1
fi

. options


# create the package
echo "Creating package."
eval `pkgsend open $pkgname`

pushd $basedir

# create/add directories
echo "Creating directories..."
for file in `find $contentdir -d`; do
  pkgsend add dir mode=0555 owner=root group=bin path="/$file"
done

# create/add all files
echo "Adding files..."
for file in `find $contentdir -type f`; do
  pkgsend add file $file
done

# set attribs for binary files
echo "Setting attributes for executable files..."
for file in `find $contentdir -perm /u=x -type f`; do
  pkgsend add file "$file" mode=0755 owner=root group=bin path="$file"
done

# set attribs for data files
echo "Setting attributes for data files..."
for file in `find $contentdir -perm /u=x -type f`; do
  pkgsend add file "$file" mode=0644 owner=root group=bin path="$file"
done

# add dependencies


# set pkg stuff
echo "Setting package info..."
pkgsend add set name=description value="$description"
pkgsend add set name=maintainer value="$maintainer"

echo "Closing transaction."
pkgsend close