diff options
author | courk | 2017-01-20 15:58:51 +0100 |
---|---|---|
committer | courk | 2017-01-20 15:58:51 +0100 |
commit | c2133fba45df288e86c290c135915f653817e03f (patch) | |
tree | 015769d08900f980df1eb964dbc0583a3a41872f | |
parent | d6d00febdbb4d31aea3f9a0dee4875722d3bdf9d (diff) | |
download | aur-c2133fba45df288e86c290c135915f653817e03f.tar.gz |
Use patch to fix kaitai-struct-compiler path
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 01-fix_lib_dir.patch | 12 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rwxr-xr-x | kaitai-struct-compiler | 12 |
4 files changed, 24 insertions, 20 deletions
@@ -1,15 +1,15 @@ pkgbase = kaitai-struct-compiler pkgdesc = Kaitai Struct Compiler: Compiler for the Kaitai declarative binary format parsing language pkgver = 0.5 - pkgrel = 1 + pkgrel = 2 url = http://kaitai.io/ arch = any license = GPL3 depends = java-runtime source = kaitai-struct-compiler-0.5.zip::https://bintray.com/kaitai-io/universal/download_file?file_path=0.5%2Fkaitai-struct-compiler-0.5.zip - source = kaitai-struct-compiler + source = 01-fix_lib_dir.patch sha1sums = 2df2f889233df6856ed98f0ab453bafe8c736512 - sha1sums = 834551bc7e7b4ef645614a6a0d24c550a46dde74 + sha1sums = 48c0e5d2682c61d4cea023d19882eb92c191cc1a pkgname = kaitai-struct-compiler diff --git a/01-fix_lib_dir.patch b/01-fix_lib_dir.patch new file mode 100644 index 000000000000..4ec875b6cf64 --- /dev/null +++ b/01-fix_lib_dir.patch @@ -0,0 +1,12 @@ +diff -aur kaitai-struct-compiler-0.5.pristine/bin/kaitai-struct-compiler kaitai-struct-compiler-0.5.new/bin/kaitai-struct-compiler +--- kaitai-struct-compiler-0.5.pristine/bin/kaitai-struct-compiler 2017-01-20 15:48:53.379117710 +0100 ++++ kaitai-struct-compiler-0.5.new/bin/kaitai-struct-compiler 2017-01-20 15:50:03.335780612 +0100 +@@ -332,7 +332,7 @@ + declare -r real_script_path="$(realpath "$0")" + declare -r app_home="$(realpath "$(dirname "$real_script_path")")" + # TODO - Check whether this is ok in cygwin... +-declare -r lib_dir="$(realpath "${app_home}/../lib")" ++declare -r lib_dir="/usr/share/java/kaitai-struct-compiler" + declare -a app_mainclass=("io.kaitai.struct.Main") + + declare -r script_conf_file="${app_home}/../conf/application.ini" @@ -1,16 +1,21 @@ # Maintainer: courk <courk at courk dot fr> pkgname=kaitai-struct-compiler pkgver=0.5 -pkgrel=1 +pkgrel=2 pkgdesc="Kaitai Struct Compiler: Compiler for the Kaitai declarative binary format parsing language" arch=(any) url="http://kaitai.io/" license=('GPL3') depends=("java-runtime") optdepends=() -source=("$pkgname-$pkgver.zip::https://bintray.com/kaitai-io/universal/download_file?file_path=$pkgver%2F$pkgname-$pkgver.zip" "kaitai-struct-compiler") +source=("$pkgname-$pkgver.zip::https://bintray.com/kaitai-io/universal/download_file?file_path=$pkgver%2F$pkgname-$pkgver.zip" "01-fix_lib_dir.patch") sha1sums=("2df2f889233df6856ed98f0ab453bafe8c736512" - "834551bc7e7b4ef645614a6a0d24c550a46dde74") + "48c0e5d2682c61d4cea023d19882eb92c191cc1a") + +prepare() { + cd $pkgname-$pkgver + patch -Np1 -i "${srcdir}/01-fix_lib_dir.patch" +} package() { cd "$srcdir/$pkgname-$pkgver/lib/" @@ -18,8 +23,7 @@ package() { do install -D -m 644 "$f" "$pkgdir/usr/share/java/$pkgname/$f" done - cd "$srcdir" - install -D -m 755 "kaitai-struct-compiler" "$pkgdir/usr/bin/kaitai-struct-compiler" + install -D -m 755 "$srcdir/$pkgname-$pkgver/bin/kaitai-struct-compiler" "$pkgdir/usr/bin/kaitai-struct-compiler" } # vim:set ts=2 sw=2 et: diff --git a/kaitai-struct-compiler b/kaitai-struct-compiler deleted file mode 100755 index bb13512569d7..000000000000 --- a/kaitai-struct-compiler +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -LIBS=/usr/share/java/kaitai-struct-compiler/* -LIBS_STR="" - -for f in $LIBS -do - LIBS_STR="$LIBS_STR:$f" -done - -java -cp "$LIBS_STR" io.kaitai.struct.Main "$@" - |