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

Felix Yan felixonmars at archlinux.org
Wed Feb 3 12:39:47 UTC 2021


    Date: Wednesday, February 3, 2021 @ 12:39:47
  Author: felixonmars
Revision: 843191

archrelease: copy trunk to community-staging-x86_64

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

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

Copied: haskell-mysql/repos/community-staging-x86_64/PKGBUILD (from rev 843190, haskell-mysql/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-02-03 12:39:47 UTC (rev 843191)
@@ -0,0 +1,55 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=mysql
+pkgname=haskell-mysql
+pkgver=0.1.7.3
+pkgrel=1
+pkgdesc="A low-level MySQL client library"
+url="https://github.com/paul-rouse/mysql"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'mariadb-libs')
+makedepends=('ghc' 'haskell-hspec')
+checkdepends=('mariadb')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha512sums=('46c382f9bc2e19ce0da08f10590067649de106312e50df8d874b7491d1625b4463535d0f44ea13725e4bd6057c426762fb7cc8c47624db63fb5f17c1e25bf1e9')
+
+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