[arch-commits] Commit in stylish-haskell/repos (2 files)

Felix Yan felixonmars at gemini.archlinux.org
Sat May 14 14:32:45 UTC 2022


    Date: Saturday, May 14, 2022 @ 14:32:45
  Author: felixonmars
Revision: 1204875

archrelease: copy trunk to community-staging-x86_64

Added:
  stylish-haskell/repos/community-staging-x86_64/
  stylish-haskell/repos/community-staging-x86_64/PKGBUILD
    (from rev 1204874, stylish-haskell/trunk/PKGBUILD)

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

Copied: stylish-haskell/repos/community-staging-x86_64/PKGBUILD (from rev 1204874, stylish-haskell/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-05-14 14:32:45 UTC (rev 1204875)
@@ -0,0 +1,52 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+pkgname=stylish-haskell
+pkgver=0.13.0.0
+pkgrel=8
+pkgdesc="Haskell code prettifier"
+url="https://github.com/haskell/stylish-haskell"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-file-embed' 'haskell-ghc-lib-parser'
+         'haskell-optparse-applicative' 'haskell-strict' 'haskell-syb' 'haskell-hsyaml'
+         'haskell-hsyaml-aeson')
+makedepends=('ghc' 'uusi' 'haskell-hunit' 'haskell-random' 'haskell-test-framework'
+             'haskell-test-framework-hunit')
+source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('6a575568f9e81bf840743282d65a48f9bfa6541f192aab7633c93f8a6805e95897c4137cb70aaf5fc341db850b435da0b9b60e60e505b3fa8f90c2ce5ed8d075')
+
+prepare() {
+    cd $pkgname-$pkgver
+    uusi -u Cabal $pkgname.cabal
+}
+
+build() {
+    cd $pkgname-$pkgver
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests --datasubdir=$pkgname \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
+            -f-old_base --ghc-option='-pie'
+    runhaskell Setup build $MAKEFLAGS
+    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 $pkgname-$pkgver
+    # https://github.com/haskell/stylish-haskell/issues/370
+    runhaskell Setup test --show-details=direct || echo "Tests failed"
+}
+
+package() {
+    cd $pkgname-$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 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+    rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}



More information about the arch-commits mailing list