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
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
export PYBUILD_NAME=pygalmesh
export PYBUILD_SYSTEM=distutils
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
# some arches (mostly 32 bit) don't provide enough memory to build with debug symbols
ARCH_NO_DEBUG_SYMBOLS := armhf i386 mips mipsel hppa hurd-i386 kfreebsd-i386 powerpcspe x32
ifneq ($(findstring $(DEB_BUILD_ARCH),$(ARCH_NO_DEBUG_SYMBOLS)),)
# disable debugging symbols (replace -g with -g0 in build flags) on weak arches
CFLAGS := $(shell dpkg-buildflags --get CFLAGS | sed 's/-g /-g0 /' )
endif
%:
dh $@ --with python3 --buildsystem=pybuild
# debug symbols (-g) have been switched off (-g0) in CFLAGS for some arches, so no point building dbgsym packages
override_dh_strip:
case " $(ARCH_NO_DEBUG_SYMBOLS) " in \
*\ $(DEB_HOST_ARCH)\ *) dh_strip --no-automatic-dbgsym;; \
*) dh_strip;; \
esac
override_dh_dwz:
case " $(ARCH_NO_DEBUG_SYMBOLS) " in \
*\ $(DEB_HOST_ARCH)\ *) echo "skipping dh_dwz since debug symbols (-g) have been switched off (-g0) for $(DEB_HOST_ARCH)";; \
*) dh_dwz;; \
esac
|