Date: Tuesday, October 16, 2018 @ 18:06:39
  Author: felixonmars
Revision: 394732

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-haddock-library/repos/community-staging-x86_64/
  haskell-haddock-library/repos/community-staging-x86_64/PKGBUILD
    (from rev 394731, haskell-haddock-library/trunk/PKGBUILD)

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

Copied: haskell-haddock-library/repos/community-staging-x86_64/PKGBUILD (from 
rev 394731, haskell-haddock-library/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-10-16 18:06:39 UTC (rev 394732)
@@ -0,0 +1,49 @@
+# Maintainer: Sergej Pupykin <arch+...@sergej.pp.ru>
+
+_hkgname=haddock-library
+pkgname=haskell-haddock-library
+pkgver=1.6.0
+pkgrel=19
+pkgdesc="A documentation-generation tool for Haskell libraries"
+url="https://www.haskell.org/haddock/";
+license=("custom:BSD3")
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc' 'haskell-base-compat' 'haskell-hspec' 
'haskell-hspec-discover'
+             'haskell-quickcheck' 'haskell-optparse-applicative' 
'haskell-tree-diff')
+source=("https://hackage.haskell.org/packages/archive/haddock-library/${pkgver}/haddock-library-${pkgver}.tar.gz";)
+sha512sums=('e24906db32b740da99b048127e166ce57c0fd7bb14d8d6f34f4b94d8583387aa11b5cb6a734eddc91602037612b0fd725c95d2d37aca539c1be8dfd70d6e8a73')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i -e 's/\^>=/>=/' -e 's/< *4.12/<5/' -e 's/< *0.6/<1/' $_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
+    # TODO: doesn't look like my fault :/
+    runhaskell Setup test || warning "Tests failed"
+}
+
+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"
+}

Reply via email to