File: rules

package info (click to toggle)
seqan 1.4.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 257,080 kB
  • ctags: 38,576
  • sloc: cpp: 301,711; python: 26,086; sh: 659; xml: 188; awk: 129; makefile: 53
file content (82 lines) | stat: -rwxr-xr-x 3,380 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
#!/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

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	cd obj-$(DEB_BUILD_GNU_TYPE); make docs

override_dh_install:
	dh_install
	# /usr/bin/join is part of coreutils package: Avoid name conflict by renaming it to seqan-join
	# This solution is withdrawn in favour of just providing a set of binaries according to upstream
	# in /usr/bin (via symlink) while others go to /usr/lib/seqan/bin (see README.Debian)
	# mv $(CURDIR)/debian/seqan-apps/usr/bin/join $(CURDIR)/debian/seqan-apps/usr/bin/seqan-join
	#
	# Formerly binaries were installed into usr/lib/seqan/bin/
	# and only some of them were made available in /usr/bin via dh_link
	# Since there is no obvious reason for this neither is there any
	# documentation that explains the motivation this is commented here.
	#for APP in `find $(CURDIR)/obj*/apps -mindepth 1 -maxdepth 1 -executable -type f` ; do \
	#  cp -a $$APP $(CURDIR)/debian/seqan-apps/usr/lib/seqan/bin/ ; done
	# ------------------------------------------------------------------
	# Formerly readmes were named README.app.  It seems more consistent
	# to keep upstream documentation layout which in addition contains
	# some example files.  So the old code is commented here.
	#for APP in `find apps -name README` ; do \
	#  app=`echo $$APP | sed 's?.*apps/\(.\+\)/README?\1?'` ; \
	#  echo $$app ; \
	#  cp -a $$APP $(CURDIR)/debian/seqan-apps/usr/share/doc/seqan-apps/README.$$app ; \
	#done
	# ------------------------------------------------------------------
	# Delete additional LICENSE files
	find $(CURDIR)/debian/seqan-apps -type f -name LICENSE -delete
	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_link:
	dh_link
	# we generate only those manpages where binaries are linked to /usr/bin
        # since dh_link is executed after dh_installmanpages this is done here
	$(CURDIR)/debian/generate_manpages

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

get-orig-source:
	uscan --verbose --force-download --repack --compress xz