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

Felix Yan felixonmars at gemini.archlinux.org
Sun Nov 7 00:13:33 UTC 2021


    Date: Sunday, November 7, 2021 @ 00:13:33
  Author: felixonmars
Revision: 1037959

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

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

Copied: haskell-mysql-simple/repos/community-staging-x86_64/PKGBUILD (from rev 1037958, haskell-mysql-simple/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-11-07 00:13:33 UTC (rev 1037959)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=mysql-simple
+pkgname=haskell-mysql-simple
+pkgver=0.4.6
+pkgrel=29
+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")
+sha512sums=('b25117804fe3ec0461044e573e3eda6e3e739fdedaf87aa57bd3718900c15a068c49ef050bc57e6d5acd17a6665c2ed554598eb1309f3fd37d7f2c333782259d')
+
+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