Date: Wednesday, March 1, 2023 @ 10:30:27 Author: felixonmars Revision: 1405845
archrelease: copy trunk to community-staging-x86_64 Added: haskell-ghcide-test-utils/repos/community-staging-x86_64/ haskell-ghcide-test-utils/repos/community-staging-x86_64/PKGBUILD (from rev 1405844, haskell-ghcide-test-utils/trunk/PKGBUILD) ----------+ PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) Copied: haskell-ghcide-test-utils/repos/community-staging-x86_64/PKGBUILD (from rev 1405844, haskell-ghcide-test-utils/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2023-03-01 10:30:27 UTC (rev 1405845) @@ -0,0 +1,52 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=ghcide-test-utils +pkgname=haskell-ghcide-test-utils +pkgver=1.8.0.0 +pkgrel=7 +pkgdesc="Test utils for ghcide" +url="https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme" +license=("Apache") +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-data-default' 'haskell-extra' 'haskell-ghcide' + 'haskell-hls-plugin-api' 'haskell-lens' 'haskell-lsp-test' 'haskell-lsp-types' + 'haskell-tasty-hunit') +makedepends=('ghc' 'uusi') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('a7fdc821d2dc313775e6df865f17223fcbe67c518f87868dd8da3e3be9113e9c') + +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=-fllvm \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' + + 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 --show-details=direct +} + +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 -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}