File: rules

package info (click to toggle)
libssw 1.1-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 28,616 kB
  • sloc: ansic: 14,533; cpp: 493; python: 382; java: 136; makefile: 90; sh: 29
file content (61 lines) | stat: -rwxr-xr-x 2,029 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
#!/usr/bin/make -f

# DH_VERBOSE := 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow optimize=+lto
export DEB_CFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
export DEB_CXXFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3

ifeq ($(DEB_BUILD_ARCH), ppc64el)
export DEB_CFLAGS_MAINT_APPEND += -DNO_WARN_X86_INTRINSICS
export DEB_CXXFLAGS_MAINT_APPEND += -DNO_WARN_X86_INTRINSICS
endif

include /usr/share/dpkg/default.mk

ifneq ($(filter nojava,$(DEB_BUILD_PROFILES)),)
%:
	dh $@
else
%:
	dh $@ --with javahelper --with jh_maven_repo_helper
endif

override_dh_auto_clean:
	rm -f debian/libssw*install debian/libssw*links debian/ssw-align.1
	dh_auto_clean --sourcedirectory src

override_dh_auto_build:
ifneq ($(filter nojava,$(DEB_BUILD_PROFILES)),)
	dh_auto_build --sourcedirectory src -- default
else
	dh_auto_build --sourcedirectory src -- default java
endif

ifneq ($(filter nojava,$(DEB_BUILD_PROFILES)),)
override_dh_auto_install: debian/libssw0.install debian/libssw-dev.install debian/libssw-dev.links
	dh_auto_install
else
override_dh_auto_install: debian/libssw0.install debian/libssw-dev.install debian/libssw-dev.links debian/libssw-java.install debian/libssw-java.links
	mv src/ssw.jar src/ssw-$(DEB_VERSION_UPSTREAM).jar
	dh_auto_install
endif

override_dh_installman:
	LD_LIBRARY_PATH=`pwd`/src help2man --version-string=' ' --help-option=' ' \
          -I debian/extra-man-info.txt \
          -N -n 'fast Smith-Waterman aligner' \
          --no-discard-stderr src/ssw-align \
            | fgrep -v ERROR > debian/ssw-align.1
	dh_installman

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	LD_PRELOAD="$$LD_PRELOAD $(CURDIR)/src/libssw.so" src/ssw-align -c demo/ref.fa demo/1k.fa
endif

debian/%.install: debian/%.install.in
	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@

debian/%.links: debian/%.links.in
	sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
            -e 's/@DEB_JAVA_PKG_VERSION@/$(DEB_VERSION_UPSTREAM)/g' $< > $@