File: rules

package info (click to toggle)
sop-java 7.0.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,524 kB
  • sloc: java: 8,357; xml: 170; sh: 98; makefile: 32
file content (42 lines) | stat: -rwxr-xr-x 1,477 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
#!/usr/bin/make -f

include /usr/share/javahelper/java-vars.mk
include /usr/share/dpkg/pkg-info.mk

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

override_dh_auto_build:
	dh_auto_build -- \
		:sop-java:jar :sop-java:testJar sop-java:testFixturesJar  \
		:sop-java-picocli:jar
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	dh_auto_build -- :sop-java:javadoc :sop-java-picocli:javadoc
endif

execute_after_dh_auto_build:
	for n in sop-java sop-java-picocli; do \
		cd $$n/build/libs && ln -sf $$n-$(DEB_VERSION_UPSTREAM).jar $$n.jar; \
		test -f $$n-$(DEB_VERSION_UPSTREAM)-tests.jar && \
			ln -sf $$n-$(DEB_VERSION_UPSTREAM)-tests.jar $$n-tests.jar; \
		test -f $$n-$(DEB_VERSION_UPSTREAM)-testfixtures.jar && \
			ln -sf $$n-$(DEB_VERSION_UPSTREAM)-testfixtures.jar $$n-testfixtures.jar; \
		cd $(CURDIR); \
	done

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	java \
		-jar /usr/share/java/junit-platform-console-standalone.jar execute \
		-cp sop-java/build/libs/sop-java.jar:sop-java/build/libs/sop-java-tests.jar:sop-java/build/libs/sop-java-testfixtures.jar \
		--exclude-classname="^sop\.testsuite\.\S+" \
		--scan-classpath \
		--fail-if-no-tests \
		--disable-ansi-colors
	# unable to run tests for sop-picocli-java
	# until libmockito-java is updated
endif

execute_after_dh_install:
	# ship testfixtures jar in main package
	dh_install -p libsop-java-java sop-java/build/libs/sop-java-*testfixtures.jar /usr/share/java