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

Felix Yan felixonmars at archlinux.org
Sat May 22 04:11:36 UTC 2021


    Date: Saturday, May 22, 2021 @ 04:11:35
  Author: felixonmars
Revision: 941196

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-persistent-postgresql/repos/community-staging-x86_64/
  haskell-persistent-postgresql/repos/community-staging-x86_64/PKGBUILD
    (from rev 941195, haskell-persistent-postgresql/trunk/PKGBUILD)

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

Copied: haskell-persistent-postgresql/repos/community-staging-x86_64/PKGBUILD (from rev 941195, haskell-persistent-postgresql/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-05-22 04:11:35 UTC (rev 941196)
@@ -0,0 +1,62 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=persistent-postgresql
+pkgname=haskell-persistent-postgresql
+pkgver=2.12.0.0
+pkgrel=13
+pkgdesc="Backend for the persistent library using postgresql."
+url="http://www.yesodweb.com/book/persistent"
+license=("MIT")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-attoparsec' 'haskell-blaze-builder' 'haskell-conduit'
+         'haskell-monad-logger' 'haskell-persistent' 'haskell-postgresql-libpq'
+         'haskell-postgresql-simple' 'haskell-resource-pool' 'haskell-resourcet'
+         'haskell-string-conversions' 'haskell-unliftio-core')
+makedepends=('ghc' 'haskell-hunit' 'haskell-quickcheck' 'haskell-fast-logger' 'haskell-hspec'
+             'haskell-hspec-expectations' 'haskell-persistent-qq' 'haskell-persistent-test'
+             'haskell-quickcheck-instances' 'haskell-unliftio' 'haskell-unordered-containers'
+             'haskell-vector')
+checkdepends=('pifpaf' 'postgresql')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('2ce34e558747b70c613af876c3cdf9dccd0e46a303aba7cd4b8483de306989d5')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  # pifpaf's default port
+  sed -i 's/port=5432/port=9824/' test/PgInit.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 \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie'
+
+  runhaskell Setup build $MAKEFLAGS
+  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 postgres
+  createdb test
+  runhaskell Setup test --show-details=direct
+  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 -t "$pkgdir"/usr/share/licenses/$pkgname/
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}



More information about the arch-commits mailing list