]> Pileus Git - aweather/blob - update_build.sh
Added ubuntu build scripts
[aweather] / update_build.sh
1 #Grab command line arguments
2 OLDVERSION=$1
3 VERSION=$2
4
5 #Local
6 SRCSFOLDER=~/pkgbuild
7
8 #Remote
9 APTREPO=/aptrepo
10 USER=compuwizard123
11 HOST=compuwizard123.dyndns.org
12
13 #build using 2 threads
14 BUILD="debuild -j2 -uc -us"
15
16 #look for new libgis version
17 APP=libgis
18 cd $SRCSFOLDER/$APP/
19 uscan --download-version $VERSION
20 cd $SRCSFOLDER/$APP/${APP}-$OLDVERSION/
21 uupdate -v $VERSION ../${APP}-$VERSION.tar.gz
22 cd $SRCSFOLDER/$APP/${APP}-$VERSION/
23 cp $SRCSFOLDER/$APP/${APP}-$OLDVERSION/debian/watch debian/
24
25 #build libgis and libgis-dev
26 $BUILD
27 dchroot -d "linux32 $BUILD -ai386"
28
29 #copy libgis and libgis-dev to remote repo
30 scp ../${APP}_$VERSION-0ubuntu1.diff.gz ../${APP}_$VERSION-0ubuntu1.dsc ../${APP}_$VERSION.orig.tar.gz $USER@$HOST:$APTREPO/source/
31 scp ../${APP}_$VERSION-0ubuntu1_amd64.deb ../${APP}-dev_$VERSION-0ubuntu1_amd64.deb ../${APP}_$VERSION-0ubuntu1_i386.deb ../${APP}-dev_$VERSION-0ubuntu1_i386.deb $USER@$HOST:$APTREPO/binary/
32
33 #install updated libgis and libgis-dev before building aweather
34 sudo dpkg --install ../${APP}_$VERSION-0ubuntu1_amd64.deb
35 sudo dpkg --install ../$APP-dev_$VERSION-0ubuntu1_amd64.deb
36 dchroot -d "linux32 sudo dpkg --install ../${APP}_$VERSION-0ubuntu1_i386.deb"
37 dchroot -d "linux32 sudo dpkg --install ../$APP-dev_$VERSION-0ubuntu1_i386.deb"
38
39 #look for new aweather version
40 APP=aweather
41 cd $SRCSFOLDER/$APP/
42 uscan --download-version $VERSION
43 cd $SRCSFOLDER/$APP/${APP}-$OLDVERSION/
44 uupdate -v $VERSION ../$APP-$VERSION.tar.gz
45 cd $SRCSFOLDER/$APP/$APP-$VERSION/
46 cp $SRCSFOLDER/$APP/${APP}-$OLDVERSION/debian/watch debian/
47
48 #build aweather
49 $BUILD
50 dchroot -d "linux32 $BUILD -ai386"
51
52 #copy aweather to remote repo
53 scp ../${APP}_$VERSION-0ubuntu1.diff.gz ../${APP}_$VERSION-0ubuntu1.dsc ../${APP}_$VERSION.orig.tar.gz $USER@$HOST:$APTREPO/source/
54 scp ../${APP}_$VERSION-0ubuntu1_amd64.deb ../${APP}_$VERSION-0ubuntu1_i386.deb $USER@$HOST:$APTREPO/binary/
55
56 #update remote repo
57 ssh $USER@$HOST '~/pkgbuild/aptrepo.sh'