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

Felix Yan felixonmars at gemini.archlinux.org
Mon Aug 2 14:12:02 UTC 2021


    Date: Monday, August 2, 2021 @ 14:12:02
  Author: felixonmars
Revision: 992486

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 992485, haskell-persistent-postgresql/trunk/PKGBUILD)

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

Copied: haskell-persistent-postgresql/repos/community-staging-x86_64/PKGBUILD (from rev 992485, haskell-persistent-postgresql/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-08-02 14:12:02 UTC (rev 992486)
@@ -0,0 +1,64 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=persistent-postgresql
+pkgname=haskell-persistent-postgresql
+pkgver=2.13.0.3
+pkgrel=19
+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-hspec-expectations-lifted'
+             'haskell-http-api-data' 'haskell-path-pieces' '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")
+sha512sums=('9378b05b24fcf491d1afc2c9fd83592c83a4a239cc746a88a08330eed29b1e99ea1c32335c7dd9fe4b23417edc5958ff9c51006475f2c0dd0b24cea3ef2f8ecf')
+
+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 -s postgres
+  createdb test
+  # https://github.com/yesodweb/persistent/issues/1278
+  runhaskell Setup test --show-details=direct || echo "Tests failed"
+  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