From 688f8c5565418cb50cd2eac2f7bb5e5bc210098b Mon Sep 17 00:00:00 2001 From: Andrew Clemons Date: Tue, 10 Oct 2023 14:41:57 +0800 Subject: haskell/haskell-ShellCheck: Optionally build man page. Signed-off-by: Andrew Clemons Signed-off-by: Willy Sudiarto Raharjo --- haskell/haskell-ShellCheck/README | 3 +++ haskell/haskell-ShellCheck/haskell-ShellCheck.SlackBuild | 10 ++++++++++ 2 files changed, 13 insertions(+) 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 -- cgit v1.2.3