| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 6 |
|
| 7 |
include /usr/share/dpkg/architecture.mk |
| 8 |
|
| 9 |
LDFLAGS += -Wl,--as-needed |
| 10 |
|
| 11 |
WAF_OPTIONS = --verbose --destdir=debian/tmp --prefix=/usr --enable-fftw3f |
| 12 |
WAF_OPTIONS += --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) |
| 13 |
WAF_CMD = python3 ./waf |
| 14 |
|
| 15 |
export PYBUILD_NAME=aubio |
| 16 |
export PYBUILD_AFTER_INSTALL=mv '{destdir}/usr/bin/aubio' '{destdir}/usr/bin/aubiocut' '{dir}/debian/tmp/usr/bin' |
| 17 |
|
| 18 |
export PYBUILD_BEFORE_TEST=make create_test_sounds |
| 19 |
export PYBUILD_AFTER_TEST=rm -rf '{dir}/python/tests/sounds' |
| 20 |
%: |
| 21 |
dh $@ --buildsystem=pybuild |
| 22 |
|
| 23 |
execute_after_dh_auto_clean: |
| 24 |
-$(WAF_CMD) distclean |
| 25 |
rm -rf python/ext/config.h |
| 26 |
rm -rf aubio.egg-info/ |
| 27 |
rm -f this_version.pyc |
| 28 |
rm -f waf_gensyms.pyc |
| 29 |
rm -rf python/tests/sounds |
| 30 |
rm -rf .cache/ .pytest_cache/ |
| 31 |
rm -rf waflib/*/__pycache__/ |
| 32 |
rm -rf ./__pycache__/ |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
override_dh_auto_configure: |
| 43 |
$(WAF_CMD) configure $(WAF_OPTIONS) |
| 44 |
|
| 45 |
execute_before_dh_auto_build: |
| 46 |
@echo "blhc: ignore-line-regexp: ^\[[ 0-9]+/[ 0-9]+\] Compiling .*" |
| 47 |
$(WAF_CMD) build $(WAF_OPTIONS) |
| 48 |
|
| 49 |
override_dh_auto_test: |
| 50 |
|
| 51 |
LD_LIBRARY_PATH=$(CURDIR)/build/src:$(LD_LIBRARY_PATH) \ |
| 52 |
dh_auto_test -- --test-pytest --test-args $(CURDIR)/python/tests/ |
| 53 |
|
| 54 |
execute_before_dh_auto_install: |
| 55 |
|
| 56 |
$(WAF_CMD) install $(WAF_OPTIONS) |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \ |
| 61 |
debian/.* |
| 62 |
|
| 63 |
.PHONY: licensecheck |
| 64 |
licensecheck: |
| 65 |
LANG=C.UTF-8 licensecheck \ |
| 66 |
-i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \ |
| 67 |
--check '.*' --recursive --deb-machine --lines 0 * \ |
| 68 |
> debian/copyright_newhints |
| 69 |
cmp debian/copyright_hints debian/copyright_newhints \ |
| 70 |
&& rm debian/copyright_newhints |