Date: Saturday, February 11, 2023 @ 00:15:26 Author: felixonmars Revision: 1399724
addpkg: haskell-s-cargot 0.1.5.0-1 Added: haskell-s-cargot/ haskell-s-cargot/repos/ haskell-s-cargot/trunk/ haskell-s-cargot/trunk/PKGBUILD ----------+ PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) Added: haskell-s-cargot/trunk/PKGBUILD =================================================================== --- haskell-s-cargot/trunk/PKGBUILD (rev 0) +++ haskell-s-cargot/trunk/PKGBUILD 2023-02-11 00:15:26 UTC (rev 1399724) @@ -0,0 +1,46 @@ +# Maintainer: Felix Yan <[email protected]> + +_hkgname=s-cargot +pkgname=haskell-s-cargot +pkgver=0.1.5.0 +pkgrel=1 +pkgdesc="A flexible, extensible s-expression library." +url="https://github.com/aisamanra/s-cargot" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc' 'haskell-hunit' 'haskell-quickcheck') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('e10bf998700663904b479cdf2985b174e98e9983f78537f819ce326b5c86c21b') + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' \ + -f-build-example + + 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 -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}
