diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2016-05-19 06:18:03 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2016-05-19 06:18:03 -0500 |
commit | efe9dbcdecf2761681ef03b7dbd02f75a2b7c2d8 (patch) | |
tree | 5d2351f7eae63f74a6cf271ad01b156c5771a0b9 | |
parent | 778aba6720650870cb9f20b7b2ee9830863399fa (diff) |
args4j: add new package to [pcr] (required by closure-compiler)
-rw-r--r-- | pcr/args4j/PKGBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pcr/args4j/PKGBUILD b/pcr/args4j/PKGBUILD new file mode 100644 index 000000000..1be7f8087 --- /dev/null +++ b/pcr/args4j/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +pkgname=args4j +pkgver=2.33 +pkgrel=1 +pkgdesc="Java command line options parser" +arch=('any') +url="http://code.google.com/p/protobuf/" +license=('MIT') +depends=('java-runtime') +makedepends=('java-environment' 'jh') +source=("https://github.com/kohsuke/${pkgname}/archive/${pkgname}-site-${pkgver}.tar.gz") +sha256sums=('b4305ca1ff31d3492dd93770f302242c2bf536b440bca24b2580646b184a3733') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgname}-site-${pkgver}/${pkgname}" + mkdir -p build/classes +} + +build() { + cd "${srcdir}/${pkgname}-${pkgname}-site-${pkgver}/${pkgname}" + + javac -d "build/classes" \ + $(find src -name \*.java) + + javadoc -d "build/javadoc" \ + -sourcepath src -subpackages org + + jar -cvf "${pkgname}.jar" -C "build/classes" . +} + +package() { + cd "${srcdir}/${pkgname}-${pkgname}-site-${pkgver}/${pkgname}" + + # Install license file + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" + + # Install documentation + install -d "${pkgdir}/usr/share/doc/${pkgname}" + cp -r "build/javadoc" "${pkgdir}/usr/share/doc/${pkgname}" + + # Install Maven artifacts + export DESTDIR=${pkgdir} + jh mvn-install ${pkgname} ${pkgname} ${pkgver} \ + pom.xml \ + "${pkgname}.jar" \ + "${pkgname}-${pkgver}.jar" + + ln -s "/usr/share/java/${pkgname}-${pkgver}.jar" \ + "${pkgdir}/usr/share/java/${pkgname}.jar" +} |