Date: Monday, February 12, 2018 @ 17:09:21 Author: felixonmars Revision: 293378
archrelease: copy trunk to community-staging-x86_64 Added: cgrep/repos/community-staging-x86_64/ cgrep/repos/community-staging-x86_64/PKGBUILD (from rev 293377, cgrep/trunk/PKGBUILD) ----------+ PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) Copied: cgrep/repos/community-staging-x86_64/PKGBUILD (from rev 293377, cgrep/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-02-12 17:09:21 UTC (rev 293378) @@ -0,0 +1,38 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +pkgname=cgrep +pkgver=6.6.22 +pkgrel=16 +pkgdesc="A context-aware grep for source codes" +url="http://awgn.github.io/cgrep/" +license=("GPL2") +arch=('x86_64') +depends=('ghc-libs' "haskell-ansi-terminal" "haskell-async" "haskell-cmdargs" "haskell-dlist" + "haskell-either" "haskell-mtl" "haskell-regex-base" "haskell-regex-pcre" + "haskell-regex-posix" "haskell-safe" "haskell-split" "haskell-stm" "haskell-stringsearch" + "haskell-unix-compat" "haskell-unicode-show" "haskell-unordered-containers" + "haskell-utf8-string") +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz") +sha512sums=('d5504fb9d6da4c1bf3bf59297d4c9084af179657710357df89059f36aa3cba10e65089e425a76b36a26943815cad590e7d174d60f7bf29a2a80293b544fb95b6') + +prepare() { + sed -e 's/Either/Except/' \ + -e 's/left/throwError/' \ + -e '/import Data.List/a import Control.Monad.Error.Class (throwError)' \ + -i $pkgname-$pkgver/src/Main.hs +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + runhaskell Setup configure -O --prefix=/usr --enable-executable-dynamic --docdir="/usr/share/doc/${pkgname}" + runhaskell Setup build +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + runhaskell Setup copy --destdir="${pkgdir}" +}