Lines 2-8
Link Here
|
2 |
|
2 |
|
3 |
PORTNAME= gh |
3 |
PORTNAME= gh |
4 |
DISTVERSIONPREFIX= v |
4 |
DISTVERSIONPREFIX= v |
5 |
DISTVERSION= 0.8.0 |
5 |
DISTVERSION= 0.9.0 |
6 |
CATEGORIES= devel |
6 |
CATEGORIES= devel |
7 |
|
7 |
|
8 |
MAINTAINER= vulcan@wired.sh |
8 |
MAINTAINER= vulcan@wired.sh |
Lines 65-86
Link Here
|
65 |
-X github.com/${GH_ACCOUNT}/${GH_PROJECT}/command.Version=${_BUILD_VERSION} \ |
65 |
-X github.com/${GH_ACCOUNT}/${GH_PROJECT}/command.Version=${_BUILD_VERSION} \ |
66 |
-X github.com/${GH_ACCOUNT}/${GH_PROJECT}/command.BuildDate=${_BUILD_DATE}" |
66 |
-X github.com/${GH_ACCOUNT}/${GH_PROJECT}/command.BuildDate=${_BUILD_DATE}" |
67 |
|
67 |
|
68 |
PLIST_FILES= bin/${PORTNAME} \ |
68 |
_DOCS= README.md docs/gh-vs-hub.md docs/releasing.md \ |
69 |
etc/bash_completion.d/${PORTNAME} \ |
69 |
docs/command-line-syntax.md docs/source.md |
70 |
share/fish/completions/${PORTNAME}.fish \ |
70 |
PORTDOCS= ${_DOCS:T} |
71 |
share/zsh/site-functions/_${PORTNAME} |
|
|
72 |
PORTDOCS= ${DOCS:T} |
73 |
|
71 |
|
74 |
OPTIONS_DEFINE= DOCS |
72 |
OPTIONS_DEFINE= COMPLETIONS DOCS MANPAGES |
|
|
73 |
OPTIONS_DEFAULT= COMPLETIONS MANPAGES |
74 |
OPTIONS_SUB= yes |
75 |
|
75 |
|
76 |
DOCS= README.md docs/gh-vs-hub.md docs/releasing.md docs/source.md |
76 |
COMPLETIONS_DESC= Build and install shell completions for bash, fish and zsh |
|
|
77 |
MANPAGES_DESC= Build and install auto-generated manpages |
77 |
|
78 |
|
78 |
post-build: |
79 |
do-build-COMPLETIONS-on: |
79 |
.for shell in bash fish zsh |
80 |
.for SHELL in bash fish zsh |
80 |
${WRKDIR}/bin/${PORTNAME} completion -s ${shell} > ${WRKSRC}/${shell} |
81 |
${WRKDIR}/bin/${PORTNAME} completion -s ${SHELL} > ${WRKSRC}/${SHELL} |
81 |
.endfor |
82 |
.endfor |
82 |
|
83 |
|
83 |
post-install: |
84 |
do-build-MANPAGES-on: |
|
|
85 |
cd ${WRKSRC} && \ |
86 |
${SETENV} ${MAKE_ENV} GOFLAGS="-mod=vendor" go run ./cmd/gen-docs --man-page --doc-path docs/man/ |
87 |
|
88 |
post-install-COMPLETIONS-on: |
84 |
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d |
89 |
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d |
85 |
${INSTALL_DATA} ${WRKSRC}/bash \ |
90 |
${INSTALL_DATA} ${WRKSRC}/bash \ |
86 |
${STAGEDIR}${PREFIX}/etc/bash_completion.d/${PORTNAME} |
91 |
${STAGEDIR}${PREFIX}/etc/bash_completion.d/${PORTNAME} |
Lines 93-98
Link Here
|
93 |
|
98 |
|
94 |
post-install-DOCS-on: |
99 |
post-install-DOCS-on: |
95 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
100 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
96 |
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR} |
101 |
cd ${WRKSRC} && ${INSTALL_DATA} ${_DOCS} ${STAGEDIR}${DOCSDIR} |
97 |
|
102 |
|
|
|
103 |
post-install-MANPAGES-on: |
104 |
${INSTALL_MAN} ${WRKSRC}/docs/man/*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 |
105 |
|
98 |
.include <bsd.port.mk> |
106 |
.include <bsd.port.mk> |