1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
MAKEFILE = $(firstword $(MAKEFILE_LIST))
DEBIAN_DIR = $(dir $(MAKEFILE))
SOURCE_DIR = $(DEBIAN_DIR)/..
PACKAGE = $(shell sed -n 's/^Source: //p' $(DEBIAN_DIR)/control)
CURRENT_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | \
sed -n 's/-.*$$//; s/^Version: //p')
USCAN = uscan \
--upstream-version $(CURRENT_VERSION) \
--package $(PACKAGE) \
--watchfile $(DEBIAN_DIR)/watch
VERSION ?= $(shell $(USCAN) --dehs --no-download | \
sed -n 's/.*<upstream-version>\(.*\)<\/upstream-version>.*/\1/p')
get-orig-source:
$(USCAN) \
--force-download \
--download \
--destdir . \
--rename
if [ -d "$(PACKAGE)-$(VERSION)" ]; then \
echo "$(PACKAGE)-$(VERSION) is in the way, bailing out!"; \
exit 1; \
fi
tar -xzf $(PACKAGE)_$(VERSION).orig.tar.gz
mv \
$(PACKAGE)-$(VERSION) \
$(PACKAGE)-$(VERSION)+dfsg
GZIP="-9fn --rsyncable" tar \
--exclude=src/haserl_lualib.inc \
-czf $(PACKAGE)_$(VERSION)+dfsg.orig.tar.gz \
$(PACKAGE)-$(VERSION)+dfsg
rm -rf \
$(PACKAGE)_$(VERSION).orig.tar.gz \
$(PACKAGE)_$(VERSION)+dfsg
override_dh_auto_configure:
dh_auto_configure -- \
--enable-luashell \
--enable-luacshell \
--enable-bashshell \
--disable-bash-extensions \
--enable-subshell=/bin/sh \
--with-lua=lua5.2
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
clean:
dh $@
debconf-updatepo
%:
dh $@
|