[arch-commits] Commit in haskell-mysql/repos (2 files)
Felix Yan
felixonmars at gemini.archlinux.org
Mon Dec 20 00:08:53 UTC 2021
Date: Monday, December 20, 2021 @ 00:08:52
Author: felixonmars
Revision: 1079099
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 1079098, haskell-mysql/trunk/PKGBUILD)
----------+
PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
Copied: haskell-mysql/repos/community-staging-x86_64/PKGBUILD (from rev 1079098, haskell-mysql/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2021-12-20 00:08:52 UTC (rev 1079099)
@@ -0,0 +1,55 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=mysql
+pkgname=haskell-mysql
+pkgver=0.2.1
+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=('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