File: rules

package info (click to toggle)
seqan2 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 228,748 kB
  • sloc: cpp: 257,602; ansic: 91,967; python: 8,326; sh: 1,056; xml: 570; makefile: 229; awk: 51; javascript: 21
file content (101 lines) | stat: -rwxr-xr-x 3,460 bytes parent folder | download
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
94
95
96
97
98
99
100
101
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

# debian/rules: Disable fixfilepath feature, as it triggers build
# failures when enabled.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=-fixfilepath
include /usr/share/dpkg/pkg-info.mk
export HOME=$(CURDIR)/fakehome

# Droping -fstack-protector flag helps **drastically** reducing memory consumption when building the package!!!!
# export DEB_BUILD_MAINT_OPTIONS = hardening=-stackprotector

include /usr/share/dpkg/architecture.mk

# As per upstream's instructions
export DEB_CFLAGS_MAINT_APPEND+=-O3
export DEB_CXXFLAGS_MAINT_APPEND+=-DNDEBUG -O3

pkgapps=seqan-apps
pkgdev=libseqan2-dev

%:
	dh $@

override_dh_auto_configure-arch:
	export DEB_BUILD_ARCH=${DEB_BUILD_ARCH} ; \
	dh_auto_configure --arch -- \
		-DSEQAN_STATIC_APPS=False -DSEQAN_NO_DOX=1 \
		-DSEQAN_DISABLE_VERSION_CHECK=YES \
		-DALIGN_SIMD_TEST=FALSE \
		-DSEQAN_STRIP_APPS_BUILD_PATH="$(CURDIR)" \
		-DSEQAN_NO_DOX=1

override_dh_auto_configure-indep:
	dh_auto_configure --indep -B build -- \
		-DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY -DSEQAN_NO_DOX=1 \
		-DSEQAN_DISABLE_REVISION_INFO=1 \
		-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
		-DALIGN_SIMD_TEST=FALSE \
		-Wno-dev -DCMAKE_POLICY_WARNING_CMP0160=OFF

execute_before_dh_auto_test:
	cp demos/tutorial/file_io_overview/example.sam debian/

execute_after_dh_auto_test:
	cp debian/example.sam demos/tutorial/file_io_overview/example.sam

override_dh_auto_install-indep:
	dh_auto_install --indep -B build --destdir=$(CURDIR)/debian/$(pkgdev)/
	rm -Rf $(CURDIR)/debian/$(pkgdev)/usr/share/doc/seqan

execute_after_dh_install-indep:
	# Delete additional LICENSE and compiled Python files
	if [ -d $(CURDIR)/debian/$(pkgdev) ] ; then \
	    find $(CURDIR)/debian/$(pkgdev) -type f -name LICENSE -delete ; \
	    find $(CURDIR)/debian/$(pkgdev) -type f -name "*.pyc" -delete ; \
	fi

execute_after_dh_install-arch:
	# Delete additional LICENSE files
	find $(CURDIR)/debian/$(pkgapps) -type f -name LICENSE -delete || /bin/true
	find $(CURDIR)/debian/$(pkgapps)/usr/lib/seqan/bin -type f \
		-name "*.sh" | xargs chmod a+x
#	for app in $$(ls $(CURDIR)/debian/$(pkgapps)/usr/lib/seqan/bin); \
#		do $(CURDIR)/debian/$(pkgapps)/usr/lib/seqan/bin/$${app} \
#		--write-ctd $${app}.ctd && CTDConverter cwl -i $${app}.ctd \
#		-o $(CURDIR)/debian/$(pkgapps)/usr/share/commonwl/${app}.cwl; \
#	        done;
#	rm *.ctd
#	find $(CURDIR)/debian/$(pkgapps)/usr/share/commonwl -type f \
#		-name "*.cwl" | xargs chmod a+x

execute_after_dh_auto_clean:
	find . -type f -name "*.pyc" -delete
	if [ -d orig ] ; then \
	  for header in `find orig -name "*generated_forwards.h"` ; do \
	    mv $${header} `echo $$header | sed 's?orig/??'` ; \
	  done ; \
	fi
	rm -rf orig

execute_before_dh_installman-arch:
	dh_link --arch
	if [ -d $(CURDIR)/debian/$(pkgapps)/usr/bin ] ; then \
		find $(CURDIR)/debian/$(pkgapps)/usr/bin -type l -xtype l -delete ; \
	fi
	$(CURDIR)/debian/generate_manpages

execute_after_dh_link-arch:
	# Some binaries (eg. splazer) are not built in 32-bit architectures so
	# remove their (broken) symlinks.
	if [ -d $(CURDIR)/debian/$(pkgapps)/usr/bin ] ; then \
	    find $(CURDIR)/debian/$(pkgapps)/usr/bin -type l -xtype l -delete ; \
	fi

execute_after_dh_fixperms-arch:
	for bin in `ls $(CURDIR)/debian/$(pkgapps)/usr/lib/seqan/bin/*.sh` ; do \
	    chmod +x $(CURDIR)/debian/$(pkgapps)/usr/lib/seqan/bin/`basename $${bin}` ; \
	done