File: rules

package info (click to toggle)
seqan3 3.4.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,580 kB
  • sloc: cpp: 145,192; sh: 307; xml: 264; javascript: 95; makefile: 70; perl: 29; php: 15
file content (93 lines) | stat: -rwxr-xr-x 4,727 bytes parent folder | download | duplicates (2)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/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

export DEB_CFLAGS_MAINT_APPEND+=-O3
export DEB_CXXFLAGS_MAINT_APPEND+=-DNDEBUG -O3

export CPM_USE_LOCAL_PACKAGES=ON

DOPACKAGES := $(shell dh_listpackages)

pkgdev=libseqan3-dev

%:
	dh $@

override_dh_auto_configure:
ifeq (,$(filter nocheck,$(DEB_BUILD_PROFILES)))
	rm -Rf include/seqan3/vendor/cereal
	dh_auto_configure --builddirectory=build_unit        --sourcedirectory=test/unit        --buildsystem=cmake+ninja -- -DUSE_CCACHE=OFF -DSEQAN3_WITH_SEQAN2_CI=OFF -DCMAKE_CXX_SCAN_FOR_MODULES=OFF
	dh_auto_configure --builddirectory=build_header      --sourcedirectory=test/header      --buildsystem=cmake+ninja -- -DUSE_CCACHE=OFF -DSEQAN3_WITH_SEQAN2_CI=OFF -DCMAKE_CXX_SCAN_FOR_MODULES=OFF -DSEQAN3_BENCHMARK_VERSION=1.8.3
	dh_auto_configure --builddirectory=build_snippet     --sourcedirectory=test/snippet     --buildsystem=cmake+ninja -- -DUSE_CCACHE=OFF -DSEQAN3_WITH_SEQAN2_CI=OFF -DCMAKE_CXX_SCAN_FOR_MODULES=OFF
	dh_auto_configure --builddirectory=build_performance --sourcedirectory=test/performance --buildsystem=cmake+ninja -- -DUSE_CCACHE=OFF -DSEQAN3_WITH_SEQAN2_CI=OFF -DCMAKE_CXX_SCAN_FOR_MODULES=OFF -DSEQAN3_BENCHMARK_VERSION=1.8.3 -DSEQAN3_BENCHMARK_MIN_TIME=0.001s
endif
ifneq (,$(filter seqan3-doc,$(DOPACKAGES)))
	dh_auto_configure --builddirectory=build_documentation --sourcedirectory=test/documentation --buildsystem=cmake+ninja -- -DCPM_doxygen_awesome_SOURCE=/usr/share/doxygen-awesome-css -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
	dh_auto_test --builddirectory=build_unit --sourcedirectory=test/unit --buildsystem=cmake+ninja
	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