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

Felix Yan felixonmars at archlinux.org
Sun Mar 8 19:58:20 UTC 2020


    Date: Sunday, March 8, 2020 @ 19:58:20
  Author: felixonmars
Revision: 592446

archrelease: copy trunk to community-staging-x86_64

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

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

Copied: haskell-persistent-qq/repos/community-staging-x86_64/PKGBUILD (from rev 592445, haskell-persistent-qq/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-03-08 19:58:20 UTC (rev 592446)
@@ -0,0 +1,50 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=persistent-qq
+pkgname=haskell-persistent-qq
+pkgver=2.9.1.1
+pkgrel=41
+pkgdesc="Provides a quasi-quoter for raw SQL for persistent"
+url="https://github.com/yesod-web/persistent"
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-src-meta' 'haskell-persistent')
+makedepends=('ghc' 'haskell-aeson' 'haskell-fast-logger' 'haskell-hspec' 'haskell-hunit'
+             'haskell-monad-logger' 'haskell-persistent-sqlite' 'haskell-persistent-template'
+             'haskell-resourcet' 'haskell-unliftio')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('3fbdaefe6b5304ca8076b7dae3eab0ac08d624da1e595fcb29e24c2dfae1af376855b67802f0badb5f0b812c9dcda7cbc6e0b6cd26da618b6fe378866a39cd5f')
+
+build() {
+    cd $_hkgname-$pkgver
+
+    if (( CHECKFUNC )); then
+        _opts=('--enable-tests')
+    else
+        _opts=('--disable-tests')
+    fi
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname "${_opts[@]}" \
+        --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
+    runhaskell Setup test
+}
+
+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