upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-hls-rename-plugin / trunk / PKGBUILD
blobc28af98c659c58191cd84b03fe0462ddff1d2ebc
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=hls-rename-plugin
4 pkgname=haskell-hls-rename-plugin
5 pkgver=1.0.2.0
6 pkgrel=15
7 pkgdesc="Rename plugin for Haskell Language Server"
8 url="https://hackage.haskell.org/package/hls-rename-plugin"
9 license=("Apache")
10 arch=('x86_64')
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')
16 checkdepends=('git')
17 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
18 sha256sums=('07c774b17f4f6a567c042107b2c56bcb7b29fd449f0f91f56d4e353447c81f9a')
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 --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 \
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