Date: Tuesday, December 29, 2020 @ 09:19:21 Author: felixonmars Revision: 796605
archrelease: copy trunk to community-staging-x86_64 Added: haskell-websockets/repos/community-staging-x86_64/ haskell-websockets/repos/community-staging-x86_64/PKGBUILD (from rev 796604, haskell-websockets/trunk/PKGBUILD) ----------+ PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) Copied: haskell-websockets/repos/community-staging-x86_64/PKGBUILD (from rev 796604, haskell-websockets/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-12-29 09:19:21 UTC (rev 796605) @@ -0,0 +1,52 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=websockets +pkgname=haskell-websockets +pkgver=0.12.7.2 +pkgrel=10 +pkgdesc="A sensible and clean way to write WebSocket-capable servers in Haskell." +url="https://hackage.haskell.org/package/${_hkgname}" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-async' 'haskell-attoparsec' 'haskell-base64-bytestring' + 'haskell-case-insensitive' 'haskell-clock' 'haskell-entropy' 'haskell-network' + 'haskell-random' 'haskell-sha' 'haskell-streaming-commons') +makedepends=('ghc' 'uusi' 'haskell-hunit' 'haskell-test-framework' 'haskell-test-framework-hunit' + 'haskell-test-framework-quickcheck2') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('35f52a85cbbd57bc5302a7396711ad1f405a96481bc326754986edb581466849d052e1e2da9f473880cf59d07a4fa576ae2995fb83f754b8ef368ee616fda29e') + +prepare() { + cd $_hkgname-$pkgver + uusi -d bytestring-builder $_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 \ + -f-Example + 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 "LICENCE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENCE" +}