archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-lsp0 / trunk / PKGBUILD
blob3e1257309a19e7c2ed80f1c98b723a06b5ed98b7
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=haskell-lsp
4 pkgname=haskell-lsp0
5 pkgver=0.24.0.0
6 pkgrel=138
7 pkgdesc="Haskell library for the Microsoft Language Server Protocol (Legacy 0.x version)"
8 url="https://github.com/alanz/haskell-lsp"
9 license=("MIT")
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-async' 'haskell-attoparsec' 'haskell-data-default'
12          'haskell-hashable' 'haskell-lsp0-types' 'haskell-hslogger' 'haskell-lens'
13          'haskell-network-uri' 'haskell-rope-utf16-splay' 'haskell-sorted-list'
14          'haskell-temporary' 'haskell-unordered-containers' 'haskell-vector')
15 makedepends=('ghc' 'uusi' 'haskell-quickcheck' 'haskell-hspec' 'haskell-hspec-discover'
16              'haskell-quickcheck-instances')
17 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
18 sha512sums=('91ab856483ced484ba4b804a269d877595db6c4d606df8da81d0ba557deac2fc97970b645dac8594dbdce28f27e3f09877e45a8b28932317ed2c60e766a28a30')
20 prepare() {
21   cd $_hkgname-$pkgver
22   uusi -u base $_hkgname.cabal
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 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
53   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE