1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
6 pkgdesc="Command-line interface for Lua"
7 url="https://hslua.org/"
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')
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 \
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
39 runhaskell Setup test --show-details=direct
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