diff --git a/arch/license-tool-hs/PKGBUILD b/arch/license-tool-hs/PKGBUILD new file mode 100644 index 0000000..ca3b3f5 --- /dev/null +++ b/arch/license-tool-hs/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Alexander Rosenberg + +pkgname='license-tool-hs' +pkgver=4 +pkgrel=1 +pkgdesc='A simple tool for creating LICENSE files' +url='https://git.zander.im/Zander671/license-tool-hs' +arch=('x86_64') +license=('GPL3') +# Actually, depend on stack, ghc, etc. but no packages for (some of) them +depends=() +conflicts=('license-tool') +provides=('license-tool') +source=('git+https://git.zander.im/Zander671/license-tool-hs.git') +sha256sums=('SKIP') + +pkgver(){ + cd "$pkgname" + git rev-list --count HEAD +} + +build() { + cd "$pkgname" + stack build +} + +package() { + export STACK_YAML="$pkgname/stack.yaml" + stack --local-bin-path "$pkgdir/usr/bin/" build --copy-bins + install -m 0644 -D "$pkgname/completion/license-tool.zsh" \ + "$pkgdir/usr/share/zsh/site-functions/_license-tool" + mkdir -p "$pkgdir/usr/share/" + cp -r "$pkgname/licenses" "$pkgdir/usr/share/license-tool" +}