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

Felix Yan felixonmars at gemini.archlinux.org
Mon Jan 17 18:56:20 UTC 2022


    Date: Monday, January 17, 2022 @ 18:56:20
  Author: felixonmars
Revision: 1107963

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 1107962, haskell-mysql/trunk/PKGBUILD)

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

Copied: haskell-mysql/repos/community-staging-x86_64/PKGBUILD (from rev 1107962, haskell-mysql/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-01-17 18:56:20 UTC (rev 1107963)
@@ -0,0 +1,55 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=mysql
+pkgname=haskell-mysql
+pkgver=0.2.1
+pkgrel=8
+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=('45967fea85d0a0b0cba4b7184dbf2099506d7e72af71c414712325a46c0570d47ec3362c3eb0cc800e01d4d9270fc9505dfc17c27f271d888809376eec08171e')
+
+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=-fllvm \
+    --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 --show-details=direct
+
+  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