aboutsummaryrefslogtreecommitdiffstats
path: root/testing/java-jtharness/APKBUILD
blob: 605fe07c14420861e7d30d92feca5b84726284f0 (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
# Contributor: Simon Frankenberger <simon-alpine@fraho.eu>
# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
pkgname=java-jtharness
pkgver=5.0
pkgrel=0
pkgdesc="The JT harness is a general purpose, fully-featured, flexible, and configurable test harness"
url="http://hg.openjdk.java.net/code-tools/jtharness"
arch="noarch"
license="GPL-2.0"
makedepends="openjdk8"
options="!check" # this package has no tests
subpackages="$pkgname-doc:_doc $pkgname-examples:_examples"
source="jtharness-$pkgver.tar.bz2::http://hg.openjdk.java.net/code-tools/jtharness/archive/jt$pkgver.tar.bz2
http://ftp-stud.hs-esslingen.de/pub/Mirrors//ftp.apache.org/dist/ant/binaries/apache-ant-1.9.13-bin.zip
http://central.maven.org/maven2/asm/asm-all/3.1/asm-all-3.1.jar
http://central.maven.org/maven2/junit/junit/4.4/junit-4.4.jar
http://central.maven.org/maven2/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar

source-target.patch
"
builddir="$srcdir/jtharness-jt$pkgver"

_ant_home="$srcdir"/apache-ant-1.9.13/
_servletjar="$srcdir"/javax.servlet-api-3.0.1.jar
_bytecodelib="$srcdir"/asm-all-3.1.jar
_junitlib="$srcdir"/junit-4.4.jar

prepare() {
	default_prepare

	cd "$builddir/build"
	# configure the libraries
	sed -i \
		-e "s@^servletjar.\+@servletjar = $_servletjar@" \
		-e "s@^bytecodelib.\+@bytecodelib = $_bytecodelib@" \
		-e "s@^junitlib.\+@junitlib = $_junitlib@" \
		-e "s@^BUILD_DIR.\+@BUILD_DIR = $builddir/target@" \
		local.properties
}

build() {
	cd "$builddir/build"
	$_ant_home/bin/ant
}

package() {
	_destdir="$pkgdir/usr/share/java/jtharness"
	mkdir -p "$_destdir"
	cp -r \
		$builddir/target/binaries/legal \
		$builddir/target/binaries/lib \
		"$_destdir"
}

_examples() {
	_destdir="$subpkgdir/usr/share/java/jtharness"
	mkdir -p "$_destdir"
	cp -r $builddir/target/binaries/examples "$_destdir"
}

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

sha512sums="f4cbf815e90c5fadd7af8f68fd0cc9ee9ebf67fefd7cb8c0dff845b1954d0126dc55a593c3d6e3b46c7865dac3f4821e97f1bed542c374b2ee54347e00063acf  jtharness-5.0.tar.bz2
873062cf789e1572ec4ef3cdbb15c0d3a57e5a0794068591565367d4cec15b9f9a24f59734a85170d61b23eb9288d6bafd35a9ae2b015b09c7a175e344cb4e1c  apache-ant-1.9.13-bin.zip
00990aa9d39fe874f6799dc8d9d1b208b61e6358a949df86014edeacbea63dcdc4ac7870948a54270e1db4b8ec134313b200fe7cdede7aa6746c812c36f0ac13  asm-all-3.1.jar
4ae9fb09ebd9800ba1c9f0bfc43f07f7bc499e41894dea74b50f01fd69690b5d4e8f7949e2afce10fa0da719e8a2df223430e3aef7e2529662c7b70a12c80ab9  junit-4.4.jar
1e087f1e4632048f1c6ea12e3820a30c7a6e66b13277ec8e784d8c5aba99335cd90cdb08e23756e815324cc9c8dc22d0937c7ccf4b89ee00222cd5e4a1d2a0de  javax.servlet-api-3.0.1.jar
ea27ff0a469df11179b3f2d6b0a78f94cc76959d42cde22a7043ffb557f93a3b8f905b50df41f40c7b82b5c77348875d32a93bd268e758d9ef0496b904ca9ec3  source-target.patch"