aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2017-08-07 21:31:23 +0200
committerPetter Reinholdtsen <pere@hungry.com>2017-08-07 21:31:23 +0200
commitcfe3ebd486c3eb76f74a58cee34d6d9c069f1f98 (patch)
tree8599cdbfcb6302418c49fe40f4324424435344d0
parent42b1f272b0bf4ee67ee1e84aa6c7681c3972e507 (diff)
Rewrite d/build-package to work independent of working directory and source directory name.
-rwxr-xr-xdebian/build-package9
1 files changed, 6 insertions, 3 deletions
diff --git a/debian/build-package b/debian/build-package
index 7769e28..2d928de 100755
--- a/debian/build-package
+++ b/debian/build-package
@@ -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 ..