void-packages/srcpkgs/kaitai-struct-compiler/template

26 lines
807 B
Bash

# Template file for 'kaitai-struct-compiler'
pkgname=kaitai-struct-compiler
version=0.10
revision=1
hostmakedepends="unzip"
depends="virtual?java-environment"
short_desc="Compiler for the Kaitai declarative binary format parsing language"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-3.0-or-later"
homepage="http://kaitai.io"
distfiles="https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/${version}/${pkgname}-${version}.zip"
checksum=3d11d6cc46d058afb4680fda2e7195f645ca03b2843501d652a529646e55d16b
pre_install() {
# patch libdir
sed -i 's|lib_dir=.*|lib_dir="/usr/share/java/kaitai-struct-compiler"|g' bin/$pkgname
}
do_install() {
for lib in lib/*.jar; do
vinstall $lib 644 usr/share/java/$pkgname
done
vbin bin/$pkgname
ln -s $pkgname $DESTDIR/usr/bin/ksc
}