File: rules

package info (click to toggle)
testng 5.11%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,320 kB
  • sloc: java: 48,417; xml: 3,234; makefile: 50; sh: 13
file content (67 lines) | stat: -rwxr-xr-x 2,068 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
#!/usr/bin/make -f

-include /usr/share/quilt/quilt.make
-include /usr/share/topgit/tg2quilt.mk

DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)

JAVA_HOME := /usr/lib/jvm/default-java/


DEB_JARS 	:= ant ant-launcher ant-junit ant-trax ant-nodeps com-sun-javadoc

DEB_CLASSPATH = $(shell for jar in $(DEB_JARS:%=/usr/share/java/%.jar); do \
				echo -n $${jar}:; done; \
				echo -n $(JAVA_HOME)/lib/tools.jar)

VERSION		:= $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 | cut -d- -f1 | cut -d+ -f1)
ANT_ARGS	:= -propertyfile debian/ant.properties -Dtestng.version=$(VERSION)
ANT			:= $(JAVA_HOME)/bin/java -classpath $(DEB_CLASSPATH) \
				org.apache.tools.ant.Main $(ANT_ARGS)

PKG			:= testng
INSTALL_DIR	:= $(CURDIR)/debian/$(PKG)
JAVA_LIB_DIR := $(INSTALL_DIR)/usr/share/java

build: build-stamp
build-stamp:
	dh build
	touch build-stamp

override_dh_auto_build:
	$(ANT) dist-maven-bundle
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	$(ANT) test-15 test-15-jdk14 test-ant
endif

clean:
	dh clean
	rm -f build-stamp install-stamp
	$(ANT) clean
	rm -rf javadocs test-output build test/ant/build test/ant/test-output

install: build install-stamp
install-stamp:
	dh install --before dh_compress
	dh_compress -X.js
	dh install --remaining
	mh_installpoms -p$(PKG)
	for jdk in 14 15; do \
      install -m 644 $(PKG)-jdk$$jdk.jar $(JAVA_LIB_DIR)/$(PKG)-jdk$$jdk-$(VERSION).jar; \
      ln -s $(PKG)-jdk$$jdk-$(VERSION).jar $(JAVA_LIB_DIR)/$(PKG)-jdk$$jdk.jar; \
	  mh_linkjar -p$(PKG) --classifier=jdk$$jdk build/maven-bundle/pom.xml usr/share/java/$(PKG)-jdk$$jdk-$(VERSION).jar; \
	done
	ln -s $(PKG)-jdk15.jar $(JAVA_LIB_DIR)/$(PKG).jar
	mv $(INSTALL_DIR)-doc/usr/share/doc/$(PKG)-doc/javadocs $(INSTALL_DIR)-doc/usr/share/doc/$(PKG)/api
	mv $(INSTALL_DIR)-doc/usr/share/doc/$(PKG)-doc/examples $(INSTALL_DIR)-doc/usr/share/doc/$(PKG)
	touch install-stamp

binary-arch: install
	dh binary-arch

binary-indep: install
	dh binary-indep

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install