File: rules

package info (click to toggle)
libfastahack 1.0.0%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 184 kB
  • sloc: cpp: 576; makefile: 54
file content (53 lines) | stat: -rwxr-xr-x 1,863 bytes parent folder | download | duplicates (3)
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

# DH_VERBOSE := 1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_installman:
	help2man --no-discard-stderr --no-info --version-string=$(DEB_VERSION) \
		--name="fastahack - indexing and extracting sequences and subsequences from FASTA files" \
		./fastahack > debian/fastahack.1
	dh_installman

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	./fastahack tests/correct.fasta 2>&1 | grep -v ERROR
	./fastahack tests/crlf.fasta 2>&1 | grep -v ERROR
	./fastahack tests/embedded_newline.fasta 2>&1 | grep 'ERROR: embedded newline'
	./fastahack tests/mismatched_lines.fasta 2>&1 | grep 'ERROR: mismatched line lengths'
	./fastahack tests/trailing_newlines.fasta 2>&1 | grep -v ERROR
	rm tests/*.fai
endif

override_dh_install:
	dh_install
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    --movedev debian/tmp/usr/include/* usr/include \
		    --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		    debian/tmp/usr/lib/*/*.so
	find debian -name libfastahack.la -delete

override_dh_makeshlibs:
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH), amd64 arm64 mips64el ppc64el ia64 kfreebsd-amd64 risc64 sparc64))
	echo "On architecture $(DEB_HOST_ARCH) symbols file is provided"
else
	echo "Symbols file for architecture $(DEB_HOST_ARCH) is not provided"
	mkdir -p debian/hidesymbols
	mv debian/*.symbols debian/hidesymbols
endif
	dh_makeshlibs
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH), amd64 arm64 mips64el ppc64el ia64 kfreebsd-amd64 risc64 sparc64))
	echo "dh_makeshlibs for architecture $(DEB_HOST_ARCH) including symbols done"
else
	# restore original debian/ dir to enable building twice in a row
	mv debian/hidesymbols/*.symbols debian
	rmdir debian/hidesymbols
endif