File: rules

package info (click to toggle)
barclay 5.0.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,504 kB
  • sloc: java: 9,321; sh: 546; makefile: 33
file content (48 lines) | stat: -rwxr-xr-x 1,368 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export DH_VERBOSE=1
export DH_OPTIONS

include /usr/share/dpkg/pkg-info.mk

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

override_dh_auto_clean:
	dh_auto_clean
	-rm debian/pom-barclay.xml

override_dh_auto_configure:
	# As we provide a Debian-made POM file, we have to update the version number
	# that is inside each time the upstream version changes. This is done
	# automatically with this tiny hack.
	sed 's/@VERSION@/$(DEB_VERSION_UPSTREAM)/ ; s/\+dfsg[[:digit:]]*//' debian/pom-barclay.xml.in > debian/pom-barclay.xml
	dh_auto_configure

override_dh_auto_build:
	dh_auto_build -- jar

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Tests do not work with locales with a different decimal separator
	# (for example ',')
	LC_ALL=C.UTF-8 dh_auto_test
endif

override_dh_clean:
	dh_clean
	$(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:barclay-java=" > debian/bd.substvars
	grep 'libbarclay-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