Date: Tuesday, April 4, 2023 @ 14:39:12
  Author: felixonmars
Revision: 1434585

addpkg: haskell-hls-cabal-fmt-plugin 0.1.0.0-1

Added:
  haskell-hls-cabal-fmt-plugin/
  haskell-hls-cabal-fmt-plugin/repos/
  haskell-hls-cabal-fmt-plugin/trunk/
  haskell-hls-cabal-fmt-plugin/trunk/PKGBUILD

----------+
 PKGBUILD |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

Added: haskell-hls-cabal-fmt-plugin/trunk/PKGBUILD
===================================================================
--- haskell-hls-cabal-fmt-plugin/trunk/PKGBUILD                         (rev 0)
+++ haskell-hls-cabal-fmt-plugin/trunk/PKGBUILD 2023-04-04 14:39:12 UTC (rev 
1434585)
@@ -0,0 +1,53 @@
+# Maintainer: Felix Yan <[email protected]>
+
+_hkgname=hls-cabal-fmt-plugin
+pkgname=haskell-hls-cabal-fmt-plugin
+pkgver=0.1.0.0
+pkgrel=1
+pkgdesc="Integration with the cabal-fmt code formatter"
+url="https://hackage.haskell.org/package/hls-cabal-fmt-plugin";
+license=("Apache")
+arch=('x86_64')
+depends=('ghc-libs' 'cabal-fmt' 'haskell-ghcide' 'haskell-hls-plugin-api' 
'haskell-lens'
+         'haskell-lsp-types')
+makedepends=('ghc' 'uusi' 'haskell-hls-test-utils')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz";)
+sha256sums=('b71ae62ebe3dd35a19f6571fd3c8f17654c80c4b36607e39347516677606defe')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  gen-setup
+}
+
+build() {
+  cd $_hkgname-$pkgver
+
+  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+    --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname 
--enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie' \
+    -f-isolatetests
+
+  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
+}
+
+check() {
+  cd $_hkgname-$pkgver
+  # missing testdata files
+  runhaskell Setup test || echo "Tests failed"
+}
+
+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
+}

Reply via email to