Date: Thursday, January 9, 2020 @ 11:29:15 Author: felixonmars Revision: 551023
addpkg: haskell-inspection-testing 0.4.2.2-1 Added: haskell-inspection-testing/ haskell-inspection-testing/repos/ haskell-inspection-testing/trunk/ haskell-inspection-testing/trunk/PKGBUILD ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Added: haskell-inspection-testing/trunk/PKGBUILD =================================================================== --- haskell-inspection-testing/trunk/PKGBUILD (rev 0) +++ haskell-inspection-testing/trunk/PKGBUILD 2020-01-09 11:29:15 UTC (rev 551023) @@ -0,0 +1,42 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=inspection-testing +pkgname=haskell-inspection-testing +pkgver=0.4.2.2 +pkgrel=1 +pkgdesc="GHC plugin to do inspection testing" +url="https://github.com/nomeata/inspection-testing" +license=('MIT') +arch=('x86_64') +depends=('ghc-libs' 'haskell-ghc') +makedepends=('ghc') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('11442d75db189d93ad56de234da9c28dc992fb16bc8eeef2f567bfee928dc4f67d65545fe10d78b3c6322adabb2051f0d11e1e5f32ff6f4988d5dffcb0ce4024') + +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" +}