File: rules

package info (click to toggle)
wise 2.4.1-27
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 39,204 kB
  • sloc: ansic: 276,369; makefile: 1,021; perl: 886; lex: 93; yacc: 81; sh: 25
file content (119 lines) | stat: -rwxr-xr-x 3,760 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
#!/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

# FIXME: work around weird compiler behavior causing:
#
# 	motifmatrix.c:408:24: error: assignment to ‘char’ from ‘void *’
# 	                             makes integer from pointer without a cast
# 	                             [-Wint-conversion]
# 	  408 |     for(i=0;i<leni;i++)  {
# 	      |                        ^
#
# Of course, there are no visible assigment to "char" from "void *"
# around that hunk, and the compiler hints moves around pointing nowhere
# relevant, suggesting a compiler bug.
export DEB_CFLAGS_MAINT_APPEND = -Wno-error=int-conversion


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

%:
	dh $@

override_dh_auto_build:
	# The dyc compiler is needed before building the all the rest.
	# Also, it pre-depends on the libwisebase library, otherwise
	# linking fails.
	dh_auto_build --sourcedirectory=src/base -- libwisebase.a
	dh_auto_build --sourcedirectory=src/dyc -- dyc
	PATH="$$PATH:$(CURDIR)/src/dyc" \
	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 \{\} \;