Date: Thursday, September 15, 2022 @ 21:13:56 Author: felixonmars Revision: 1302922
addpkg: haskell-wuss 2.0.0.2-1 Added: haskell-wuss/ haskell-wuss/repos/ haskell-wuss/trunk/ haskell-wuss/trunk/PKGBUILD ----------+ PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) Added: haskell-wuss/trunk/PKGBUILD =================================================================== --- haskell-wuss/trunk/PKGBUILD (rev 0) +++ haskell-wuss/trunk/PKGBUILD 2022-09-15 21:13:56 UTC (rev 1302922) @@ -0,0 +1,51 @@ +# Maintainer: Felix Yan <[email protected]> + +_hkgname=wuss +pkgname=haskell-wuss +pkgver=2.0.0.2 +pkgrel=1 +pkgdesc="Secure WebSocket (WSS) clients" +url="https://github.com/tfausak/wuss" +license=("MIT") +arch=('x86_64') +depends=('ghc-libs' 'haskell-connection' 'haskell-network' 'haskell-websockets') +makedepends=('ghc' 'uusi') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('02a04d38c11b1046ade12d35bbd9f165429ed02f554b06abf7b8fb4fd7c05812') + +prepare() { + cd $_hkgname-$pkgver + gen-setup +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' \ + -f-pedantic + + 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.markdown -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.markdown +}
