summaryrefslogtreecommitdiff
path: root/~lukeshu-closure-compiler/jarjar/PKGBUILD
blob: fb3a1ce248f4e229b62164370fb581ba02a1fcb1 (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
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

pkgname=jarjar
pkgver=1.1
pkgrel=1
pkgdesc="A utility that makes it easy to repackage Java libraries and embed them into your own distribution."
arch=('any')
url="https://code.google.com/p/jarjar/"
license=('Apache2')
depends=('java-runtime')
makedepends=('apache-ant' 'java-asm' 'maven')
source=("http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}-${pkgrel}-any.src.tar.xz")

build() {
  cd "$srcdir/$pkgname"

  ln -s /usr/share/java/asm/asm-3.3.1.jar lib
  ln -s /usr/share/java/asm/asm-commons-3.3.1.jar lib
  ln -s /opt/maven/lib/maven-plugin-api-*.jar lib/maven-plugin-api.jar

  # Define the version
  sed -i "s/snapshot/$pkgver/" build.xml

  # Fix a bug causing an incompatibility with newer versions of ant
  sed -i 's/zipDir(null,/zipDir((java.io.File)null,/' \
      src/main/com/tonicsystems/jarjar/util/AntJarProcessor.java

  ant jar
}

package() {
  cd "$srcdir/$pkgname"
  install -d "$pkgdir/usr/share/java/$pkgname"
  install -D "dist/$pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$pkgname"
  ln -s "$pkgname/$pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$pkgname.jar"
}

md5sums=('4651ff381bc005c658663111e83a0fce')