Date: Monday, January 25, 2021 @ 18:23:53 Author: felixonmars Revision: 829740
addpkg: haskell-with-utf8 1.0.2.1-1 Added: haskell-with-utf8/ haskell-with-utf8/repos/ haskell-with-utf8/trunk/ haskell-with-utf8/trunk/PKGBUILD ----------+ PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) Added: haskell-with-utf8/trunk/PKGBUILD =================================================================== --- haskell-with-utf8/trunk/PKGBUILD (rev 0) +++ haskell-with-utf8/trunk/PKGBUILD 2021-01-25 18:23:53 UTC (rev 829740) @@ -0,0 +1,50 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=with-utf8 +pkgname=haskell-with-utf8 +pkgver=1.0.2.1 +pkgrel=1 +pkgdesc="Get your IO right on the first try" +url="https://github.com/serokell/haskell-with-utf8#readme" +license=("MPL2") +arch=('x86_64') +depends=('ghc-libs' 'haskell-safe-exceptions' 'haskell-th-env') +makedepends=('ghc' 'uusi' 'haskell-hunit' 'haskell-hedgehog' 'haskell-tasty' 'haskell-tasty-discover' + 'haskell-tasty-hedgehog' 'haskell-tasty-hunit' 'haskell-temporary') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('2e2e7c1ef0b9f0c8411ea1cb54e0813726a10a4fd6f395b88bdcb50b2b74f18f') + +prepare() { + cd $_hkgname-$pkgver + gen-setup +} + +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" + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSES/MPL-2.0.txt +}