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
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow, +fortify
upstream_version ?= $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)(\+dfsg\d+)?.*$$/\1/p')
dfsg_version = $(upstream_version)~ds0
pkg = $(shell dpkg-parsechangelog | sed -ne 's/^Source: //p')
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
CONFIGURE_FLAGS = --with-alsa --with-jack
CFLAGS += -g
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
endif
export CFLAGS
%:
dh $@ --parallel --with autoreconf,autotools-dev
override_dh_clean:
dh_clean -Xtests/midiprobe.cpp~
override_dh_auto_clean:
dh_auto_clean
rm -rf doc/html doc/images
rm -rf tests/Debug/ tests/Release/
override_dh_auto_configure:
dh_auto_configure -- $(CONFIGURE_FLAGS)
override_dh_auto_test:
mkdir -p tests/Release
mkdir -p tests/Debug
dh_auto_test
override_dh_installchangelogs:
dh_installchangelogs doc/release.txt
get-orig-source:
uscan --noconf --force-download --rename --download-current-version --destdir=.
tar -xf $(pkg)_$(upstream_version).orig.tar.gz
mv $(pkg)-$(upstream_version) $(pkg)-$(dfsg_version)
rm -fR $(pkg)-$(dfsg_version)/configure/
rm -fR $(pkg)-$(dfsg_version)/._Makefile.in
rm -fR $(pkg)-$(dfsg_version)/doc/html/
rm -fR $(pkg)-$(dfsg_version)/doc/images/
rm -fR $(pkg)-$(dfsg_version)/msw/
rm -fR $(pkg)-$(dfsg_version)/tests/*.dsp
rm -fR $(pkg)-$(dfsg_version)/tests/Debug/
rm -fR $(pkg)-$(dfsg_version)/tests/Release/
tar cf $(pkg)_$(dfsg_version).orig.tar $(pkg)-$(dfsg_version)
xz -zf $(pkg)_$(dfsg_version).orig.tar
rm -rf $(pkg)-$(dfsg_version)
rm -rf $(pkg)_$(upstream_version).orig.tar.gz
mv $(pkg)_$(dfsg_version).orig.tar.xz ../$(pkg)_$(dfsg_version).orig.tar.xz
|