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

Felix Yan felixonmars at archlinux.org
Sun Nov 22 21:47:27 UTC 2020


    Date: Sunday, November 22, 2020 @ 21:47:26
  Author: felixonmars
Revision: 759611

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-mysql-simple/repos/community-staging-x86_64/
  haskell-mysql-simple/repos/community-staging-x86_64/PKGBUILD
    (from rev 759610, haskell-mysql-simple/trunk/PKGBUILD)

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

Copied: haskell-mysql-simple/repos/community-staging-x86_64/PKGBUILD (from rev 759610, haskell-mysql-simple/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-11-22 21:47:26 UTC (rev 759611)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=mysql-simple
+pkgname=haskell-mysql-simple
+pkgver=0.4.5
+pkgrel=3
+pkgdesc="A mid-level MySQL client library"
+url="https://github.com/paul-rouse/mysql-simple"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-attoparsec' 'haskell-base16-bytestring' 'haskell-blaze-builder'
+         'haskell-blaze-textual' 'haskell-mysql' 'haskell-old-locale' 'haskell-pcre-light')
+makedepends=('ghc' 'haskell-hspec')
+checkdepends=('mariadb')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('b03c422ed8a62fa7f98b62634a06da8454980c6a733e275020ca7cedbb6e7cb1')
+
+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
+  mkdir -p /tmp/mysql_test
+  mysql_install_db --datadir=/tmp/mysql_test
+  mysqld --datadir=/tmp/mysql_test --socket=/tmp/socket.mysql --skip-grant-tables &
+  MYSQL_PID=$!
+  sleep 5
+  mysql -h 127.0.0.1 -u root -e "create database IF NOT EXISTS test;"
+
+  runhaskell Setup test
+
+  kill $MYSQL_PID
+}
+
+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