[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Fri Aug 21 17:08:42 UTC 2020


    Date: Friday, August 21, 2020 @ 17:08:41
  Author: felixonmars
Revision: 686308

addpkg: haskell-summoner 2.0.1.1-1

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

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

Added: haskell-summoner/trunk/PKGBUILD
===================================================================
--- haskell-summoner/trunk/PKGBUILD	                        (rev 0)
+++ haskell-summoner/trunk/PKGBUILD	2020-08-21 17:08:41 UTC (rev 686308)
@@ -0,0 +1,54 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: berberman <hatsue at typed.icu>
+
+_hkgname=summoner
+pkgname=haskell-summoner
+pkgver=2.0.1.1
+pkgrel=1
+pkgdesc="Tool for scaffolding fully configured batteries-included production-level Haskell projects."
+url="https://github.com/kowainik/summoner"
+license=('MPL2')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-colourista' 'haskell-generic-data' 'haskell-gitrev'
+         'haskell-neat-interpolation' 'haskell-optparse-applicative' 'haskell-relude'
+         'haskell-shellmet' 'haskell-tomland' 'haskell-validation-selective')
+makedepends=('ghc' 'haskell-hedgehog' 'haskell-hspec' 'haskell-hspec-hedgehog' 'haskell-tree-diff')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('5b6eee2848e2fb0b65d34f4a980ecd6e7766629a42394348dc2166e2216fc496')
+
+prepare(){
+  cd $_hkgname-$pkgver
+  echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+  sed -i 's/ ^>= 0.8.0.0/^>= 0.9.0.0/;s/ ^>= 0.3.2.2/^>= 0.5.0.0/' $_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