Date: Friday, November 16, 2018 @ 07:41:33
  Author: felixonmars
Revision: 408000

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-sandi/repos/community-staging-x86_64/
  haskell-sandi/repos/community-staging-x86_64/PKGBUILD
    (from rev 407999, haskell-sandi/trunk/PKGBUILD)

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

Copied: haskell-sandi/repos/community-staging-x86_64/PKGBUILD (from rev 407999, 
haskell-sandi/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-11-16 07:41:33 UTC (rev 408000)
@@ -0,0 +1,50 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Arch Haskell Team <arch-hask...@haskell.org>
+
+_hkgname=sandi
+pkgname=haskell-sandi
+pkgver=0.4.3
+pkgrel=4
+pkgdesc="Data encoding library"
+url="https://hackage.haskell.org/package/sandi";
+license=("custom:BSD3")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-conduit' 'haskell-exceptions')
+makedepends=('ghc' 'haskell-tasty' 'haskell-tasty-hunit' 
'haskell-tasty-quickcheck'
+             'haskell-tasty-th')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz";)
+sha512sums=('76d9288d7dce824d320e545b0540b40b148b8c848c7785fc79514cdfa6815a946229fd70c341443f52a9cf8cdb4f425980a14b33d0c3b02cf6645854e5048269')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+}
+
+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 \
+            -fwith-conduit
+    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"
+}

Reply via email to