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

Felix Yan felixonmars at gemini.archlinux.org
Mon Dec 20 20:42:29 UTC 2021


    Date: Monday, December 20, 2021 @ 20:42:29
  Author: felixonmars
Revision: 1080800

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

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

Copied: haskell-mysql-simple/repos/community-staging-x86_64/PKGBUILD (from rev 1080799, haskell-mysql-simple/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-12-20 20:42:29 UTC (rev 1080800)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=mysql-simple
+pkgname=haskell-mysql-simple
+pkgver=0.4.7
+pkgrel=6
+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=('1d35c5d31892e64aaac479bb4f7169a0c6c9c65c044b0e3ada0c65f9c32eb50005f3dab1b85c48b7f3fcb418e889a040bee7ec3fdfd78f4bc9ad04ac91c1ce6f')
+
+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