summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 029e492..7b03f9b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,16 @@ DPKG_ARCH := dpkg-architecture
export DEB_HOST_MULTIARCH := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MULTIARCH := $(shell $(DPKG_ARCH) $(ha) -qDEB_BUILD_MULTIARCH)
+# Common useful variables
+DEB_SOURCE_PACKAGE := $(strip $(shell egrep '^Source: ' $(SRCTOP)/debian/control | \
+ cut -f 2 -d ':'))
+DEB_VERSION := $(strip $(shell LC_ALL=C dpkg-parsechangelog | \
+ egrep '^Version:' | cut -f 2 -d ' '))
+DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
+DEB_REVISION := $(strip $(shell echo $(DEB_NOEPOCH_VERSION) | \
+ perl -ple 's/.+\-(.+)$$/$$1/msxg'))
+DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
+
confflags = ac_cv_lib_util_getloadavg=no
ifneq ($(DEB_BUILD_MULTIARCH),$(DEB_HOST_MULTIARCH))
confflags += ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes
@@ -73,6 +83,14 @@ endif
bash -n debian/flex.postinst
bash -n debian/flex.prerm
+.PHONY: get-orig-source
+## http://wiki.debian.org/onlyjob/get-orig-source
+get-orig-source: $(info I: $(package)_$(DEB_UPSTREAM_VERSION))
+ @echo "Downloading $(package) $(DEB_UPSTREAM_VERSION)"
+ uscan --noconf --verbose --rename --destdir=$(CURDIR) \
+ --check-dirname-level=0 --force-download \
+ --download-version $(DEB_UPSTREAM_VERSION) $(SRCTOP)
+
#Local variables:
#mode: makefile
#End: