pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/hub hub: Generate and install hub-* man pages



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fe8b8a566351
branches:  trunk
changeset: 420914:fe8b8a566351
user:      leot <leot%pkgsrc.org@localhost>
date:      Thu Jan 09 11:59:53 2020 +0000

description:
hub: Generate and install hub-* man pages

Add necessary logic to generate and install hub man pages.

We could use the existent targets provided by Makefile by introducing a gmake
tool dependency and adjusting install.sh but it is probably easier to mimic it
and rarely new commands are added to hub (so possible HUB_COMMANDS sync against
${WRKSRC}/Makefile should hopefully scale).  We can revisit that in the future
if that will not be the case.

PKGREVISION++

diffstat:

 net/hub/Makefile |  31 ++++++++++++++++++++++++++++---
 net/hub/PLIST    |  16 +++++++++++++++-
 2 files changed, 43 insertions(+), 4 deletions(-)

diffs (78 lines):

diff -r cbcd33ee7934 -r fe8b8a566351 net/hub/Makefile
--- a/net/hub/Makefile  Thu Jan 09 11:52:35 2020 +0000
+++ b/net/hub/Makefile  Thu Jan 09 11:59:53 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.35 2020/01/02 11:52:48 leot Exp $
+# $NetBSD: Makefile,v 1.36 2020/01/09 11:59:53 leot Exp $
 
 DISTNAME=      hub-2.13.0
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=github/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -26,17 +27,41 @@
 
 CHECK_RELRO_SKIP+=     bin/hub
 
-# Generate hub(1) man page
+# List of hub commands to generate man pages, HELP_CMD list of ${WRKSRC}/Makefile
+HUB_COMMANDS=  alias \
+               api \
+               browse \
+               ci-status \
+               compare \
+               create \
+               delete \
+               fork \
+               gist \
+               pr \
+               pull-request \
+               release \
+               issue \
+               sync
+
+# Generate hub man pages
 pre-install:
+.for hc in ${HUB_COMMANDS}
+       cd ${WRKDIR} && \
+           ./bin/hub help ${hc} --plain-text > \
+               src/github.com/github/hub/share/man/man1/hub-${hc}.1.md
+.endfor
        cd ${WRKDIR} && \
            ./bin/md2roff-bin --manual="hub manual" \
                --version=${PKGVERSION_NOREV} \
                --template=src/github.com/github/hub/man-template.html \
-               src/github.com/github/hub/share/man/man1/hub.1.md
+               src/github.com/github/hub/share/man/man1/*.md
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKDIR}/bin/hub ${DESTDIR}${PREFIX}/bin
        ${INSTALL_MAN} ${WRKSRC}/share/man/man1/hub.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.for hc in ${HUB_COMMANDS}
+       ${INSTALL_MAN} ${WRKSRC}/share/man/man1/hub-${hc}.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.endfor
 
 .include "../../lang/go/go-package.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r cbcd33ee7934 -r fe8b8a566351 net/hub/PLIST
--- a/net/hub/PLIST     Thu Jan 09 11:52:35 2020 +0000
+++ b/net/hub/PLIST     Thu Jan 09 11:59:53 2020 +0000
@@ -1,3 +1,17 @@
-@comment $NetBSD: PLIST,v 1.1 2018/02/27 17:08:35 leot Exp $
+@comment $NetBSD: PLIST,v 1.2 2020/01/09 11:59:53 leot Exp $
 bin/hub
+man/man1/hub-alias.1
+man/man1/hub-api.1
+man/man1/hub-browse.1
+man/man1/hub-ci-status.1
+man/man1/hub-compare.1
+man/man1/hub-create.1
+man/man1/hub-delete.1
+man/man1/hub-fork.1
+man/man1/hub-gist.1
+man/man1/hub-issue.1
+man/man1/hub-pr.1
+man/man1/hub-pull-request.1
+man/man1/hub-release.1
+man/man1/hub-sync.1
 man/man1/hub.1



Home | Main Index | Thread Index | Old Index