Date: Sunday, August 21, 2022 @ 07:18:11 Author: felixonmars Revision: 1271609
archrelease: copy trunk to community-x86_64 Added: haskell-prim-uniq/repos/community-x86_64/ haskell-prim-uniq/repos/community-x86_64/PKGBUILD (from rev 1271608, haskell-prim-uniq/trunk/PKGBUILD) ----------+ PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) Copied: haskell-prim-uniq/repos/community-x86_64/PKGBUILD (from rev 1271608, haskell-prim-uniq/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2022-08-21 07:18:11 UTC (rev 1271609) @@ -0,0 +1,43 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=prim-uniq +pkgname=haskell-prim-uniq +pkgver=0.2 +pkgrel=1 +pkgdesc="Opaque unique identifiers in primitive state monads" +url="https://github.com/obsidiansystems/prim-uniq" +license=("custom:PublicDomain") +arch=('x86_64') +depends=('ghc-libs' 'haskell-dependent-sum' 'haskell-primitive') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('bbadfebdc4def5cc8a9db3458df710c45f2b4e72ee5d2e6c42562b77c7a6f2d0') + +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" +}