diff --git a/testing/haskell-libxml/APKBUILD b/testing/haskell-libxml/APKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..9bfa021185d545c3a388bfd2347043b144797020 --- /dev/null +++ b/testing/haskell-libxml/APKBUILD @@ -0,0 +1,39 @@ +# Contributor: Bart Ribbers +# Maintainer: Kevin Daudt +pkgname=haskell-libxml +pkgver=0.1.1 +pkgrel=0 +pkgdesc="Binding to libxml2" +url="https://hackage.haskell.org/package/libxml" +arch="x86_64" +license="BSD-3-Clause" +depends="ghc libxml2" +makedepends="libxml2-dev" +options="!tracedeps" +install="$pkgname.post-install $pkgname.pre-deinstall" +subpackages="$pkgname-doc" +source="https://hackage.haskell.org/package/libxml-$pkgver/libxml-$pkgver.tar.gz" +builddir="$srcdir/libxml-$pkgver" + +build() { + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --extra-include-dirs=/usr/include/libxml2 \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --enable-tests + runhaskell Setup build + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script +} + +check() { + runhaskell Setup test +} + +package() { + runhaskell Setup copy --destdir="$pkgdir" + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh +} + +sha512sums="59a52200e7c7ab17a60a89e4a3aefdf6356e868be6be53696e5708a4d30863ae879834404ccfecb91b6d4b93a7ce0e147a3cc04bc4d5838c2aa990a290af5c5c libxml-0.1.1.tar.gz" diff --git a/testing/haskell-libxml/haskell-libxml.post-install b/testing/haskell-libxml/haskell-libxml.post-install new file mode 100644 index 0000000000000000000000000000000000000000..c21c0a2615a7c11f944396c287f98ed720dc83ef --- /dev/null +++ b/testing/haskell-libxml/haskell-libxml.post-install @@ -0,0 +1,7 @@ +#!/bin/sh + +pkgver=$1 +script=$(basename $0) +pkgname=${script%-$pkgver.*} + +/usr/share/haskell/register/$pkgname.sh diff --git a/testing/haskell-libxml/haskell-libxml.pre-deinstall b/testing/haskell-libxml/haskell-libxml.pre-deinstall new file mode 100644 index 0000000000000000000000000000000000000000..9dfe5fe235eede3ff233122b92f8cc2c6d2da1f3 --- /dev/null +++ b/testing/haskell-libxml/haskell-libxml.pre-deinstall @@ -0,0 +1,7 @@ +#!/bin/sh + +pkgver=$1 +script=$(basename $0) +pkgname=${script%-$pkgver.*} + +/usr/share/haskell/unregister/$pkgname.sh