aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-07-06 12:41:25 +0200
committerMattias Andrée <maandree@operamail.com>2012-07-06 12:41:25 +0200
commita35efbe7f5558442fddbbd0e3e49955a01b9dccc (patch)
tree427e755177942045a66e8ed492cc25fd7dff3457
parentfirst commit (diff)
downloadaur-packages-a35efbe7f5558442fddbbd0e3e49955a01b9dccc.tar.gz
aur-packages-a35efbe7f5558442fddbbd0e3e49955a01b9dccc.tar.bz2
aur-packages-a35efbe7f5558442fddbbd0e3e49955a01b9dccc.tar.xz
xz-java (git)
Diffstat (limited to '')
-rw-r--r--xz-java-git/PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/xz-java-git/PKGBUILD b/xz-java-git/PKGBUILD
new file mode 100644
index 0000000..5dd26fc
--- /dev/null
+++ b/xz-java-git/PKGBUILD
@@ -0,0 +1,51 @@
+# This is an example PKGBUILD file. Use this as a start to creating your own,
+# and remove these comments. For more information, see 'man PKGBUILD'.
+# NOTE: Please fill out the license field for your package! If it is unknown,
+# then please put 'unknown'.
+
+# See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
+# for more information on packaging from GIT sources.
+
+# Maintainer: Mattias Andrée <maandree@operamail.com>
+pkgname=xz-java-git
+pkgver=20120706
+pkgrel=2
+pkgdesc="Java library for XZ and LZMA compression"
+arch=('any')
+url="http://tukaani.org/xz/java.html"
+license=('Public Domain')
+depends=('java-runtime>=1.4')
+makedepends=('git' 'java-environment>=1.4')
+provides=('xz-java')
+conflicts=('xz-java')
+
+_gitroot=http://git.tukaani.org/xz-java.git
+_gitname=xz-java
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [[ -d "$_gitname" ]]; then
+ cd "$_gitname" && git pull origin
+ msg "The local files are updated."
+ else
+ git clone "$_gitroot" "$_gitname"
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting build..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ javac -source 1.4 -target 1.4 -d . -s src -cp . $(find src | grep \\.java\$)
+ jar -cf xz-java.jar $(find . | grep \\.class\$)
+}
+
+package() {
+ cd "$srcdir/$_gitname-build"
+ install -d "$pkgdir/usr/lib/"
+ install -m 755 xz-java.jar "$pkgdir/usr/lib/"
+}