#!/usr/bin/make -f # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 export DH_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/default.mk export HOME=$(CURDIR)/fakehome export SEQAN3_NO_VERSION_CHECK=1 # Updating any build flags? Check debian/tests/run-tests as well # Use the gold linker where we can ifeq (,$(filter $(DEB_HOST_ARCH),hppa ia64 m68k riscv64 sh4)) export LD=ld.gold DEB_CFLAGS_MAINT_APPEND+=-fuse-ld=gold DEB_CXXFLAGS_MAINT_APPEND+=-fuse-ld=gold endif export DEB_CFLAGS_MAINT_APPEND+=-O3 export DEB_CXXFLAGS_MAINT_APPEND+=-DNDEBUG -O3 DOPACKAGES := $(shell dh_listpackages) pkgdev=libseqan3-dev %: dh $@ override_dh_auto_configure: ifeq (,$(filter nocheck,$(DEB_BUILD_PROFILES))) dh_auto_configure --builddirectory=build_unit --sourcedirectory=test/unit --buildsystem=cmake+ninja -- -DCCACHE_PROGRAM:FILEPATH= dh_auto_configure --builddirectory=build_header --sourcedirectory=test/header --buildsystem=cmake+ninja -- -DCCACHE_PROGRAM:FILEPATH= dh_auto_configure --builddirectory=build_snippet --sourcedirectory=test/snippet --buildsystem=cmake+ninja -- -DCCACHE_PROGRAM:FILEPATH= dh_auto_configure --builddirectory=build_performance --sourcedirectory=test/performance --buildsystem=cmake+ninja -- -DCCACHE_PROGRAM:FILEPATH= endif ifneq (,$(filter seqan3-doc,$(DOPACKAGES))) dh_auto_configure --builddirectory=build_documentation --sourcedirectory=test/documentation --buildsystem=cmake+ninja -- -DCCACHE_PROGRAM:FILEPATH= -DSEQAN3_DOXYGEN_STD_TAGFILE=/usr/share/devhelp/books/cppreference-doxygen-web.tag.xml endif override_dh_auto_build: ifeq (,$(filter nocheck,$(DEB_BUILD_PROFILES))) dh_auto_build --builddirectory=build_unit --sourcedirectory=test/unit --buildsystem=cmake+ninja dh_auto_build --builddirectory=build_header --sourcedirectory=test/header --buildsystem=cmake+ninja dh_auto_build --builddirectory=build_snippet --sourcedirectory=test/snippet --buildsystem=cmake+ninja dh_auto_build --builddirectory=build_performance --sourcedirectory=test/performance --buildsystem=cmake+ninja endif ifneq (,$(filter seqan3-doc,$(DOPACKAGES))) dh_auto_build --builddirectory=build_documentation --sourcedirectory=test/documentation --buildsystem=cmake+ninja endif override_dh_auto_clean: dh_auto_clean --builddirectory=build_unit --sourcedirectory=test/unit --buildsystem=cmake+ninja || /bin/true dh_auto_clean --builddirectory=build_header --sourcedirectory=test/header --buildsystem=cmake+ninja || /bin/true dh_auto_clean --builddirectory=build_snippet --sourcedirectory=test/snippet --buildsystem=cmake+ninja || /bin/true dh_auto_clean --builddirectory=build_performance --sourcedirectory=test/performance --buildsystem=cmake+ninja || /bin/true dh_auto_clean --builddirectory=build_documentation --sourcedirectory=test/documentation --buildsystem=cmake+ninja || /bin/true override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) # modifying this? probably want to change debian/tests/run-tests as well cd build_unit && /usr/bin/cmake -E cmake_echo_color --switch= --cyan "Running tests..." \ && /usr/bin/ctest --force-new-ctest-process --output-on-failure -E version_check_ -E directory_not_writeable dh_auto_test --builddirectory=build_header --sourcedirectory=test/header --buildsystem=cmake+ninja dh_auto_test --builddirectory=build_snippet --sourcedirectory=test/snippet --buildsystem=cmake+ninja dh_auto_test --builddirectory=build_performance --sourcedirectory=test/performance --buildsystem=cmake+ninja endif ifneq (,$(filter seqan3-doc,$(DOPACKAGES))) ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) # needs newer doxygen #dh_auto_test --builddirectory=build_documentation --sourcedirectory=test/documentation --buildsystem=cmake+ninja endif endif override_dh_auto_install: ifneq (,$(filter seqan3-doc,$(DOPACKAGES))) rm -Rf $(CURDIR)/debian/$(pkgdev)/usr/share/doc/seqan endif override_dh_installdocs: ifneq (,$(filter seqan3-doc,$(DOPACKAGES))) dh_installdocs --doc-main-package libseqan3-dev -pseqan3-doc dh_installdocs --doc-main-package libseqan3-dev -plibseqan3-dev dh_doxygen else dh_installdocs endif # Remove log file which embeds timestamps rm -f $(CURDIR)/debian/seqan3-doc/usr/share/doc/libseqan3-dev/html/_formulas.log override_dh_install: dh_install if [ -d $(CURDIR)/debian/$(pkgdev) ] ; then \ find $(CURDIR)/debian/$(pkgdev) -type f -name LICENSE -delete ; \ find $(CURDIR)/debian/$(pkgdev) -type f -name license.txt -delete ; \ find $(CURDIR)/debian/$(pkgdev) -type f -name .gitignore -delete ; \ fi