aboutsummaryrefslogtreecommitdiffstats
path: root/testing/java-jtreg/APKBUILD
blob: 02224818686a5e584b179f00afbf92851a473cf5 (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Contributor: Simon Frankenberger <simon-alpine@fraho.eu>
# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
pkgname=java-jtreg
pkgver=5.0_p01
_pkgver=${pkgver/_p/-b}
pkgrel=0
pkgdesc="jtreg is the test harness used by the JDK test framework"
url="https://hg.openjdk.java.net/code-tools/jtreg"
arch="noarch"
license="GPL-2.0"
depends="java-jtharness java-asmtools"
makedepends="openjdk8 zip"
options="!check" # the tests require an X11 or VNC display
#subpackages="$pkgname-doc:_doc $pkgname-examples:_examples"
source="jtreg-$_pkgver.tar.bz2::https://hg.openjdk.java.net/code-tools/jtreg/archive/jtreg$_pkgver.tar.bz2
https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.13-bin.tar.bz2
https://repo1.maven.org/maven2/junit/junit/4.10/junit-4.10.jar
https://repo1.maven.org/maven2/org/testng/testng/6.9.5/testng-6.9.5.jar
https://repo1.maven.org/maven2/com/beust/jcommander/1.72/jcommander-1.72.jar

jtreg-symlink-patch.txt
jtdiff-symlink-patch.txt
disable-gcc-error.patch
"
builddir="$srcdir/jtreg-jtreg$_pkgver"

build() {
	cd "$builddir"

	mkdir -p "$builddir"/build
	make JTHARNESS_HOME=/usr/share/java/jtharness \
		ANTHOME="$srcdir"/apache-ant-1.9.13 \
		ASMTOOLS_HOME=/usr/share/java/asmtools \
		JDKHOME=/usr/lib/jvm/default-jvm \
		JUNIT_HOME="$srcdir" \
		TESTNG_HOME="$srcdir" \
		JCOMMANDER_JAR="$srcdir"/jcommander-1.72.jar \
		TOUCH=/bin/touch \
		-C make
}

package() {
	_destdir="$pkgdir/usr/share/java/jtreg"
	mkdir -p "$_destdir"
	cp -r \
		$builddir/build/images/jtreg/bin\
		$builddir/build/images/jtreg/legal \
		$builddir/build/images/jtreg/lib \
		$builddir/build/images/jtreg/COPYRIGHT \
		$builddir/build/images/jtreg/LICENSE \
		$builddir/build/images/jtreg/README \
		$builddir/build/images/jtreg/release \
		"$_destdir"

	# link to jtharness and asmtools from depends
	rm "$_destdir"/lib/asmtools.jar
	rm "$_destdir"/lib/javatest.jar
	ln -s /usr/share/java/asmtools/lib/asmtools.jar  "$_destdir"/lib/asmtools.jar
	ln -s /usr/share/java/jtharness/lib/javatest.jar "$_destdir"/lib/javatest.jar

	# patch the jtreg executable script to handle symlink from /usr/bin
	cd "$pkgdir"
	patch -p1 -i "$srcdir"/jtreg-symlink-patch.txt
	patch -p1 -i "$srcdir"/jtdiff-symlink-patch.txt

	mkdir -p "$pkgdir/usr/bin"
	ln -s /usr/share/java/jtreg/bin/jtdiff "$pkgdir"/usr/bin/jtdiff
	ln -s /usr/share/java/jtreg/bin/jtreg  "$pkgdir"/usr/bin/jtreg
}

_doc() {
	_destdir="$subpkgdir/usr/share/java/jtreg"
	mkdir -p "$_destdir"
	cp -r \
		$builddir/target/binaries/doc \
		"$_destdir"
}

sha512sums="1e78df0e4b23688bf92a67f86efa759f0a3399ae7adea5b5a8d26a0e0385fea3033a127d32e256694040aa157267b40ea9bd7a4df76af901ee945b3a2e26dbcb  jtreg-5.0-b01.tar.bz2
e9b602aacbac7bf721a830f56ea06cde60a7a674a6d67f05ce82848ac01b2ee84f7003190286fea1030abb523398fa1a280d265377f41f57e7cf7e6d1fe37465  apache-ant-1.9.13-bin.tar.bz2
2c8b595c24a5ad2499a5bd5bb01204453cd09f51308fea5834922e042b8f39bd8ef0099848eb3a8576ddc4ce4ec907181ba0c20f1222a25b3064d1c3c5499cbd  junit-4.10.jar
15a6d6a3c29e6212d18c299e905620ff743825029129ce44d70cadbff589873bfc983f79b9a50052b85b03c8dac25ef5cf9de1628e10db980a4ac94c66173475  testng-6.9.5.jar
2da86589ff7ecbb53cfce845887155bca7400ecf2fdfdef7113ea03926a195a1cbcf0c071271df6bedc5cdfa185c6576f67810f6957cd9b60ab3600a4545420e  jcommander-1.72.jar
c12bb37a378bf15a2d73b3bd4aadf122dfb60860dda640cb909d62517cb13e7471f76d849598aacb88ef73a119cb45eb1c52165b98faa3dca112ab9f528e2f55  jtreg-symlink-patch.txt
67f63317a2aaedd17e822389065ff5d86d574f4cb2e2af375856a9c7356dd048c396517372788b889db376fe4aa73c66d530938b8975d11d7714ac84e3dcd00d  jtdiff-symlink-patch.txt
6ff4b114ae60257250545300d54e4beb1a6c4e1bd28fc8838479ee4b2c0ed1b0123aac36ff38abfc741f680795e6be2744ff637f3e5a5f655ba38aef1a1d4c80  disable-gcc-error.patch"