summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-10-02 07:50:18 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2018-10-02 07:51:12 +0200
commita2873f389c0460873685b50dbc516b5e0a365e31 (patch)
treebc7be650ac706545891bf08ff18d3de8c35fac60
parent0fa8447c1b0e33c12e72e5b12e7e000b9573baef (diff)
Replace version.patch with creating .tarball-version in rules
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/version.patch13
-rwxr-xr-xdebian/rules14
3 files changed, 8 insertions, 20 deletions
diff --git a/debian/patches/series b/debian/patches/series
index 9408692..7f95a66 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
spelling.patch
reproducible-build.patch
-version.patch
diff --git a/debian/patches/version.patch b/debian/patches/version.patch
deleted file mode 100644
index b67c153..0000000
--- a/debian/patches/version.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Description: as there is no git during build, set the version
-Author: Thorsten Alteholz <debian@alteholz.de>
-Index: osmo-iuh-0.3.0/configure.ac
-===================================================================
---- osmo-iuh-0.3.0.orig/configure.ac 2018-05-03 18:29:14.000000000 +0200
-+++ osmo-iuh-0.3.0/configure.ac 2018-07-19 12:55:37.318645608 +0200
-@@ -1,5 +1,5 @@
- AC_INIT([osmo-iuh],
-- m4_esyscmd([./git-version-gen .tarball-version]),
-+ 0.3.0,
- [openbsc@lists.osmocom.org])
-
- dnl *This* is the root dir, even if an install-sh exists in ../ or ../../
diff --git a/debian/rules b/debian/rules
index 6c9f3f1..94ef6c2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,16 +1,18 @@
#!/usr/bin/make -f
-#DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
-#DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
-#VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
+include /usr/share/dpkg/pkg-info.mk
# main packaging script based on dh7 syntax
%:
dh $@ --with autoreconf
-#override_dh_autoreconf:
-# echo $(VERSION) > .tarball-version
-# dh_autoreconf
+override_dh_clean:
+ dh_clean
+ $(RM) .tarball-version
+
+override_dh_autoreconf:
+ echo $(DEB_VERSION_UPSTREAM) > .tarball-version
+ dh_autoreconf
# Print test results in case of a failure
override_dh_auto_test: