]> www.infradead.org Git - users/dwmw2/openconnect-deb.git/commitdiff
Import Makefile, fix changelog generation to vary DISTREV
authorDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 3 Apr 2020 16:26:08 +0000 (17:26 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 3 Apr 2020 16:26:20 +0000 (17:26 +0100)
Makefile [new file with mode: 0644]
debian/changelog.in

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..c60d31f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+
+DISTREV := 1
+MODULEDIR := .git/modules/openconnect
+CHANGELOG_DEPS = $(wildcard $(MODULEDIR)/index $(MODULEDIR)/packed-refs $(MODULEDIR)/refs/tags $(MODULEDIR)/HEAD)
+OCVERSION := $(shell cd openconnect && git describe --tags | sed 's/-g[0-9a-f]\*//')
+PKGVERSION := $(shell echo $(OCVERSION) | sed  -e 's/$$/-0/' -e 's/v\([^-]\+-[^-]\+\)\(-g[0-9a-f-]\+\|\)/\1/')
+OCDATE += $(shell cd openconnect && git show -s --pretty=%aD)
+
+ppa: xenial bionic
+
+debian/libopenconnect5.symbols: gensyms.sh openconnect/openconnect.h openconnect/libopenconnect.map.in
+       ./gensyms.sh > $@ || rm $@
+
+cleandir:
+       cd openconnect; \
+       git reset --hard HEAD; \
+       git clean -fdx; \
+       NOCONFIGURE=1 ./autogen.sh;
+       cp -av debian openconnect
+
+xenial bionic: cleandir
+       sed -e "s/PKGVER/$(PKGVERSION)/" -e "s/GITVER/$(OCVERSION)/" \
+           -e "s/COMMITDATE/$(OCDATE)/" -e "s/DISTRO/$@/g" \
+           -e "s/DISTREV/$(DISTREV)/" debian/changelog.in > debian/changelog
+       cd openconnect && DEBUILD_TGZ_CHECK=no debuild -S
+       #dput openconnect openconnect_$(PKGVERSION)-$@$(DISTREV)_source.changes
+
index 574155711335bed1b529764b0ffb4f1de269b705..a62e083cc656d5e528e204244b919fa2bdffc952 100644 (file)
@@ -1,4 +1,4 @@
-openconnect (PKGVER-DISTRO1) DISTRO; urgency=medium
+openconnect (PKGVER-DISTRODISTREV) DISTRO; urgency=medium
 
   [ David Woodhouse ]
   * Snapshot build of upstream GITVER