Rewrite d/build-package to work independent of working directory and source directory name.

This commit is contained in:
Petter Reinholdtsen 2017-08-07 21:31:23 +02:00
parent 42b1f272b0
commit cfe3ebd486
1 changed files with 6 additions and 3 deletions

View File

@ -2,10 +2,13 @@
BASEVERSION=$(dpkg-parsechangelog --show-field Version | cut -d- -f1)
DEBVERSION=$(dpkg-parsechangelog --show-field Version)
cd ../..
debdir=$(cd $(dirname $0); pwd)
pkgdir=$(cd $debdir/..; pwd)
pkgbasedir=$(cd $debdir/..; basename $(pwd))
cd $pkgdir/..
tar -acf gr-gsm_${BASEVERSION}.orig.tar.gz gr-gsm
cd gr-gsm
tar -acf gr-gsm_${BASEVERSION}.orig.tar.gz $pkgbasedir
cd $pkgdir
debuild -S -sa
#pdebuild
cd ..