File: rules

package info (click to toggle)
seqan 1.4.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 34,156 kB
  • ctags: 30,130
  • sloc: cpp: 226,267; python: 7,737; xml: 189; sh: 153; awk: 129; makefile: 48
file content (53 lines) | stat: -rwxr-xr-x 1,809 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
#!/usr/bin/make -f

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

# Droping -fstack-protector flag helps **drastically** reducing memory consumption when building the package!!!!
# export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS | sed 's/-fstack-protector *//')  ## this simply tiggers #759978
export DEB_BUILD_MAINT_OPTIONS = hardening=-stackprotector
# alternatively: export DEB_CXXFLAGS_STRIP='-fstack-protector'

DEB_HOST_ARCH       ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

DEB_BUILD_ARCH          ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel))
    export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS | sed 's/-O[1-9]//') -O0 -mxgot
endif

export DEB_CXXFLAGS_MAINT_APPEND  += -DNDEBUG

%:
	dh $@ --parallel

override_dh_install:
	dh_install
	# ------------------------------------------------------------------
	# Delete additional LICENSE files
	if [ -d $(CURDIR)/debian/seqan-dev ] ; then \
	    find $(CURDIR)/debian/seqan-dev  -type f -name LICENSE -delete ; \
	    # Delete *.pyc files that somehow end up in seqan-dev documentation \
	    find $(CURDIR)/debian/seqan-dev -type f -name "*.pyc" -delete ; \
	fi

override_dh_auto_clean:
	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

override_dh_auto_test:
# Run test suite only on powerfull architectures (amd64) at build time
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 kfreebsd-amd64))
	dh_auto_test
else
	echo "Do not run test suite when building on architecture $(DEB_HOST_ARCH)"
endif

override_dh_fixperms:
	dh_fixperms
	find debian/*/usr/lib/cmake -type f -exec chmod -x \{\} \;