Date: Tuesday, January 26, 2021 @ 00:49:58 Author: felixonmars Revision: 830173
addpkg: haskell-hls-plugin-api 0.6.0.0-1 Added: haskell-hls-plugin-api/ haskell-hls-plugin-api/repos/ haskell-hls-plugin-api/trunk/ haskell-hls-plugin-api/trunk/PKGBUILD ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Added: haskell-hls-plugin-api/trunk/PKGBUILD =================================================================== --- haskell-hls-plugin-api/trunk/PKGBUILD (rev 0) +++ haskell-hls-plugin-api/trunk/PKGBUILD 2021-01-26 00:49:58 UTC (rev 830173) @@ -0,0 +1,48 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=hls-plugin-api +pkgname=haskell-hls-plugin-api +pkgver=0.6.0.0 +pkgrel=1 +pkgdesc="Haskell Language Server API for plugin communication" +url="https://github.com/haskell/haskell-language-server/hls-plugin-api" +license=("Apache") +arch=('x86_64') +depends=('ghc-libs' 'haskell-diff' 'haskell-aeson' 'haskell-data-default' 'haskell-hashable' + 'haskell-lsp' 'haskell-hslogger' 'haskell-lens' 'haskell-regex-tdfa' 'haskell-shake' + 'haskell-unordered-containers') +makedepends=('ghc' 'uusi') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('f1060ed8229120a3c60fc14da0bdaca33a2fb39b6c48f39ba0a045b02a10cd36') + +prepare() { + cd $_hkgname-$pkgver + gen-setup + uusi -u haskell-lsp $_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 \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' + + 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 +} + +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 +}