File: rules

package info (click to toggle)
genometools 1.6.2%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 50,504 kB
  • sloc: ansic: 271,868; ruby: 30,327; python: 4,942; sh: 3,230; makefile: 1,214; perl: 219; pascal: 159; haskell: 37; sed: 5
file content (74 lines) | stat: -rwxr-xr-x 2,324 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
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1
export DESTDIR=$(CURDIR)/debian/tmp
export DH_ALWAYS_EXCLUDE=.gitignore
export PATH := $(CURDIR)/debian/strip-nondeterminism:$(PATH)

include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DARCH:=$(shell dpkg-architecture | fgrep DEB_TARGET_ARCH= | cut -f 2 -d'=')
BITS:=$(shell dpkg-architecture | fgrep DEB_TARGET_ARCH_BITS= | cut -f 2 -d'=')

ifeq ($(DARCH),x32)
  X32:=yes
else
  X32:=no
endif

ifeq ($(BITS),64)
  64BIT:=yes
else
  64BIT:=no
endif

# check whether faketime can be used
ifeq ($(shell faketime 'last friday' date > /dev/null 2> /dev/null; echo $$?),0)
  FAKETIME:=faketime -f "`TZ=UTC date -d @$(SOURCE_DATE_EPOCH) +'%Y-%m-%d %H:%M:%S'`"
endif

%:
	dh $@ --with python3

override_dh_auto_clean:
	mkdir -p obj
	$(MAKE) cleanup
	cd doc/manuals; $(MAKE) cleanup
	# should be deleted inside doc/manuals/Makefile
	rm -f doc/manuals/annotationsketch.out \
	      doc/manuals/api_reference.tex    \
	      doc/manuals/gtscript_reference.tex
	find doc . -name "*.toc" -delete
	find testdata \( -name '*.ois' -or -name '*.sds' -or -name '*.esq' -or \
	      -name '*.ssp' -or -name '*.des' -or -name "*.md5"  \) -and \( -not \
	      -name '*foo.32.*' -not -name '*foo.64.*' \) -delete
	rm -f www/genometools.org/htdocs/images/callbacks.png \
	      www/genometools.org/htdocs/images/parsed.png    \
	      www/genometools.org/htdocs/images/constructed.png \
	      doc/manuals/annotationsketch.pdf
	rm -f www/genometools.org/htdocs/examples.html \
	      www/genometools.org/htdocs/libgenometools.html
	rm -rf gtpython/build
	rm -rf obj

override_dh_auto_build:
	cp debian/doc-imgs/*png www/genometools.org/htdocs/images
	$(FAKETIME) dh_auto_build -- verbose=yes useshared=yes x32=$(X32) 64bit=$(64BIT) errorcheck=no all docs manuals

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	bin/gt -test
	cd testsuite; ./testsuite.rb -keywords 'gt_sketch and not gt_python and not gt_ruby'
endif

override_dh_auto_install:
	dh_auto_install -- installmanpages useshared=yes \
	  x32=$(X32) 64bit=$(64BIT) errorcheck=no prefix=$(DESTDIR)/usr
	dh_auto_install --sourcedirectory=gtpython --buildsystem=pybuild \
	  --destdir=$(CURDIR)/debian/python3-genometools

override_dh_missing:
	dh_missing --list-missing