Date: Sunday, July 8, 2018 @ 18:08:51 Author: felixonmars Revision: 355154
archrelease: copy trunk to community-staging-x86_64 Added: stylish-haskell/repos/community-staging-x86_64/ stylish-haskell/repos/community-staging-x86_64/PKGBUILD (from rev 355153, stylish-haskell/trunk/PKGBUILD) ----------+ PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) Copied: stylish-haskell/repos/community-staging-x86_64/PKGBUILD (from rev 355153, stylish-haskell/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-07-08 18:08:51 UTC (rev 355154) @@ -0,0 +1,50 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +pkgname=stylish-haskell +pkgver=0.9.2.0 +pkgrel=32 +pkgdesc="Haskell code prettifier" +url="https://github.com/jaspervdj/stylish-haskell" +license=("custom:BSD3") +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-file-embed' 'haskell-optparse-applicative' + 'haskell-src-exts' 'haskell-strict' 'haskell-syb' 'haskell-yaml') +makedepends=('ghc' 'haskell-hunit' 'haskell-test-framework' 'haskell-test-framework-hunit') +source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz") +sha512sums=('ccdbfc7f169624210590c5b60c98202709a9418bfe0aac1cf9af7e51704f7f1a2092716e1f5857056634611afbbb5d1013e2b2c3e79602a959a9725aacfba51a') + +prepare() { + cd $pkgname-$pkgver + sed -i '/semigroups/d' $pkgname.cabal +} + +build() { + cd $pkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --enable-tests --datasubdir="$pkgname" \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + -f-old_base + 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 $pkgname-$pkgver + runhaskell Setup test +} + +package() { + cd $pkgname-$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" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +}