Date: Monday, October 15, 2018 @ 13:19:52 Author: felixonmars Revision: 394129
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 394128, haskell-text-metrics/trunk/PKGBUILD) ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Copied: haskell-text-metrics/repos/community-staging-x86_64/PKGBUILD (from rev 394128, haskell-text-metrics/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-10-15 13:19:52 UTC (rev 394129) @@ -0,0 +1,42 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=text-metrics +pkgname=haskell-text-metrics +pkgver=0.3.0 +pkgrel=11 +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') + +prepare() { + cd $_hkgname-$pkgver + sed -i 's/< *0.6/<1/' $_hkgname.cabal +} + +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" +}