File: rules

package info (click to toggle)
samtools 1.16.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 18,664 kB
  • sloc: ansic: 29,584; perl: 7,321; sh: 444; makefile: 289; java: 158
file content (66 lines) | stat: -rwxr-xr-x 1,831 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
#!/usr/bin/make -f

export DH_VERBOSE=1
export CURSES_LIB=-lcurses

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386))
  export DEB_CFLAGS_MAINT_APPEND=-ffloat-store
endif

%:
	dh $@

override_dh_auto_clean:
	rm -f config.mk
	touch config.mk
	dh_auto_clean --

override_dh_auto_configure:
	touch config.mk
	aclocal --force -I debian/ -I /usr/share/aclocal
	autoconf
	dh_auto_configure -- --with-htslib=system

override_dh_auto_build:
	dh_auto_build -- \
	  CFLAGS="$$(dpkg-buildflags --get CFLAGS)" \
	  CPPFLAGS="\$$(DFLAGS) \$$(INCLUDES) $$(dpkg-buildflags --get CPPFLAGS)" \
	  LDFLAGS="$$(dpkg-buildflags --get LDFLAGS)"

# Fix several issues in the manual pages.
execute_before_dh_installman:
	# Fix whatis entries for subcommands; "samtools subcommand \- desc."
	# will confuse the lexer, but "samtools-subcommand \- desc." will work.
	sed -i '/^\.SH NAME/{n;s/^\([^ ]\+\) \([^ ]\+\) \\- /\1-\2 \\- /}' \
		debian/*/usr/share/man/man*/*.*
	# .EX expects a indentation width.
	sed -i 's/^.EX$$/.EX 8/' debian/*/usr/share/man/man*/*.*

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifeq (,$(filter $(DEB_HOST_ARCH),mipsel))
	dh_auto_test -- BGZIP=/usr/bin/bgzip
else
	dh_auto_test -- BGZIP=/usr/bin/bgzip || true
endif
endif

override_dh_auto_install:
	dh_auto_install -- \
	  prefix=/usr
	make clean

override_dh_install:
	dh_install
	# Fix Perl interpreter PATH
	for pscript in `grep -Rl '#!/usr/bin/env \+perl' debian/*` ; do \
	    sed -i '1s?#!/usr/bin/env \+perl?#!/usr/bin/perl?' $${pscript} ; \
	done
	# Disable the executable bit on a dataset.
	if [ -d debian/samtools-test ] \
	; then chmod 0644 debian/samtools-test/usr/share/samtools/test/ampliconclip/ac_test.bed \
	; fi

override_dh_installchangelogs:
	dh_installchangelogs NEWS