Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 #export DH_VERBOSE = 1
5
6 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
7
8 export PYBUILD_NAME=pygalmesh
9
10 export PYBUILD_SYSTEM=distutils
11
12 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
13
14 DPKG_EXPORT_BUILDFLAGS = 1
15 include /usr/share/dpkg/buildflags.mk
16
17 # some arches (mostly 32 bit) don't provide enough memory to build with debug symbols
18 ARCH_NO_DEBUG_SYMBOLS := armhf i386 mips mipsel hppa hurd-i386 kfreebsd-i386 powerpcspe x32
19 ifneq ($(findstring $(DEB_HOST_ARCH),$(ARCH_NO_DEBUG_SYMBOLS)),)
20 # disable debugging symbols (replace -g with -g0 in build flags) on weak arches
21 CFLAGS := $(shell dpkg-buildflags --get CFLAGS | sed 's/-g /-g0 /' )
22 endif
23
24 ifeq ($(DEB_HOST_ARCH),s390x)
25 export PYBUILD_TEST_ARGS = -k "not test_from_array_with_subdomain_sizing"
26 endif
27
28 %:
29 dh $@ --with python3 --buildsystem=pybuild
30
31 # debug symbols (-g) have been switched off (-g0) in CFLAGS for some arches, so no point building dbgsym packages
32 override_dh_strip:
33 case " $(ARCH_NO_DEBUG_SYMBOLS) " in \
34 *\ $(DEB_HOST_ARCH)\ *) dh_strip --no-automatic-dbgsym;; \
35 *) dh_strip;; \
36 esac
37
38 override_dh_dwz:
39 case " $(ARCH_NO_DEBUG_SYMBOLS) " in \
40 *\ $(DEB_HOST_ARCH)\ *) echo "skipping dh_dwz since debug symbols (-g) have been switched off (-g0) for $(DEB_HOST_ARCH)";; \
41 *) dh_dwz;; \
42 esac