From 05b8280a3ac21beb1ccb021120ccd38db06b1b19 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 3 Apr 2020 17:26:08 +0100 Subject: [PATCH] Import Makefile, fix changelog generation to vary DISTREV --- Makefile | 27 +++++++++++++++++++++++++++ debian/changelog.in | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 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 + diff --git a/debian/changelog.in b/debian/changelog.in index 5741557..a62e083 100644 --- a/debian/changelog.in +++ b/debian/changelog.in @@ -1,4 +1,4 @@ -openconnect (PKGVER-DISTRO1) DISTRO; urgency=medium +openconnect (PKGVER-DISTRODISTREV) DISTRO; urgency=medium [ David Woodhouse ] * Snapshot build of upstream GITVER -- 2.49.0