File: rules

package info (click to toggle)
nanopolish 0.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 11,752 kB
  • sloc: cpp: 22,200; ansic: 1,478; python: 814; makefile: 210; sh: 43; perl: 17
file content (57 lines) | stat: -rwxr-xr-x 1,760 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
#!/usr/bin/make -f

#DH_VERBOSE = 1
include /usr/share/dpkg/default.mk

export DEB_CPPFLAGS_MAINT_APPEND= \
 -I/usr/include/hdf5/serial \
 -I/usr/include/eigen3 \
 -I/usr/include/minimap2
# dpkg-buildpackage would otherwise set -O2, overriding upstream's -O3
# Note: ask Steffen why he chose to add -flto for this package.
# Steffen replies: anything with many object files and compute-intensive should benefit from it
export DEB_CFLAGS_MAINT_APPEND = -O3 -flto
export DEB_CXXFLAGS_MAINT_APPEND = -O3 -flto
export DEB_LDFLAGS_MAINT_APPEND = -L/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# These variables just need to be defined as anything but "install" in order
# to use system versions.
export HDF5=external
export EIGEN=external
export HTS=external
export MINIMAP2=external
export SLOW5LIB=external

%:
	dh $@ --with python3

override_dh_auto_clean:
	sed -i~ 's/^.depend: .*/.depend:/' Makefile
	touch .depend
	$(MAKE) clean
	$(RM) .depend
	mv Makefile~ Makefile

override_dh_auto_build:
	dh_auto_build
	$(MAKE) nanopolish_test

### When overriding auto_test make sure DEB_BUILD_OPTIONS will be respected
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	echo "Since we need the executable created inside build time test in autopkgtest this is enforced in dh_auto_build to circumvent nocheck."
endif

override_dh_install:
	dh_install
	for pl in `find debian -name "*.pl"` ; do \
	    sed -i '1s?^#!/usr/bin/env.*perl?#!/usr/bin/perl?' $${pl} ; \
	done
	for pl in `grep -Rl '#![[:space:]]*/usr/bin/env *python' debian/*/usr/*` ; do \
	    sed -i '1s?^#!.*python.*?#!/usr/bin/python3?' $${pl} ; \
	done

override_dh_fixperms:
	dh_fixperms
	find debian -name *.fast5 -exec chmod -x \{\} \;