Date: Thursday, September 29, 2022 @ 16:04:26
  Author: felixonmars
Revision: 1316472

archrelease: copy trunk to community-staging-x86_64

Added:
  postgrest/repos/community-staging-x86_64/
  postgrest/repos/community-staging-x86_64/PKGBUILD
    (from rev 1316471, postgrest/trunk/PKGBUILD)

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

Copied: postgrest/repos/community-staging-x86_64/PKGBUILD (from rev 1316471, 
postgrest/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2022-09-29 16:04:26 UTC (rev 1316472)
@@ -0,0 +1,70 @@
+# Maintainer: Felix Yan <[email protected]>
+# Contributor: Arch Haskell Team <[email protected]>
+
+pkgname=postgrest
+pkgver=10.0.0
+pkgrel=1
+pkgdesc="REST API for any Postgres database"
+url="https://github.com/begriffs/postgrest";
+license=("MIT")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-http' 'haskell-ranged-sets' 'haskell-aeson' 
'haskell-auto-update'
+         'haskell-base64-bytestring' 'haskell-case-insensitive' 
'haskell-cassava'
+         'haskell-configurator-pg' 'haskell-contravariant-extras' 
'haskell-cookie' 'haskell-either'
+         'haskell-gitrev' 'haskell-hasql' 'haskell-hasql-dynamic-statements'
+         'haskell-hasql-notifications' 'haskell-hasql-pool' 
'haskell-hasql-transaction'
+         'haskell-heredoc' 'haskell-http-types' 
'haskell-insert-ordered-containers'
+         'haskell-interpolatedstring-perl6' 'haskell-jose' 'haskell-lens' 
'haskell-lens-aeson'
+         'haskell-network' 'haskell-network-uri' 
'haskell-optparse-applicative' 'haskell-protolude'
+         'haskell-regex-tdfa' 'haskell-retry' 'haskell-scientific' 
'haskell-swagger2'
+         'haskell-unordered-containers' 'haskell-vault' 'haskell-vector' 
'haskell-wai'
+         'haskell-wai-cors' 'haskell-wai-extra' 'haskell-wai-logger' 
'haskell-warp')
+makedepends=('ghc' 'uusi' 'haskell-aeson-qq' 'haskell-async' 'haskell-doctest' 
'haskell-hspec'
+             'haskell-hspec-wai' 'haskell-hspec-wai-json' 
'haskell-monad-control'
+             'haskell-pretty-simple' 'haskell-transformers-base')
+checkdepends=('pifpaf' 'postgresql' 'procps-ng')
+source=("https://github.com/begriffs/postgrest/archive/v$pkgver/$pkgname-$pkgver.tar.gz";)
+sha512sums=('c7a4d631b0cdd4bc79501433f21e4a4366bc496e8ae3e94fe5124defcf79cab07a937b51349972bfcb0759198af453e9239653f97eb16efad1afe251026e5f35')
+
+prepare() {
+    cd $pkgname-$pkgver
+    uusi -u hspec -u HTTP -u optparse-applicative $pkgname.cabal
+}
+
+build() {
+    cd $pkgname-$pkgver
+
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname 
--enable-tests \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid 
--ghc-option=-fllvm \
+            -f-CI --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 $pkgname-$pkgver
+
+    eval $(pifpaf run postgresql --host 127.0.0.1)
+    createuser -s postgrest_test
+    # https://github.com/PostgREST/postgrest/issues/1857
+    POSTGREST_TEST_CONNECTION=$(test/create_test_db 
"postgres://$USER@localhost" postgrest_test) runhaskell Setup test 
--show-details=direct || echo "Tests failed"
+
+    # Disabled: uses stack
+    # test/io-tests.sh
+
+    pifpaf_stop
+}
+
+package() {
+    cd $pkgname-$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
+}

Reply via email to