Date: Friday, August 21, 2020 @ 16:18:04 Author: felixonmars Revision: 686289
addpkg: haskell-shellmet 0.0.3.1-3 Added: haskell-shellmet/ haskell-shellmet/repos/ haskell-shellmet/trunk/ haskell-shellmet/trunk/PKGBUILD ----------+ PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) Added: haskell-shellmet/trunk/PKGBUILD =================================================================== --- haskell-shellmet/trunk/PKGBUILD (rev 0) +++ haskell-shellmet/trunk/PKGBUILD 2020-08-21 16:18:04 UTC (rev 686289) @@ -0,0 +1,52 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: berberman <hat...@typed.icu> + +_hkgname=shellmet +pkgname=haskell-shellmet +pkgver=0.0.3.1 +pkgrel=3 +pkgdesc="Shellmet provides easy and convenient way to call shell commands from Haskell programs." +url="https://github.com/kowainik/shellmet" +license=('MPL2') +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc' 'haskell-doctest' 'haskell-glob') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('b9f084f47a6ae711b1e505e2f90d8d202d94f62950be98ceafc668b306473b25') + +prepare(){ + cd $_hkgname-$pkgver + echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs + sed -i '/executable readme/a\ buildable: False' $_hkgname.cabal +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' + + runhaskell Setup build + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test +} + +package() { + cd $_hkgname-$pkgver + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +}