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

Felix Yan felixonmars at archlinux.org
Fri May 14 22:07:30 UTC 2021


    Date: Friday, May 14, 2021 @ 22:07:30
  Author: felixonmars
Revision: 934389

archrelease: copy trunk to community-staging-x86_64

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

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

Copied: haskell-brittany/repos/community-staging-x86_64/PKGBUILD (from rev 934388, haskell-brittany/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-05-14 22:07:30 UTC (rev 934389)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=brittany
+pkgname=haskell-brittany
+pkgver=0.13.1.1
+pkgrel=13
+pkgdesc="Haskell source code formatter"
+url="https://github.com/lspitzner/brittany/"
+license=("AGPL")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-butcher' 'haskell-cmdargs' 'haskell-czipwith'
+         'haskell-data-tree-print' 'haskell-extra' 'haskell-ghc-exactprint' 'haskell-ghc-paths'
+         'haskell-monad-memo' 'haskell-multistate' 'haskell-random' 'haskell-safe'
+         'haskell-strict' 'haskell-syb' 'haskell-uniplate' 'haskell-unsafe' 'haskell-yaml')
+makedepends=('ghc' 'uusi' 'haskell-hspec')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha512sums=('b6689636f971b865c83cc07265de3523da10b7357334c2bc710882c2a2dbdef112b1820a86bf976b3cc4b61bcd13728dae834d25e32d4ea88cf82321ac94574f')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  uusi -r semigroups:Cabal -u hspec $_hkgname.cabal
+
+  # Hack to use Cabal's compatibility layer of semigroups
+  sed -i 's/import Data.Semigroup.Generic/import Distribution.Compat.Semigroup/' src/Language/Haskell/Brittany/Internal/Config/Types.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 $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