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
|
#!/usr/bin/make -f
include /usr/share/dpkg/buildtools.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export CC
EXTRA_LFLAGS:="$(shell dpkg-buildflags --get LDFLAGS)"
EXTRA_CFLAGS:="$(shell dpkg-buildflags --get CPPFLAGS) -D_GNU_SOURCE"
# relax symbols check when targeting experimental
EXP_RELEASE = $(filter experimental% UNRELEASED,\
$(shell dpkg-parsechangelog | grep -Po '^Distribution: \K.*'))
export DPKG_GENSYMBOLS_CHECK_LEVEL=$(if $(EXP_RELEASE),0,1)
override_dh_auto_configure:
sed -e 's,@\$$(CC),\$$(CC),' \
-e 's,@\$$(LD),\$$(LD),' \
-e 's,@\$$(AR),\$$(AR),' \
-e 's,@rm -rf,rm -rf,' < Makefile > GNUmakefile
override_dh_auto_build:
dh_auto_build -- info all \
RELEASE=1 \
USE_OPENSSL=1 \
EXTRA_LFLAGS=$(EXTRA_LFLAGS) \
EXTRA_CFLAGS=$(EXTRA_CFLAGS)
LIBDIR=/usr/lib/$(DEB_TARGET_MULTIARCH)
override_dh_auto_install:
dh_auto_install -- LIBDIR=$(LIBDIR)
sed -i "s,libdir=\$${prefix}/lib,libdir=\$${prefix}/lib/$(DEB_TARGET_MULTIARCH)," debian/tmp/$(LIBDIR)/pkgconfig/libre.pc
override_dh_auto_clean:
rm -f GNUmakefile
override_dh_auto_test:
%:
dh $@ --with pkgkde_symbolshelper
|