File: rules

package info (click to toggle)
hhsuite 3.3.0+ds-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 16,076 kB
  • sloc: cpp: 24,689; perl: 5,022; python: 3,017; ansic: 2,556; sh: 110; makefile: 109
file content (132 lines) | stat: -rwxr-xr-x 4,923 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CXXFLAGS_MAINT_APPEND = -include stdlib.h -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3

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

include /usr/share/dpkg/default.mk

binprefix=$(CURDIR)/debian/$(DEB_SOURCE)/usr/bin
libprefix=$(CURDIR)/debian/$(DEB_SOURCE)/usr/libexec/$(DEB_SOURCE)
progs = hhalign hhalign_omp hhblits hhblits_omp hhblits_ca3m hhconsensus hhfilter hhmake hhsearch hhsearch_omp a3m_extract a3m_reduce a3m_database_reduce a3m_database_extract a3m_database_filter

HHMANPAGES = hhalign.1 hhblits.1 hhblits_omp.1 hhconsensus.1 hhfilter.1 hhmake.1 hhsearch.1

export n_hhalign=align a query alignment/HMM to a template alignment/HMM
export n_hhblits=fast homology detection method to iteratively search a HMM database
export n_hhblits_omp=fast homology detection method to iteratively search a HMM database
export n_hhconsensus=calculate the consensus sequence for an A3M/FASTA input file
export n_hhfilter=filter an alignment by maximum sequence identity of match states and minimum coverage
export n_hhmake=build an HMM from an input alignment or convert between HMMER format and HHsearch format
export n_hhsearch=search a database of HMMs with a query alignment or query HMM

hhmanpages: $(HHMANPAGES)

override_dh_installman-arch: $(HHMANPAGES)
	dh_installman --arch

ifeq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
$(HHMANPAGES): %.1 : debian/tmp/usr/bin/%
else
$(HHMANPAGES): %.1 : debian/hhsuite/usr/bin/%
endif
	export HHLIB=. && help2man --no-info --help-option '-h all' --version-string $(DEB_VERSION_UPSTREAM) -n "$$n_$*" '$<' | sed -e 's/\(^\|[^\]\)-/\1\\-/g;' > '$@'

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(HHMANPAGES) build-* mybuild
	find . -name "*.rej" -delete
	find . -name "*~" -delete
	dh_clean

override_dh_auto_configure-arch:
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
	for SIMD in avx2 avx sse4.1 ssse3 sse3 ; do \
		export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && \
		dh_auto_configure --builddirectory build_$${SIMD} -- -DEXE_SUFFIX=-$${SIMD} -DNATIVE_ARCH=0; \
	done
	export CXXFLAGS="$(CXXFLAGS)" && \
		dh_auto_configure --builddirectory build_plain -- -DEXE_SUFFIX=-plain -DNATIVE_ARCH=0
ifeq (i386,$(DEB_HOST_ARCH))
	for SIMD in sse2 sse ; do \
		export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && \
		dh_auto_configure --builddirectory build_$${SIMD} -- -DEXE_SUFFIX=-$${SIMD} -DNATIVE_ARCH=0 ; \
	done
endif
else
	dh_auto_configure --builddirectory mybuild -- -DNATIVE_ARCH=0
endif

override_dh_auto_configure-indep:
	dh_auto_configure --builddirectory mybuild -- -DNATIVE_ARCH=0

override_dh_auto_build-arch:
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
	for SIMD in avx2 avx sse4.1 ssse3 sse3 plain ; do \
		dh_auto_build --builddirectory build_$${SIMD} ; \
	done
ifeq (i386,$(DEB_HOST_ARCH))
	for SIMD in sse2 sse ; do \
		dh_auto_build --builddirectory build_$${SIMD} ; \
	done
endif
else
	dh_auto_build --builddirectory mybuild
endif

override_dh_auto_build-indep:
	dh_auto_build --builddirectory mybuild/data

override_dh_auto_test-arch:
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
	rm -Rf $(CURDIR)/debian/testdir
	mkdir -p $(CURDIR)/debian/testdir
	cd build_plain/src && \
	  for file in *-plain ; \
	  do ln -s $(CURDIR)/build_plain/src/$${file} $(CURDIR)/debian/testdir/$${file%%-plain} ; done
	cd $(CURDIR)/data && PATH=$$PATH:$(CURDIR)/build_plain/lib/ffindex/src/:$(CURDIR)/debian/testdir ./test.sh
else
	cd $(CURDIR)/data && PATH=$$PATH:$(CURDIR)/mybuild/src:$(CURDIR)/mybuild/lib/ffindex/src ./test.sh
endif

override_dh_auto_install-arch:
	mkdir -p $(libprefix)/bin
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
	for SIMD in avx2 avx sse4.1 ssse3 sse3 plain ; do \
		dh_auto_install --builddirectory build_$${SIMD} ; \
	done
	mkdir -p $(binprefix)
	dh_install -phhsuite debian/bin/simd-dispatch /usr/libexec/$(DEB_SOURCE)/
ifeq (i386,$(DEB_HOST_ARCH))
	for SIMD in sse2 sse ; do \
		dh_auto_install --builddirectory build_$${SIMD} ; \
	done
endif
	for prog in $(progs) cstranslate ; do dh_install usr/bin/$${prog}* /usr/libexec/$(DEB_SOURCE)/; done
	cd $(binprefix) \
		&& for prog in $(progs); do \
		ln -s ../libexec/$(DEB_SOURCE)/simd-dispatch $${prog} ; done
	cd $(libprefix)/bin \
		&& for prog in cstranslate ; do \
		ln -s ../simd-dispatch $${prog} ; done
else
	dh_auto_install --builddirectory mybuild
	for prog in $(progs) ; do dh_install -phhsuite usr/bin/$${prog} usr/bin/ ; done
	dh_install -phhsuite usr/bin/cstranslate* usr/libexec/$(DEB_SOURCE)/bin
endif
	dh_install -phhsuite usr/bin/ffindex_* usr/bin/

override_dh_auto_install-indep:
	dh_auto_install --builddirectory mybuild/data

override_dh_fixperms-arch:
	dh_fixperms
	chmod -x debian/hhsuite/usr/share/hhsuite/scripts/*.pm

override_dh_gencontrol:
	dh_gencontrol -- -Vsimde:Built-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W "libsimde-dev")"

%:
	dh $@