Date: Thursday, January 5, 2023 @ 03:30:57 Author: felixonmars Revision: 1376969
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 1376968, haskell-brittany/trunk/PKGBUILD) ----------+ PKGBUILD | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) Copied: haskell-brittany/repos/community-staging-x86_64/PKGBUILD (from rev 1376968, haskell-brittany/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2023-01-05 03:30:57 UTC (rev 1376969) @@ -0,0 +1,58 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=brittany +pkgname=haskell-brittany +pkgver=0.14.0.2 +pkgrel=18 +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' 'haskell-ghc-exactprint' + 'haskell-monad-memo' 'haskell-multistate' 'haskell-random' 'haskell-safe' + 'haskell-strict' 'haskell-syb' 'haskell-uniplate' 'haskell-yaml') +makedepends=('ghc' 'uusi' 'haskell-hspec') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha512sums=('966984304e1a156d96d7354030c7d3f62752ea4274d5aff0045e0be975fa7cf91ca02c779208fa6dd5cbf7e4c6f992b3f9efa279400574d5da8baca62b0ff8f3') + +prepare() { + cd $_hkgname-$pkgver + uusi -r semigroups:Cabal -u aeson -u hspec $_hkgname.cabal + gen-setup + + # Hack to use Cabal's compatibility layer of semigroups + sed -i 's/import Data.Semigroup.Generic/import Distribution.Compat.Semigroup/' source/library/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 --datasubdir=$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \ + --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 + mkdir output + 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 +}