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

Felix Yan felixonmars at archlinux.org
Mon May 31 06:19:06 UTC 2021


    Date: Monday, May 31, 2021 @ 06:19:06
  Author: felixonmars
Revision: 951819

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 951818, haskell-brittany/trunk/PKGBUILD)

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

Copied: haskell-brittany/repos/community-staging-x86_64/PKGBUILD (from rev 951818, haskell-brittany/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-05-31 06:19:06 UTC (rev 951819)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=brittany
+pkgname=haskell-brittany
+pkgver=0.13.1.2
+pkgrel=9
+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=('4f18de98284979e6c1f78af5eefa0d6699f044ae562b94e58244e454f4a7c2f7dd3a2861fb58da8c9413caa39a2183d6a3d8517140c6fc8da9b705b6154e7062')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  uusi -r semigroups:Cabal $_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