summaryrefslogtreecommitdiff
path: root/libre/clojure/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/clojure/PKGBUILD')
-rw-r--r--libre/clojure/PKGBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/libre/clojure/PKGBUILD b/libre/clojure/PKGBUILD
new file mode 100644
index 000000000..203c6792e
--- /dev/null
+++ b/libre/clojure/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=clojure
+pkgver=1.7.0
+pkgrel=1.parabola1
+pkgdesc='LISP for the JVM'
+url='http://clojure.org/'
+arch=('any')
+license=('EPL')
+depends=('java-environment' 'bash')
+makedepends=('apache-ant' 'classpath' 'git' 'java-asm' 'jh')
+optdepends=('rlwrap: friendlier shell with readline support')
+install='clojure.install'
+source=("$pkgname::git://github.com/clojure/clojure.git#tag=$pkgname-$pkgver"
+ 'clojure-replace_asm.patch'
+ 'LICENSE.txt'
+ 'clj.sh' "$pkgname.sh")
+sha256sums=('SKIP'
+ 'b04cd1381bc78e40271fc18a1ec7d8e45f630a12fdafe571ace746c3426fb003'
+ '9bcd4c6eac491d1c9bbade5b35182a778fc7e08021de30edc387ac2adce75035'
+ '2194819fd417174351172d94e3ccff050479401ca883b57d325a349072200bee'
+ 'b3fa6257dad10fb39851e87563269b80b2473623126595d9c279bbd90e97f052')
+
+prepare() {
+ cd "$pkgname"
+ rm -rv "src/jvm/clojure/asm"
+ patch -Np1 -i ../clojure-replace_asm.patch
+}
+
+build() {
+ cd "$pkgname"
+
+ ant jar javadoc
+}
+
+package() {
+ cd "$pkgname"
+ # Install license file
+ install -Dm644 "${srcdir}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "target/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install "org.${pkgname}" ${pkgname} ${pkgver} \
+ "pom.xml" \
+ "${pkgname}-${pkgver}.jar" \
+ "${pkgname}.jar"
+
+ ln -s "/usr/share/java/${pkgname}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar"
+
+ install -Dm755 "${srcdir}/clj.sh" "$pkgdir/usr/bin/clj"
+ install -Dm755 "${srcdir}/clj.sh" "$pkgdir/usr/bin/clojure"
+ install -Dm755 "${srcdir}/$pkgname.sh" "$pkgdir/etc/profile.d/$pkgname.sh"
+}