Date: Saturday, September 15, 2018 @ 04:17:27
  Author: felixonmars
Revision: 381018

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 381017, haskell-colour/trunk/PKGBUILD)

----------+
 PKGBUILD |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

Copied: haskell-colour/repos/community-staging-x86_64/PKGBUILD (from rev 
381017, haskell-colour/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-09-15 04:17:27 UTC (rev 381018)
@@ -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.4
+pkgrel=11
+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=('c475ed5ced7bcf749facfacf609d2b89a04f496bd6a7301259aa14cbfe6e768d65495f09b046b80f448b27478323a52cc2414954934985259e6f115325d17f9a')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i 's/<.*2.11/<3/' $_hkgname.cabal
+}
+
+build() {
+    cd "${srcdir}/${_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
+    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 "${srcdir}/${_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"
+}

Reply via email to