diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-12-03 05:24:55 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-12-03 05:24:55 -0500 |
commit | 22344ac073dcbaa7585056d5a15eabdc5df7fae8 (patch) | |
tree | 155070544006b5096851108490be148facd1c5a5 | |
parent | adff2ac56891fb107dc025f26d501a35281e1f13 (diff) |
jlex: add new package to [pcr]
-rw-r--r-- | pcr/jlex/PKGBUILD | 47 |
1 files changed, 47 insertions, 0 deletions
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 <ovruni@gnu.org.pe> + +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" +} |