Date: Friday, February 14, 2020 @ 15:05:53
  Author: felixonmars
Revision: 571087

archrelease: copy trunk to community-staging-x86_64

Added:
  shellcheck/repos/community-staging-x86_64/
  shellcheck/repos/community-staging-x86_64/PKGBUILD
    (from rev 571086, shellcheck/trunk/PKGBUILD)

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

Copied: shellcheck/repos/community-staging-x86_64/PKGBUILD (from rev 571086, 
shellcheck/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2020-02-14 15:05:53 UTC (rev 571087)
@@ -0,0 +1,55 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Arch Haskell Team <arch-hask...@haskell.org>
+
+_hkgname=ShellCheck
+pkgname=shellcheck
+pkgver=0.7.0
+pkgrel=118
+pkgdesc="Shell script analysis tool"
+url="https://www.shellcheck.net";
+license=("GPL")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-diff' 'haskell-quickcheck' 
'haskell-regex-tdfa')
+makedepends=('ghc' 'pandoc')
+source=("$_hkgname-$pkgver.tar.gz::https://github.com/koalaman/shellcheck/archive/v$pkgver.tar.gz";
+        
shellcheck-cabal3.patch::https://github.com/koalaman/shellcheck/commit/2c026f1ec7c205c731ff2a0ccd85365f37245758.patch)
+sha512sums=('46ef486dff09bd51bdc5f053b1dda9e3f2943c66bbf6788824ddf8fcf3b69b7a3a9c00bf98bca0dee9d57ee6df833ca4088252dbf773815248be0fa667f35215'
+            
'88b7101a536598ecbf4d1c48cfd4eb10b1a6424a2344e4b1be6f6a814dcf1c3d00e78390070242369bc55ed9c20defd4cc7337854da71761fb08e13240619684')
+
+prepare() {
+    cd $pkgname-$pkgver
+    patch -p1 -i ../shellcheck-cabal3.patch
+
+    echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+}
+
+build() {
+    cd $pkgname-$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='-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
+
+    ./manpage
+}
+
+check() {
+    cd $pkgname-$pkgver
+    runhaskell Setup test
+}
+
+package() {
+    cd $pkgname-$pkgver
+
+    install -D -m644 ${pkgname}.1   "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+    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}"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}

Reply via email to