[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Sat Nov 21 14:44:53 UTC 2020


    Date: Saturday, November 21, 2020 @ 14:44:53
  Author: felixonmars
Revision: 758488

addpkg: haskell-fourmolu 0.3.0.0-1

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

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

Added: haskell-fourmolu/trunk/PKGBUILD
===================================================================
--- haskell-fourmolu/trunk/PKGBUILD	                        (rev 0)
+++ haskell-fourmolu/trunk/PKGBUILD	2020-11-21 14:44:53 UTC (rev 758488)
@@ -0,0 +1,52 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=fourmolu
+pkgname=haskell-fourmolu
+pkgver=0.3.0.0
+pkgrel=1
+pkgdesc="A formatter for Haskell source code"
+url="https://github.com/parsonsmatt/fourmolu"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-hsyaml' 'haskell-hsyaml-aeson' 'haskell-aeson' 'haskell-dlist'
+         'haskell-ghc' 'haskell-gitrev' 'haskell-optparse-applicative' 'haskell-syb')
+makedepends=('ghc' 'uusi' 'haskell-hspec' 'haskell-hspec-discover' 'haskell-path' 'haskell-path-io')
+source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('ba7201c78ee61665eaf1fce10cd297dd5383d36053cd3984e41a5094d96e096d')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  uusi --all -rghc-lib-parser:ghc,ghc-boot,ghc-boot-th $_hkgname.cabal
+  sed -i 's/using ghc-lib-parser/using ghc/;s/VERSION_ghc_lib_parser/VERSION_ghc/' app/Main.hs
+}
+
+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.md -t "$pkgdir"/usr/share/licenses/$pkgname/
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.md
+}


More information about the arch-commits mailing list