Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE=1
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 # extra rules to remove files manually
34 #-find waf -name '*.pyc' -delete
35 #rm -rf .waf* .lock-waf*
36 #rm -rf build/ dist/ .waf* .lock-waf*
37 #rm -rf python/gen/ aubio.egg-info
38 #rm -rf python/lib/*.pyc python/lib/aubio/*.so
39 #rm -rf debian/tmp
40 #rm -rf manpages.refs manpages.links
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 # run tests
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 # library
56 $(WAF_CMD) install $(WAF_OPTIONS)
57
58
59 ################ d/copyright helper ##############
60 DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
61 debian/.*
62 # licensecheck v1
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