File: rules

package info (click to toggle)
wadc 2.1%2Bgit3aac3015-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,312 kB
  • ctags: 643
  • sloc: java: 2,771; ansic: 1,526; xml: 125; makefile: 33; sh: 13
file content (25 lines) | stat: -rwxr-xr-x 822 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
#!/usr/bin/make -f

export DH_VERBOSE=1
version := $(shell dpkg-parsechangelog -S Version | cut -d- -f1)
mainver := $(shell echo $(version) | cut -d+ -f1)
mvnrepo := debian/wadc/usr/share/maven-repo

%:
	dh $@ --buildsystem=maven

override_dh_auto_build:
	echo git.commit.id.describe=v$(version) > src/main/resources/git.properties
	dh_auto_build --buildsystem=maven

override_dh_auto_clean:
	dh_auto_clean --buildsystem=maven
	rm -f src/main/resources/git.properties

override_dh_auto_install:
	dh_auto_install --buildsystem=maven
	# workarounds for maven-debian-helper being ...weird
	mv $(mvnrepo)/org/redmars/wadc/wadc/$(mainver)/wadc-$(mainver).jar debian/wadc/usr/share/wadc/wadc.jar
	rm $(mvnrepo)/org/redmars/wadc/wadc/$(mainver)/wadc-$(mainver).pom
	rm -r $(mvnrepo)
	chmod +x debian/wadc/usr/share/wadc/wadc.jar