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

Felix Yan felixonmars at gemini.archlinux.org
Thu Mar 3 19:24:54 UTC 2022


    Date: Thursday, March 3, 2022 @ 19:24:49
  Author: felixonmars
Revision: 1141061

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-xmlgen/repos/community-staging-x86_64/
  haskell-xmlgen/repos/community-staging-x86_64/PKGBUILD
    (from rev 1141060, haskell-xmlgen/trunk/PKGBUILD)

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

Copied: haskell-xmlgen/repos/community-staging-x86_64/PKGBUILD (from rev 1141060, haskell-xmlgen/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-03-03 19:24:49 UTC (rev 1141061)
@@ -0,0 +1,55 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=xmlgen
+pkgname=haskell-xmlgen
+pkgver=0.6.2.2
+pkgrel=5
+pkgdesc="Fast XML generation library"
+url="https://github.com/skogsbaer/xmlgen"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-blaze-builder')
+makedepends=('ghc' 'git' 'haskell-hunit' 'haskell-quickcheck' 'haskell-hxt')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
+        "git+https://github.com/skogsbaer/xmlgen.git")
+sha256sums=('926fa98c77525f5046274758fcebd190e86de3f53a4583179e8ce328f25a34d6'
+            'SKIP')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  sed -i 's/Q.Success _ _ _ ->/Q.Success _ _ _ _ _ _ ->/' test/GeneratorTest.hs
+
+  # testdata missing from hackage tarball
+  cp ../xmlgen/test/*.xml test/
+}
+
+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
+  runhaskell Setup test --show-details=direct
+}
+
+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