File: rules

package info (click to toggle)
hmmer 3.3+dfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 35,628 kB
  • sloc: ansic: 129,627; perl: 10,153; sh: 3,305; makefile: 2,016; python: 1,007
file content (81 lines) | stat: -rwxr-xr-x 2,440 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
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

ifeq (,$(filter nolto,$(DEB_BUILD_OPTIONS)))
export DEB_LDFLAGS_MAINT_APPEND+=-flto
export DEB_CFLAGS_MAINT_APPEND+=-flto
endif

sampledir:=$(CURDIR)/debian/$(DEB_SOURCE)-examples/usr/share/doc/$(DEB_SOURCE)/examples

%:
	dh $@

ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)

ifeq (amd64,$(ARCH))
    DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-sse
 else ifeq (powerpc,$(ARCH))
    DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-vmx
 else ifeq (ppc64,$(ARCH))
    DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-vmx
 else
    DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads
endif

override_dh_autoreconf:
	AUTOHEADER=true dh_autoreconf

override_dh_auto_configure:
	CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	export V=VERBOSE ; make check -j$(shell nproc) | tee debian/test_log
	if tail -n 6 debian/test_log | head -n 1 | grep -q FAILED ; then false ; fi
endif

override_dh_auto_build:
	export V=VERBOSE ; dh_auto_build

override_dh_auto_clean:
	dh_auto_clean
	rm -f testsuite/esltmp*
	rm -f easel/testsuite/esltmp*
	rm -f tutorial/MADE1.hmm.h3?
	rm -f config.log config.status configure
	find . -name Makefile -delete

override_dh_compress:
	dh_compress -Xtutorial/

override_dh_auto_install:
	dh_auto_install
	mkdir -p $(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/${DEB_HOST_MULTIARCH}/hmmer/
	cp src/hmmc2 $(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/${DEB_HOST_MULTIARCH}/hmmer/

override_dh_installexamples:
	dh_installexamples
	mkdir -p $(sampledir)/src/impl
	find src/ -maxdepth 1 -name "*_utest" -exec cp \{\} $(sampledir)/src/ \;
	find src/impl_sse -name "*_utest" -exec cp \{\} $(sampledir)/src/impl \;
	cp src/itest_brute $(sampledir)/src
	cp src/hmmpress.itest.pl $(sampledir)/src
	cp -aR testsuite $(sampledir)
	find easel -name "*.o" -delete
	cp -aR easel $(sampledir)
	cp -aR tutorial $(sampledir)
	find $(sampledir) -name 'Makefile' | xargs sed -i "s^$(CURDIR)^.^g"
	find $(sampledir) -name "esltmp*" -delete

override_dh_fixperms:
	dh_fixperms
	find debian -name .dropbox.attr -delete
	find debian -name "*.fa" -executable -exec chmod -x \{\} \;
	find $(sampledir) -name "*.man" -exec chmod -x \{\} \;