Date: Wednesday, February 12, 2020 @ 16:09:16 Author: felixonmars Revision: 569448
archrelease: copy trunk to community-x86_64 Added: haskell-optics-core/repos/community-x86_64/ haskell-optics-core/repos/community-x86_64/PKGBUILD (from rev 569447, haskell-optics-core/trunk/PKGBUILD) ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Copied: haskell-optics-core/repos/community-x86_64/PKGBUILD (from rev 569447, haskell-optics-core/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2020-02-12 16:09:16 UTC (rev 569448) @@ -0,0 +1,42 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=optics-core +pkgname=haskell-optics-core +pkgver=0.2 +pkgrel=1 +pkgdesc="Optics as an abstract interface: core definitions" +url="https://github.com/well-typed/optics-core" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs' 'haskell-indexed-profunctors') +makedepends=('ghc') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('b67544072c317b9a3106c1fc1fec966de658b0d7394e951c091b067cae3522f0851913a1f280c5b495abcafd4a5ef84e6e823c2e9ebe891a3993e2eb8ab133e7') + +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" +}