Date: Friday, July 16, 2021 @ 07:12:46 Author: felixonmars Revision: 977560
addpkg: haskell-primitive-addr 0.1.0.2-1 Added: haskell-primitive-addr/ haskell-primitive-addr/repos/ haskell-primitive-addr/trunk/ haskell-primitive-addr/trunk/PKGBUILD ----------+ PKGBUILD | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) Added: haskell-primitive-addr/trunk/PKGBUILD =================================================================== --- haskell-primitive-addr/trunk/PKGBUILD (rev 0) +++ haskell-primitive-addr/trunk/PKGBUILD 2021-07-16 07:12:46 UTC (rev 977560) @@ -0,0 +1,40 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=primitive-addr +pkgname=haskell-primitive-addr +pkgver=0.1.0.2 +pkgrel=1 +pkgdesc="Addresses to unmanaged memory" +url="https://github.com/andrewthad/primitive-addr" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-primitive') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('4281c3a429bc03ab2940d072a6cbd63948bdf2607561456d972ba3ca4db9211b') + +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 +} + +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 +} \ No newline at end of file