Date: Saturday, August 20, 2022 @ 19:09:24 Author: felixonmars Revision: 1271118
addpkg: haskell-hstringtemplate 0.8.8-1 Added: haskell-hstringtemplate/ haskell-hstringtemplate/repos/ haskell-hstringtemplate/trunk/ haskell-hstringtemplate/trunk/PKGBUILD ----------+ PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) Added: haskell-hstringtemplate/trunk/PKGBUILD =================================================================== --- haskell-hstringtemplate/trunk/PKGBUILD (rev 0) +++ haskell-hstringtemplate/trunk/PKGBUILD 2022-08-20 19:09:24 UTC (rev 1271118) @@ -0,0 +1,50 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=HStringTemplate +pkgname=haskell-hstringtemplate +pkgver=0.8.8 +pkgrel=1 +pkgdesc="StringTemplate implementation in Haskell." +url="http://hub.darcs.net/sterlingclover/hstringtemplate" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-blaze-builder' 'haskell-old-locale' 'haskell-syb' 'haskell-void') +makedepends=('ghc' 'uusi' 'haskell-hunit' 'haskell-quickcheck' 'haskell-random') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('717df416550bdc62f2070c1a86238efe535b0fa41c5fd708c4f631f927880cd9') + +prepare() { + cd $_hkgname-$pkgver + uusi -d semigroups $_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 --datasubdir=$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 -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}