pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/hub



Module Name:    pkgsrc
Committed By:   leot
Date:           Thu Jan  9 11:59:53 UTC 2020

Modified Files:
        pkgsrc/net/hub: Makefile PLIST

Log Message:
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++


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 pkgsrc/net/hub/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/hub/PLIST

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/hub/Makefile
diff -u pkgsrc/net/hub/Makefile:1.35 pkgsrc/net/hub/Makefile:1.36
--- pkgsrc/net/hub/Makefile:1.35        Thu Jan  2 11:52:48 2020
+++ pkgsrc/net/hub/Makefile     Thu Jan  9 11:59:53 2020
@@ -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 @@ INSTALLATION_DIRS+= bin ${PKGMANDIR}/man
 
 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"

Index: pkgsrc/net/hub/PLIST
diff -u pkgsrc/net/hub/PLIST:1.1 pkgsrc/net/hub/PLIST:1.2
--- pkgsrc/net/hub/PLIST:1.1    Tue Feb 27 17:08:35 2018
+++ pkgsrc/net/hub/PLIST        Thu Jan  9 11:59:53 2020
@@ -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