summaryrefslogtreecommitdiff
path: root/pcr/jlex
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-12-03 05:24:55 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-12-03 05:24:55 -0500
commit22344ac073dcbaa7585056d5a15eabdc5df7fae8 (patch)
tree155070544006b5096851108490be148facd1c5a5 /pcr/jlex
parentadff2ac56891fb107dc025f26d501a35281e1f13 (diff)
downloadabslibre-22344ac073dcbaa7585056d5a15eabdc5df7fae8.tar.gz
abslibre-22344ac073dcbaa7585056d5a15eabdc5df7fae8.tar.bz2
abslibre-22344ac073dcbaa7585056d5a15eabdc5df7fae8.zip
jlex: add new package to [pcr]
Diffstat (limited to 'pcr/jlex')
-rw-r--r--pcr/jlex/PKGBUILD47
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"
+}