Date: Friday, June 1, 2018 @ 11:21:20 Author: felixonmars Revision: 335996
archrelease: copy trunk to community-staging-x86_64 Added: haskell-text-metrics/repos/community-staging-x86_64/ haskell-text-metrics/repos/community-staging-x86_64/PKGBUILD (from rev 335995, haskell-text-metrics/trunk/PKGBUILD) ----------+ PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) Copied: haskell-text-metrics/repos/community-staging-x86_64/PKGBUILD (from rev 335995, haskell-text-metrics/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-06-01 11:21:20 UTC (rev 335996) @@ -0,0 +1,38 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=text-metrics +pkgname=haskell-text-metrics +pkgver=0.3.0 +pkgrel=8 +pkgdesc="Calculate various string metrics efficiently" +url="https://github.com/mrkkrp/text-metrics" +license=('custom:BSD3') +arch=('x86_64') +depends=('ghc-libs' 'haskell-vector') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('fa005ad7aeb5fd96ce121c5eab9e83e5826eec288a269f6ce258b3f6aff408c8ca98b8131b6cd14fa8e56f8568eb5a63beb63935335b7c695a3f6e09a979eccf') + +build() { + cd "${srcdir}/${_hkgname}-${pkgver}" + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \ + --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 +} + +package() { + cd "${srcdir}/${_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.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE.md" +}