File: rules

package info (click to toggle)
picard-tools 2.22.8+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 109,868 kB
  • sloc: java: 79,194; xml: 266; sh: 200; makefile: 38; javascript: 9
file content (51 lines) | stat: -rwxr-xr-x 1,440 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DH_VERBOSE=1
export DH_OPTIONS

export ANT_HOME=/usr/share/ant
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")

%:
	dh  $@ --buildsystem=gradle --with javahelper,jh_maven_repo_helper

override_dh_link:
	rm -f debian/libpicard-java-doc/usr/share/doc/libpicard-java/api/jquery/external/jquery/jquery.js
	dh_link

override_dh_auto_build:
	dh_auto_build -- jar javadoc

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Tests do not work with locales with a different decimal separator
	# (for example ',')
	env LC_ALL=C \
	dh_auto_build -- test
endif

override_dh_clean:
	dh_clean
	# also remove bai files that are left after tests
	find testdata -iname "*.bai" -exec rm {} \;
	$(RM) debian/bd-temp-substvars
	$(RM) debian/bd.substvars

override_dh_gencontrol:
	cat debian/control \
	| sed -e '/^Build-.*Depends:/,/^[^[:space:]#]/{s/^Build-.*Depends:/ /;p};d' \
	| grep '^[[:space:]]' \
	| tr ',' '\n' \
	> debian/bd-temp-substvars
	echo -n "bd:libhtsjdk-java=" > debian/bd.substvars
	grep 'libhtsjdk-java ' debian/bd-temp-substvars \
	| tr "\n" "," \
	| sed -e 's/[[:space:]]\+/ /g;s/,$$/\n/' \
	>> debian/bd.substvars
	echo -n "bd:libguava-java=" >> debian/bd.substvars
	grep 'libguava-java ' debian/bd-temp-substvars \
	| tr "\n" "," \
	| sed -e 's/[[:space:]]\+/ /g;s/,$$/\n/' \
	>> debian/bd.substvars
	dh_gencontrol -O--buildsystem=gradle -- -Tdebian/bd.substvars