[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Fri Aug 21 16:37:57 UTC 2020


    Date: Friday, August 21, 2020 @ 16:37:56
  Author: felixonmars
Revision: 686300

addpkg: haskell-tomland 1.3.0.0-2

Added:
  haskell-tomland/
  haskell-tomland/repos/
  haskell-tomland/trunk/
  haskell-tomland/trunk/PKGBUILD

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

Added: haskell-tomland/trunk/PKGBUILD
===================================================================
--- haskell-tomland/trunk/PKGBUILD	                        (rev 0)
+++ haskell-tomland/trunk/PKGBUILD	2020-08-21 16:37:56 UTC (rev 686300)
@@ -0,0 +1,54 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: berberman <hatsue at typed.icu>
+
+_hkgname=tomland
+pkgname=haskell-tomland
+pkgver=1.3.0.0
+pkgrel=2
+pkgdesc="Implementation of bidirectional TOML serialization."
+url="https://github.com/kowainik/tomland"
+license=('MPL2')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-hashable' 'haskell-megaparsec' 'haskell-parser-combinators'
+         'haskell-unordered-containers' 'haskell-validation-selective')
+makedepends=('ghc' 'haskell-hedgehog' 'haskell-hspec' 'haskell-hspec-golden'
+             'haskell-hspec-hedgehog' 'haskell-hspec-megaparsec')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('248675247b8664087ad037851610ec311b6e0c73a89b9cf4de1ddf97ddc07f95')
+
+prepare(){
+  cd $_hkgname-$pkgver
+  echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+  sed -i '/^executable/a\  buildable: False' $_hkgname.cabal
+}
+
+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=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie'
+
+  runhaskell Setup build
+  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
+}
+
+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" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}



More information about the arch-commits mailing list