1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=hls-rename-plugin
4 pkgname=haskell-hls-rename-plugin
7 pkgdesc="Rename plugin for Haskell Language Server"
8 url="https://hackage.haskell.org/package/hls-rename-plugin"
11 depends=('ghc-libs' 'haskell-extra' 'haskell-ghc' 'haskell-ghc-exactprint' 'haskell-ghcide'
12 'haskell-hashable' 'haskell-hiedb' 'haskell-hls-plugin-api' 'haskell-hls-refactor-plugin'
13 'haskell-lsp' 'haskell-lsp-types' 'haskell-mod' 'haskell-syb'
14 'haskell-unordered-containers')
15 makedepends=('ghc' 'uusi' 'haskell-aeson' 'haskell-hls-test-utils')
17 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
18 sha256sums=('07c774b17f4f6a567c042107b2c56bcb7b29fd449f0f91f56d4e353447c81f9a')
28 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --datasubdir=haskell-hls-rename-plugin --enable-tests \
30 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
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
43 runhaskell Setup test --show-details=direct
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