Split GetStatus JVM command.
[barry/progweb.git] / maintainer / make-deb-local.sh
blob605b985b6249a952d891134745f0534c0cf25b36
1 #!/bin/sh
3 if [ -z "$1" -o -z "$2" ] ; then
4 echo
5 echo "Usage: ./make-deb-local-root.sh tarball MAJOR MINOR target_name"
6 echo
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."
10 echo
11 echo "target_name is the directory under build/ that the .deb"
12 echo "files will be placed into."
13 echo
14 exit 1
17 TARPATH="$1"
18 TARNAME=`basename "$TARPATH"`
19 MAJOR="$2"
20 MINOR="$3"
21 TARGET="$4"
23 set -e
25 # Build package in /usr/src so that the dbg packages refer to the source
26 # code in a user-friendly place.
28 # start clean
29 rm -rf "/usr/src/barry-$MAJOR.$MINOR"
31 tar -C /usr/src -xjvf "$TARPATH"
32 (cd "/usr/src/barry-$MAJOR.$MINOR" && fakeroot -- debian/rules binary)
33 mkdir -p "build/$TARGET"
34 mv /usr/src/*barry*deb "build/$TARGET"
36 # end clean
37 rm -rf "/usr/src/barry-$MAJOR.$MINOR"