From 5eca8dc9891b25e4c90ed4a5fd7d79e23be45ffb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 14 Jun 2014 19:20:08 -0400 Subject: add java/java-cup --- java/java-cup/PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++ java/java-cup/java-cup.sh | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 java/java-cup/PKGBUILD create mode 100644 java/java-cup/java-cup.sh (limited to 'java') diff --git a/java/java-cup/PKGBUILD b/java/java-cup/PKGBUILD new file mode 100644 index 000000000..97b41e20b --- /dev/null +++ b/java/java-cup/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Luke Shumaker + +pkgname=java-cup +_pkgver=0.10k +pkgver=0.10.k +pkgdesc="LALR parser generator for Java" +url=http://www2.cs.tum.edu/projects/cup/ +license=('custom:MIT') + +pkgrel=1 +arch=('any') +depends=('java-environment') + +source=(http://www2.cs.tum.edu/projects/cup/java_cup_v${_pkgver#*.}.tar.gz java-cup.sh) +md5sums=('8b11edfec13c590ea443d0f0ae0da479' + '2ec9859574d479ee27c71e8b7f978eea') + +prepare() { + cd "$srcdir" + find . -name '*.class' -delete +} + +build() { + cd "$srcdir" + mkdir classes + find java_cup -name '*.java' -exec javac -d classes {} + + jar cfe java_cup.jar java_cup.Main -C classes . +} + +package() { + cd "$srcdir" + + install -Dm644 java_cup.jar "$pkgdir"/usr/share/java/java_cup-${_pkgver}.jar + ln -s java_cup-${_pkgver}.jar "$pkgdir"/usr/share/java/java_cup.jar + + install -Dm755 java-cup.sh "$pkgdir"/usr/bin/java-cup + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + install -d "$pkgdir"/usr/share/doc/$pkgname + install -m644 manual.html cup_logo.gif -t "$pkgdir"/usr/share/doc/$pkgname +} diff --git a/java/java-cup/java-cup.sh b/java/java-cup/java-cup.sh new file mode 100644 index 000000000..b7bf91d14 --- /dev/null +++ b/java/java-cup/java-cup.sh @@ -0,0 +1,2 @@ +#!/bin/sh +java -jar /usr/share/java/java_cup.jar "$@" -- cgit v1.2.3