Added opensync-plugin to maintainer test scripts, and added
[barry.git] / maintainer / test-build.sh
blobd7ba7accc7e8aee69a2f15a72c4df90905e08afa
1 #!/bin/sh
3 CHROOT="/var/chroot"
4 BUILDUSER="cdfrey"
6 if [ -z "$1" -o -z "$2" ] ; then
7 echo
8 echo "Usage: ./test-build.sh tarball chroot_target"
9 echo
10 echo "Copies the tarball to the chroot target's tmp dir, then"
11 echo "enters the chroot system as the build user and builds everything."
12 echo
13 echo "Available chroot targets:"
14 find $CHROOT -type d -maxdepth 1 -print | sed "s/^.*\// /"
15 echo
16 exit 1
19 TARPATH="$1"
20 TARNAME=`basename "$TARPATH"`
21 TARGET="$2"
23 set -e
25 cp "$TARPATH" "$CHROOT/$TARGET/tmp"
26 chroot "$CHROOT/$TARGET" su - "$BUILDUSER" -c /bin/sh -lc "rm -rf testbuild && mkdir testbuild && cd testbuild && tar xjvf \"/tmp/$TARNAME\" && cd * && ./configure --prefix=/home/$BUILDUSER/testbuild/rootdir && make install && cd gui && export PKG_CONFIG_PATH=/home/$BUILDUSER/testbuild/rootdir/lib/pkgconfig:\$PKG_CONFIG_PATH && ./configure --prefix=/home/$BUILDUSER/testbuild/rootdir && make install && cd ../opensync-plugin && ./configure --prefix=/home/$BUILDUSER/testbuild/rootdir && make && cd ../../rootdir && find && echo \"Press enter to continue...\" && read && cd ../.. && rm -rf testbuild"