diff options
author | Andrew Clemons <andrew.clemons@gmail.com> | 2023-10-10 14:41:57 +0800 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-06-08 16:24:21 +0700 |
commit | 688f8c5565418cb50cd2eac2f7bb5e5bc210098b (patch) | |
tree | 67ed22d6d3683663559d53b68a7c2bb4bdb1aa21 | |
parent | e74d5e72bfcbde3a8de21cf977310b22c80dad6a (diff) |
haskell/haskell-ShellCheck: Optionally build man page.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | haskell/haskell-ShellCheck/README | 3 | ||||
-rw-r--r-- | haskell/haskell-ShellCheck/haskell-ShellCheck.SlackBuild | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/haskell/haskell-ShellCheck/README b/haskell/haskell-ShellCheck/README index 0a76f6d8cf4f..ef430204ce9d 100644 --- a/haskell/haskell-ShellCheck/README +++ b/haskell/haskell-ShellCheck/README @@ -1,5 +1,8 @@ haskell-ShellCheck - shell script analysis tool +Optional dependencies are pandoc or pandoc-bin to be able to +generate the manpage. + The goals of ShellCheck are: * To point out and clarify typical beginner's syntax issues, that cause diff --git a/haskell/haskell-ShellCheck/haskell-ShellCheck.SlackBuild b/haskell/haskell-ShellCheck/haskell-ShellCheck.SlackBuild index e55980efa72a..85794f8be23f 100644 --- a/haskell/haskell-ShellCheck/haskell-ShellCheck.SlackBuild +++ b/haskell/haskell-ShellCheck/haskell-ShellCheck.SlackBuild @@ -115,6 +115,16 @@ mv $SRCNAM-$VERSION.conf $PKG/$PKGCONFD/$PKGID.conf find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +if command -v pandoc > /dev/null 2>&1 ; then + chmod +x ./manpage + ./manpage + mkdir -p $PKG/usr/man/man1 + install -m644 shellcheck.1 $PKG/usr/man/man1/shellcheck.1 + + find $PKG/usr/man -type f -exec gzip -9 {} \; + for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +fi + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |