summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2019-01-31 22:04:19 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2019-01-31 22:04:19 +0100
commitd85e96803b8a6e2ee15ae75df7ee51c89942ea71 (patch)
treec88e888d83d871ced6e7ed4761f0bd1cd741ec57
parent74e6ceaacdd7e368d1b75914dc4cb6dd586c3f81 (diff)
[pkg] increment debian changelog from git version
-rwxr-xr-xMakefile11
-rwxr-xr-xdebian/rules2
2 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index de677c5..09eaf84 100755
--- a/Makefile
+++ b/Makefile
@@ -107,16 +107,19 @@ build_snap:
mkdir -p dist
mv $(APPNAME)* dist/
-DEB_VER = $(shell dpkg-parsechangelog -SVersion | cut -d '-' -f 1)
build_deb: tgz
echo "[+] building deb..."
+ @if [ $(BUILD_RELEASE) = no ]; then\
+ echo "[!] BUILD_RELEASE=no, incrementing changelog";\
+ dch -v $(VERSION) -M "debian package generated from the git repository";\
+ fi
mkdir -p build
- mkdir -p dist
- cp dist/$(APPNAME)-$(VERSION).tgz build/$(APPNAME)_$(DEB_VER).orig.tar.gz
- cd build && tar xzf $(APPNAME)_$(DEB_VER).orig.tar.gz
+ cp dist/$(APPNAME)-$(VERSION).tgz build/$(APPNAME)_$(shell dpkg-parsechangelog -SVersion | cut -d '-' -f 1-2).orig.tar.gz
+ cd build && tar xzf $(APPNAME)_$(shell dpkg-parsechangelog -SVersion | cut -d '-' -f 1-2).orig.tar.gz
cp -r debian/ build/$(APPNAME)-$(VERSION)/
cd build/$(APPNAME)-$(VERSION) && debuild -us -uc
cp build/$(APPNAME)_$(shell dpkg-parsechangelog -SVersion)_*.deb dist/
+ git checkout -- debian/changelog
# -----------------------------------------------------------------------------
# Utils
diff --git a/debian/rules b/debian/rules
index 7bfad39..7db94da 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@ override_dh_auto_test:
override_dh_auto_build:
rm -rf src/0xacab.org/leap/bitmask-vpn/tools/transifex
- rm -rf obj-x86_64-linux-gnu/src/0xacab.org/leap/bitmask-vpn/tools/transifex
+ rm -rf obj-$(DEB_BUILD_GNU_TYPE)/src/0xacab.org/leap/bitmask-vpn/tools/transifex
rm -rf tools
dh_auto_build