Date: Monday, July 29, 2019 @ 08:47:36 Author: felixonmars Revision: 494474
archrelease: copy trunk to community-staging-x86_64 Added: haskell-microlens-aeson/repos/community-staging-x86_64/ haskell-microlens-aeson/repos/community-staging-x86_64/PKGBUILD (from rev 494473, haskell-microlens-aeson/trunk/PKGBUILD) ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Copied: haskell-microlens-aeson/repos/community-staging-x86_64/PKGBUILD (from rev 494473, haskell-microlens-aeson/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2019-07-29 08:47:36 UTC (rev 494474) @@ -0,0 +1,48 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=microlens-aeson +pkgname=haskell-microlens-aeson +pkgver=2.3.0.4 +pkgrel=11 +pkgdesc="Law-abiding lenses for Aeson, using microlens" +url="https://github.com/fosskers/microlens-aeson/" +license=('MIT') +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-attoparsec' 'haskell-hashable' 'haskell-microlens' + 'haskell-scientific' 'haskell-unordered-containers' 'haskell-vector') +makedepends=('ghc' 'haskell-tasty' 'haskell-tasty-hunit') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('34986eda7737947357999992f617bfd00079048f9fb75dd60f533e58a9671906d9bd0e4fcee1f4a3df309d98ddcb25144fb59f1a779675b119669c27739c3f6a') + +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" +}