[arch-commits] Commit in haskell-hasql/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sat Mar 14 22:34:20 UTC 2020


    Date: Saturday, March 14, 2020 @ 22:34:20
  Author: felixonmars
Revision: 597390

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 597389, haskell-hasql/trunk/PKGBUILD)

----------+
 PKGBUILD |   61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Copied: haskell-hasql/repos/community-staging-x86_64/PKGBUILD (from rev 597389, haskell-hasql/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-03-14 22:34:20 UTC (rev 597390)
@@ -0,0 +1,61 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Dziedzic <gostrc at gmail.com>
+
+_hkgname=hasql
+pkgname=haskell-hasql
+pkgver=1.4.1
+pkgrel=5
+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=('e0bdf2c58bea1900bcb567395a1557cb959e532705490ec2727cfcf4cc9b1afbf720e6b8b7cc5dbe1d1d3e6b2be5f0573fe6c7a04884d848dbbf89b17097a9c8')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i '/import Prelude/a import Data.List (List)' profiling/Main.hs
+    sed -i '/import Main.Prelude/a import Data.Bifunctor (mapLeft)' tasty/Main/DSL.hs
+
+    # Do not use default postgres port
+    sed -i 's/5432/9824/' tasty/Main/*.hs threads-test/*.hs profiling/*.hs
+}
+
+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)
+    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
+}



More information about the arch-commits mailing list