blob: 25d5d60ad8a0e0d471aaaef8e0afeb0b3a17759a (
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
|
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
pkgname=closure-compiler
pkgver=20130603
pkgdesc="A JavaScript optimizing compiler."
url="https://code.google.com/closure/compiler/"
license=('Apache2')
pkgrel=1
arch=('any')
depends=('java-runtime' 'sh')
makedepends=(
'apache-ant'
#'java-args4j' # does not exist
#'google-caja' # does not exist
#'java-guava' # does not build
'java-jarjar'
'java-json'
#'java-jsr305' # does not exist
'junit'
#'java-protobuf' # does not build
# maven-ant-tasks
'jh')
source=("libre://$pkgname-$pkgver.tar.gz" 'closure-compiler.sh')
mksource=("$pkgname-$pkgver::git+https://code.google.com/p/closure-compiler/#tag=v${pkgver}")
mkmd5sums=('SKIP')
build() {
cd "$srcdir/$pkgname-$pkgver"
ln -sf /opt/apache-ant/lib/ant.jar lib/ant.jar
ln -sf /opt/apache-ant/lib/ant-launcher.jar lib/ant-launcher.jar
#ln -sf /usr/share/java/args4.jar lib/args4j.jar
#ln -sf /usr/share/java/caja-r4314.jar lib/caja-r4314.jar
#ln -sf /usr/share/java/guava.jar lib/guava.jar
ln -sf /usr/share/java/jarjar.jar lib/jarjar.jar
ln -sf /usr/share/java/json.jar lib/json.jar
#ln -sf /usr/share/java/jsr305.jar lib/jsr305.jar
ln -sf /usr/share/java/junit.jar lib/junit.jar
#ln -sf /usr/share/java/protobuf.jar lib/protobuf-java.jar
#ln -sf /... tools/maven-ant-tasks-2.1.3.jar
sed -i "
/<target name=\"relversion\">/,/<\/target>/ {
s/executable=\"git\"/executable=\"echo\"/
/<arg/d
/<\/exec>/i<arg value=\"v${pkgver}\" />
}" build.xml
ant jar pom
}
package() {
cd "$srcdir"
install -Dm755 closure-compiler.sh "$pkgdir"/usr/bin/closure-compiler
cd "$srcdir/$pkgname-$pkgver"
DESTDIR="$pkgdir" jh mvn-install \
com.google.javascript closure-compiler v${pkgver} \
build/pom.xml build/compiler.jar \
closure-compiler.jar
}
md5sums=('00b89084401b9550166a1f1294f9ba39'
'd4ead4585fcc7039d3c32eb5c4491bb9')
|