File: rules

package info (click to toggle)
wise 2.4.1-23
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 27,228 kB
  • sloc: ansic: 276,365; makefile: 1,017; perl: 886; lex: 93; yacc: 81; sh: 25
file content (99 lines) | stat: -rwxr-xr-x 2,901 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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/default.mk

pkg-data := $(DEB_SOURCE)-data

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export LC_ALL=C.UTF-8
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# hardening flags
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@

override_dh_auto_build:
	dh_auto_build --sourcedirectory=src -- all
	$(MAKE) -C debian/manpages.d
#	build documentation manually (docs/makefile is not useable)
	find src/models/ src/dynlibsrc/ -name '*.tex' -print0 | LC_ALL=C sort -z | xargs -0 cat | perl docs/gettex.pl > docs/temp.tex
	cat docs/wise2api.tex docs/temp.tex docs/apiend.tex > docs/api.tex
#	<bugfix>
	sed -i 's/ sw_wrap / sw\\_wrap /' docs/api.tex
	sed -i 's/label{module_sequence\\_codon}/label{module_sequence_codon}/' docs/api.tex
	sed -i 's/Wise2::GeneParameter21_wrap/Wise2::GeneParameter21\\_wrap/' docs/api.tex
#	</bugfix>
	cd docs && pdflatex api.tex
	cd docs && pdflatex api.tex
	cd docs && pdflatex dynamite.tex
	cd docs && pdflatex dynamite.tex
#	cd docs && ps2pdf genewise6.eps  # segfaults on s390
#	cd docs && ps2pdf genewise21.eps
	cd docs && pdflatex wise2.tex
	cd docs && pdflatex wise2.tex
	cd docs && hevea api.tex
	cd docs && hevea api.tex
	cd docs && hevea dynamite.tex
	cd docs && hevea dynamite.tex
	cd docs && hevea wise2.tex
	cd docs && hevea wise2.tex
	mkdir -p docs/api
	mkdir -p docs/dynamite
	mkdir -p docs/wise2
	mv docs/api.html docs/api
	mv docs/dynamite.html docs/dynamite
	mv docs/wise2.html docs/wise2
	dh_auto_build

override_dh_clean:
	$(MAKE) -C src clean
	$(MAKE) -C debian/manpages.d clean
#	bugfix
	$(RM) -r src/oldbin
	for i in dba psw dnal genomewise pswdb scanwise estwise genewise sywise genewisedb promoterwise pseudowise estwisedb; do $(RM) src/models/$$i; done
	$(RM) src/network/scanwise_server
#	clean documentation
	$(RM) docs/temp.tex
	$(RM) docs/api.*
	$(RM) docs/wise2.image.tex
	$(RM) docs/*.pdf
	$(RM) docs/*.aux
	$(RM) docs/*.log
	$(RM) docs/*.toc
	$(RM) docs/*.pdf
	$(RM) docs/*.dvi
	$(RM) docs/*.ps
	$(RM) docs/*.4ct
	$(RM) docs/*.4tc
	$(RM) docs/*.css
	$(RM) docs/*.idv
	$(RM) docs/*.lg
	$(RM) docs/*.tmp
	$(RM) docs/*.xref
	$(RM) docs/*.haux
	$(RM) docs/*.htoc
	$(RM) docs/*.html
	$(RM) -r docs/api
	$(RM) -r docs/dynamite
	$(RM) -r docs/wise2
	dh_clean

override_dh_installexamples-indep:
	dh_installexamples
	sed -i -e 's?"../bin/$$do"?"$$do"?' -e 's?#!/usr/local/bin/perl?/usr/bin/perl?' debian/$(pkg-data)/usr/share/doc/wise-data/examples/testman.pl

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	echo "Since a patch was used to adapt the binaries to the Debian locations of data files the test suite will not run in the build directory any more."
	echo "A autopkgtest was added as compensation."
	# make -C src test
endif

override_dh_fixperms:
	dh_fixperms
	find debian -iname "*.hmm" -exec chmod -x \{\} \;