Date: Wednesday, July 31, 2019 @ 11:13:07 Author: felixonmars Revision: 495523
addpkg: haskell-rio-prettyprint 0.1.0.0-1 Added: haskell-rio-prettyprint/ haskell-rio-prettyprint/repos/ haskell-rio-prettyprint/trunk/ haskell-rio-prettyprint/trunk/PKGBUILD ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Added: haskell-rio-prettyprint/trunk/PKGBUILD =================================================================== --- haskell-rio-prettyprint/trunk/PKGBUILD (rev 0) +++ haskell-rio-prettyprint/trunk/PKGBUILD 2019-07-31 11:13:07 UTC (rev 495523) @@ -0,0 +1,48 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=rio-prettyprint +pkgname=haskell-rio-prettyprint +pkgver=0.1.0.0 +pkgrel=1 +pkgdesc="Pretty-printing for RIO" +url="https://github.com/commercialhaskell/stack" +license=('MIT') +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-annotated-wl-pprint' 'haskell-ansi-terminal' + 'haskell-colour' 'haskell-path' 'haskell-rio') +makedepends=('ghc') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('96599c19f5c49824d5bd76c109e2304153170269ecd4c6595f03705216154750670542110fdab450a7e36db00d6a6a0d3acca30e5c7c24a855760b09703a4658') + +prepare() { + cd $_hkgname-$pkgver + echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.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 + 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 $_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" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +}