archrelease: copy trunk to community-any
[arch-community.git] / haskell-lsp-test / trunk / PKGBUILD
blobcc23dd30cda59ea76d9d0d92ef1bbd7d3336e27a
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=lsp-test
4 pkgname=haskell-lsp-test
5 pkgver=0.14.1.0
6 pkgrel=27
7 pkgdesc="Functional test framework for LSP servers."
8 url="https://github.com/haskell/lsp/blob/master/lsp-test/README.md"
9 license=("BSD")
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-diff' 'haskell-glob' 'haskell-aeson' 'haskell-aeson-pretty'
12          'haskell-ansi-terminal' 'haskell-async' 'haskell-co-log-core' 'haskell-conduit'
13          'haskell-conduit-parse' 'haskell-data-default' 'haskell-lens' 'haskell-lsp'
14          'haskell-lsp-types' 'haskell-parser-combinators' 'haskell-some' 'haskell-unliftio'
15          'haskell-unordered-containers')
16 makedepends=('ghc' 'uusi' 'haskell-hspec')
17 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
18 sha512sums=('2b4ba5c8d8cfcad3f1edb8fc410078cb483e6a837023fe2746b1188f485b849d24840d9ad1cfaa06a3cee1fa41e53516d8f7fd867494cf5f1f8d3464c784c2fe')
20 prepare() {
21   cd $_hkgname-$pkgver
22   gen-setup
25 build() {
26   cd $_hkgname-$pkgver
28   runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29     --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
30     --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
32     --ghc-option='-pie'
34   runhaskell Setup build $MAKEFLAGS
35   runhaskell Setup register --gen-script
36   runhaskell Setup unregister --gen-script
37   sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
38   sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
41 check() {
42   cd $_hkgname-$pkgver
43   runhaskell Setup test --show-details=direct
46 package() {
47   cd $_hkgname-$pkgver
49   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
50   install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
51   runhaskell Setup copy --destdir="$pkgdir"
52   install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
53   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE