aboutsummaryrefslogtreecommitdiff
path: root/source/debian
diff options
context:
space:
mode:
Diffstat (limited to 'source/debian')
-rwxr-xr-xsource/debian/rules17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/debian/rules b/source/debian/rules
index 88d6c5a..a0c3a65 100755
--- a/source/debian/rules
+++ b/source/debian/rules
@@ -16,6 +16,23 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
+include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --with python2
+
+# Distinct binary package versions for a single source package built
+# on multiple releases, to keep reprepro happy. See:
+#
+# https://unix.stackexchange.com/questions/31584/two-differently-versioned-binary-debian-packages-from-one-source#32377
+# https://salsa.debian.org/android-tools-team/android-sdk-meta/blob/master/debian/rules
+#
+# This relies on pbuilder-dist setting the DIST environment variable.
+# Without that, we fall back to the default behavior.
+
+ifneq (,${DIST})
+
+override_dh_gencontrol:
+ dh_gencontrol -- -v${DEB_VERSION}~${DIST}
+
+endif