Date: Monday, December 28, 2020 @ 13:58:22
  Author: felixonmars
Revision: 794957

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

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

Copied: haskell-brittany/repos/community-staging-x86_64/PKGBUILD (from rev 
794956, haskell-brittany/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2020-12-28 13:58:22 UTC (rev 794957)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+
+_hkgname=brittany
+pkgname=haskell-brittany
+pkgver=0.13.1.0
+pkgrel=7
+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=('9dfcbe49214e9cc8f696555a2c8249df2418644af55a1f514059b8c8a470638cde2d5c78723150f7a6441c35267a997ab7d09a1e10431422589eeb30f84ad972')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  uusi -r semigroups:Cabal -u random $_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
+}
+
+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
+}

Reply via email to