upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / hslua-cli / repos / community-x86_64 / PKGBUILD
blobffca4cf7f7bffd5b41fd5dfac726b037b725d249
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=hslua-cli
4 pkgver=1.2.0
5 pkgrel=16
6 pkgdesc="Command-line interface for Lua"
7 url="https://hslua.org/"
8 license=("MIT")
9 arch=('x86_64')
10 depends=('ghc-libs' 'haskell-hslua-core' 'haskell-hslua-marshalling' 'haskell-lua')
11 makedepends=('ghc' 'uusi')
12 source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz")
13 sha256sums=('cec456f5ce0c6a87fc901bfaa45fcd7cf24a95d97718a92fe4d2767c32607869')
15 prepare() {
16   cd $pkgname-$pkgver
17   gen-setup
20 build() {
21   cd $pkgname-$pkgver
23   runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
24     --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
25     --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
26     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
27     --ghc-option='-pie' \
28     -fexecutable
30   runhaskell Setup build $MAKEFLAGS
31   runhaskell Setup register --gen-script
32   runhaskell Setup unregister --gen-script
33   sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
34   sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
37 check() {
38   cd $pkgname-$pkgver
39   runhaskell Setup test --show-details=direct
42 package() {
43   cd $pkgname-$pkgver
45   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
46   install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
47   runhaskell Setup copy --destdir="$pkgdir"
48   install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
49   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE