blob: 69bd032028ba580a2789cd588e99b76e1d713f7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# $NetBSD: Makefile,v 1.64 2022/04/13 07:50:51 bsiegert Exp $
DISTNAME= hub-2.14.2
PKGREVISION= 24
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GITHUB:=github/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= leot@NetBSD.org
HOMEPAGE= https://hub.github.com/
COMMENT= Command-line tool that makes git easier to use with GitHub
LICENSE= mit
GO_BUILD_PATTERN= ./...
.include "go-modules.mk"
DEPENDS+= git-base>=1.7.3:../../devel/git-base
SUBST_CLASSES+= man
SUBST_STAGE.man= pre-configure
SUBST_MESSAGE.man= Fix hub name in hub(1) man page
SUBST_FILES.man= share/man/man1/hub.1.md
SUBST_SED.man+= -e 's/\$$ git/$$ hub/'
SUBST_SED.man+= -e '/\$$ GITHUB_HOST=/ s/ git clone / hub clone /'
INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1
CHECK_RELRO_SKIP+= bin/hub
# 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 ${WRKSRC} && \
../.gopath/bin/hub help ${hc} --plain-text > \
share/man/man1/hub-${hc}.1.md
.endfor
cd ${WRKSRC} && \
../.gopath/bin/md2roff-bin --manual="hub manual" \
--version=${PKGVERSION_NOREV} \
--template=man-template.html \
share/man/man1/*.md
do-install:
${INSTALL_PROGRAM} ${WRKDIR}/.gopath/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-module.mk"
.include "../../mk/bsd.pkg.mk"
|