debian: fix dpkg tool invocations to work on Ubuntu 12.04

dpkg-parsechangelog and dpkg-source were both using flags
not yet available in the versions available on 12.04.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
This commit is contained in:
Silas McCroskey 2017-02-14 18:52:40 +07:00 committed by Martin Winter
parent a8247b210f
commit 79c81c2651
3 changed files with 23 additions and 3 deletions

View File

@ -76,7 +76,7 @@ $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc:
-c$$(CONTROL_$(1)) \
--format='3.0 (custom)' \
--target-format='$$(SOURCEFORMAT_$(1))' \
--build . $$^
-b . $$^
ifeq ($$(SOURCEFORMAT_$(1)),3.0 (quilt))
# this target depends on the orig.tar.gz file, for which there is no target in

5
debian/rules vendored
View File

@ -106,13 +106,14 @@ KNOWN_BACKPORTS = ubuntu12.04 ubuntu14.04 ubuntu16.04
ORIG_VERSION := $(shell dh_testdir && grep -E < configure.ac '^AC_INIT\(.*\)' \
| cut -d, -f2 | xargs echo)
DEBIAN_VERSION := $(shell dh_testdir && \
dpkg-parsechangelog -c1 -Sversion < debian/changelog)
dpkg-parsechangelog -c1 < debian/changelog | \
sed -rn 's/^Version: ?//p')
-include debian/backports/rules
ifneq ($(TARBALLDIR),)
# better error message on missing .orig.tar.gz
$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz:
@ echo "\`$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz'" not
@ echo "\`$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz'" not \
found and not generated by debian/rules. Provided you have the \
necessary packages installed, you can generate it yourself via \
"\"./bootstrap.sh && ./configure && make dist\"" \

19
debian/rules.orig vendored
View File

@ -96,3 +96,22 @@ override_dh_systemd_start:
override_dh_systemd_enable:
dh_systemd_enable frr.service
# backports
SRCPKG = frr
KNOWN_BACKPORTS = ubuntu12.04 ubuntu14.04 ubuntu16.04
ORIG_VERSION := $(shell dh_testdir && grep -E < configure.ac '^AC_INIT\(.*\)' \
| cut -d, -f2 | xargs echo)
DEBIAN_VERSION := $(shell dh_testdir && \
dpkg-parsechangelog -c1 -Sversion < debian/changelog)
-include debian/backports/rules
ifneq ($(TARBALLDIR),)
# better error message on missing .orig.tar.gz
$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz:
@ echo "\`$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz'" not
found and not generated by debian/rules. Provided you have the \
necessary packages installed, you can generate it yourself via \
"\"./bootstrap.sh && ./configure && make dist\"" \
and renaming the resulting file.
exit 1
endif # def TARBALLDIR