Date: Wednesday, January 8, 2020 @ 22:23:14 Author: felixonmars Revision: 550736
archrelease: copy trunk to community-staging-x86_64 Added: haskell-generics-sop/repos/community-staging-x86_64/ haskell-generics-sop/repos/community-staging-x86_64/PKGBUILD (from rev 550735, haskell-generics-sop/trunk/PKGBUILD) ----------+ PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) Copied: haskell-generics-sop/repos/community-staging-x86_64/PKGBUILD (from rev 550735, haskell-generics-sop/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-01-08 22:23:14 UTC (rev 550736) @@ -0,0 +1,50 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=generics-sop +pkgname=haskell-generics-sop +pkgver=0.5.0.0 +pkgrel=2 +pkgdesc="Generic Programming using True Sums of Products" +url="https://hackage.haskell.org/package/${_hkgname}" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-sop-core') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('ba469a087c40002321333a4c3ecb287e1f780fc3c3a74e15c050ccb92d5520802fd1c05be2903a0ad4392787767f5c2705e66ff4bbbdb5e19e8be176580132d2') + +prepare() { + cd $_hkgname-$pkgver + echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs + + sed -i 's/< *2.15/<3/' $_hkgname.cabal +} + +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" +}