Date: Saturday, September 12, 2020 @ 13:27:31 Author: felixonmars Revision: 703807
archrelease: copy trunk to community-staging-x86_64 Added: haskell-colour/repos/community-staging-x86_64/ haskell-colour/repos/community-staging-x86_64/PKGBUILD (from rev 703806, haskell-colour/trunk/PKGBUILD) ----------+ PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) Copied: haskell-colour/repos/community-staging-x86_64/PKGBUILD (from rev 703806, haskell-colour/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-09-12 13:27:31 UTC (rev 703807) @@ -0,0 +1,56 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=colour +pkgname=haskell-colour +pkgver=2.3.5 +pkgrel=60 +pkgdesc="A model for human colour/color perception" +url="https://hackage.haskell.org/package/${_hkgname}" +license=("MIT") +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc' ) +checkdepends=('haskell-quickcheck' 'haskell-random' 'haskell-test-framework' + 'haskell-test-framework-quickcheck2') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('2232f51b3cfdda1a64436e8395c2441e49db083982a0370d3ec38c304b0a6234666887b3abc886107a9b21c425d3253284cce0186c1a210a302a0a14808364d8') + +prepare() { + cd $_hkgname-$pkgver + sed -i 's/< *2.14/<3/;s/< *1.2/<2/' $_hkgname.cabal +} + +build() { + cd $_hkgname-$pkgver + + if (( CHECKFUNC )); then + _opts=('--enable-tests') + else + _opts=('--disable-tests') + fi + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir="$pkgname" "${_opts[@]}" \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build $MAKEFLAGS + 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 +}