#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. #export DH_VERBOSE = 1 SOVERSION = 5.7 # see FEATURE AREAS in dpkg-buildflags(1) export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed DPKG_EXPORT_BUILDFLAGS = yes include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/architecture.mk # Upstream does not use CPPFLAGS CFLAGS += $(CPPFLAGS) %: dh $@ --sourcedirectory=src override_dh_auto_configure: dh_auto_configure --sourcedirectory=src -- \ --with-static-lib=yes \ --with-shared-lib=yes \ --with-shlib-tools \ --with-perf-events \ --with-pfm-incdir=/usr/include \ --with-pfm-libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ CC=$(CC) # for reproducibility sed -r -i '/^[CF]FLAGS/s/-fdebug-prefix-map=\S*\s*//' \ src/ctests/Makefile.target \ src/ftests/Makefile.target \ src/testlib/Makefile.target \ src/validation_tests/Makefile.target \ src/components/Makefile_comp_tests.target override_dh_auto_test: -env LD_LIBRARY_PATH=$(CURDIR)/src:$(LD_LIBRARY_PATH) dh_auto_test override_dh_auto_install: dh_auto_install --sourcedirectory=src -- install-all # delete example binaries find debian/tmp/usr/share/papi -perm -100 -type f -delete find debian/tmp/usr/share/papi -name \*.a -type f -delete find debian/tmp/usr/share/papi -name Makefile -type f -print0 | \ xargs -0r sed -i -e 's@ [^ ]*-f\(file\|debug\)-prefix-map=[^ ]*@@g' override_dh_makeshlibs: dh_makeshlibs -a -- -c4 override_dh_shlibdeps: dh_shlibdeps -a -- --warnings=7 override_dh_missing: dh_missing --list-missing override_dh_installchangelogs: dh_installchangelogs RELEASENOTES.txt override_dh_compress: dh_compress -X.c -X.h -X.F -XMakefile override_dh_gencontrol: dh_gencontrol -- \ -V'papi:SOVERSION=$(SOVERSION)' TEMPLATES := $(wildcard debian/libpapiSOVERSION.*) GENERATED = $(subst SOVERSION,$(SOVERSION),$(TEMPLATES)) libpapi$(SOVERSION).%: libpapiSOVERSION.% sed 's/@SOVERSION@/$(SOVERSION)/g' $< > $@ build-generated: $(GENERATED) ; clean-generated: $(RM) $(GENERATED) override_dh_auto_configure: build-generated clean: clean-generated