From 22344ac073dcbaa7585056d5a15eabdc5df7fae8 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Thu, 3 Dec 2015 05:24:55 -0500 Subject: jlex: add new package to [pcr] --- pcr/jlex/PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pcr/jlex/PKGBUILD diff --git a/pcr/jlex/PKGBUILD b/pcr/jlex/PKGBUILD new file mode 100644 index 000000000..4113d54ae --- /dev/null +++ b/pcr/jlex/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Omar Vega Ramos + +pkgname=jlex +pkgver=1.2.6 +pkgrel=1.parabola1 +pkgdesc="Lex-style lexical analyser generator for Java" +arch=('any') +license=('custom') +url="http://www.cs.princeton.edu/~appel/modern/java/JLex/" +depends=('java-runtime') +makedepends=('java-environment' 'jh') +source=("http://www.cs.princeton.edu/~appel/modern/java/JLex/Archive/1.2.6/Main.java" + "http://www.cs.princeton.edu/~appel/modern/java/JLex/current/sample.lex") +md5sums=('fe0cff5db3e2f0f5d67a153cf6c783af' + 'ae887758b2657981d023a72a165da830') + +prepare() { + cd ${srcdir} + mkdir -p build/classes + head -167 Main.java | tail -21 > LICENSE.txt +} + +build() { + cd ${srcdir} + javac -d "build/classes" Main.java + javadoc -d "build/javadoc" Main.java + + jar -cvfe JLex.jar JLex.Main -C "build/classes" . +} + +package() { + cd ${srcdir} + + # 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}" + cp -r "sample.lex" "${pkgdir}/usr/share/doc/${pkgname}/examples" + + # Install jar file + install -Dm644 JLex.jar "${pkgdir}/usr/share/java/JLex.jar" + + ln -s "/usr/share/java/JLex.jar" \ + "${pkgdir}/usr/share/java/JLex-${pkgver}.jar" +} -- cgit v1.2.3-54-g00ecf