3 if [ -z "$1" -o -z "$2" ] ; then
5 echo "Usage: ./make-deb-local-root.sh tarball MAJOR MINOR target_name"
7 echo "Extracts tarball in temporary directory and builds Debian"
8 echo "packages based on the internal debian scripts. Assumes"
9 echo "that it is running on a development Debian system."
11 echo "target_name is the directory under build/ that the .deb"
12 echo "files will be placed into."
18 TARNAME
=`basename "$TARPATH"`
25 # Build package in /usr/src so that the dbg packages refer to the source
26 # code in a user-friendly place.
29 rm -rf "/usr/src/barry-$MAJOR.$MINOR"
30 rm -f /usr
/src
/*barry
*deb
32 # extract from tarball
33 tar -C /usr
/src
-xjvf "$TARPATH"
35 # build plugin based on available opensync
36 # first check for 0.22 -dev, which has 0 in the name
37 if dpkg
-l libopensync0-dev
; then
38 PLUGIN_TARGET
=os22-binary
39 elif dpkg
-l libopensync1-dev
; then
40 PLUGIN_TARGET
=os4x-binary
44 (cd "/usr/src/barry-$MAJOR.$MINOR" && fakeroot
-- debian
/rules binary
$PLUGIN_TARGET)
45 mkdir
-p "build/$TARGET"
46 mv /usr
/src
/*barry
*deb
"build/$TARGET"
47 if [ -n "$PLUGIN_TARGET" ] ; then
48 mv /usr
/src
/barry-
$MAJOR.
$MINOR/*.deb
"build/$TARGET"
52 rm -rf "/usr/src/barry-$MAJOR.$MINOR"
53 rm -f /usr
/src
/*barry
*deb