Date: Wednesday, November 27, 2019 @ 06:37:37 Author: felixonmars Revision: 533849
archrelease: copy trunk to community-staging-x86_64 Added: haskell-hasql/repos/community-staging-x86_64/ haskell-hasql/repos/community-staging-x86_64/PKGBUILD (from rev 533848, haskell-hasql/trunk/PKGBUILD) ----------+ PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) Copied: haskell-hasql/repos/community-staging-x86_64/PKGBUILD (from rev 533848, haskell-hasql/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2019-11-27 06:37:37 UTC (rev 533849) @@ -0,0 +1,52 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Thomas Dziedzic <gos...@gmail.com> + +_hkgname=hasql +pkgname=haskell-hasql +pkgver=1.4 +pkgrel=27 +pkgdesc="An efficient PostgreSQL driver and a flexible mapping API" +url="https://github.com/nikita-volkov/hasql" +license=('MIT') +arch=('x86_64') +depends=('ghc-libs' 'haskell-attoparsec' 'haskell-base-prelude' 'haskell-bytestring-strict-builder' + 'haskell-contravariant' 'haskell-contravariant-extras' 'haskell-dlist' 'haskell-hashable' + 'haskell-hashtables' 'haskell-loch-th' 'haskell-placeholders' 'haskell-postgresql-binary' + 'haskell-postgresql-libpq' 'haskell-profunctors' 'haskell-text-builder' 'haskell-vector') +makedepends=('ghc' 'haskell-bug' 'haskell-tasty' 'haskell-tasty-quickcheck' 'haskell-tasty-hunit' + 'haskell-quickcheck-instances' 'haskell-quickcheck' 'haskell-rebase' 'haskell-rerebase') +checkdepends=('postgresql' 'pifpaf') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('c9587fa14052e8b7c449d94cb6b319c41eecf4892ce7f6def1c187bfbca6ca03f389d01da50c7acf0e672855b51f6e833b84a72ec7f6a3e3f4a4a237c7e6fb5a') + +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 + + eval $(pifpaf run postgresql --host 127.0.0.1 --port 5432) + createuser -s postgres + runhaskell Setup test + pifpaf_stop +} + +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" +}