Date: Wednesday, October 23, 2019 @ 19:00:04 Author: felixonmars Revision: 518772
addpkg: haskell-ordered-containers 0.2.2-1 Added: haskell-ordered-containers/ haskell-ordered-containers/repos/ haskell-ordered-containers/trunk/ haskell-ordered-containers/trunk/PKGBUILD ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Added: haskell-ordered-containers/trunk/PKGBUILD =================================================================== --- haskell-ordered-containers/trunk/PKGBUILD (rev 0) +++ haskell-ordered-containers/trunk/PKGBUILD 2019-10-23 19:00:04 UTC (rev 518772) @@ -0,0 +1,42 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=ordered-containers +pkgname=haskell-ordered-containers +pkgver=0.2.2 +pkgrel=1 +pkgdesc="Set- and Map-like types that remember the order elements were inserted" +url="https://github.com/dmwit/ordered-containers" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('0ec64f5033bd3149126413092cb5514f11635ce7c567fefe073d93b7acef81e385dbc951b23b6ed8605ab6ca6900db6c808c1ac76965ca72b2e62973a9a1e30b') + +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 + 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" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +}