pkgsrc/net/hub/Makefile

69 lines
1.7 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.62 2022/02/13 19:24:22 bsiegert Exp $
DISTNAME= hub-2.14.2
PKGREVISION= 22
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
hub: Update net/hub to 2.3.0 pkgsrc changes: - Add a files/hub.1 to avoid picking up devel/ruby-ronn as a TOOL_DEPENDS Changes: 2.3.0 ----- This is a long-awaited release of hub with an abudance of new features. Thank you everyone for testing out prereleases, reporting bugs, and submitting pull requests! The work of 76 contributors went into this release. ## New commands * `hub issue`: list and create issues and labels Usage: hub issue [-a <ASSIGNEE>] [-c <CREATOR>] [-@ <USER>] [-s <STATE>] [-f <FORMAT>] [-M <MILESTONE>] [-l <LABELS>] [-d <DATE>] [-o <SORT_KEY> [-^]] [-L <LIMIT>] hub issue create [-oc] [-m <MESSAGE>|-F <FILE>] [-a <USERS>] [-M <MILESTONE>] [-l <LABELS>] hub issue labels [--color] * `hub pr list`: list pull requests for the current repository * `hub pr checkout <NUMBER>`: checkout a pull request by its number * `hub release`: list, create, edit, and delete releases and attachments Usage: hub release [--include-drafts] [--exclude-prereleases] [-L <LIMIT>] hub release show <TAG> hub release create [-dpoc] [-a <FILE>] [-m <MESSAGE>|-F <FILE>] [-t <TARGET>] <TAG> hub release edit [<options>] <TAG> hub release delete <TAG> * `hub sync`: fetch updates from remote repository and sync all local branches to their upstream equivalents, purging merged ones ## Improved commands * `hub pull-request` now has the ability to set assignees, labels, reviewers, and milestones. Usage: hub pull-request [-focp] [-b <BASE>] [-h <HEAD>] [-r <REVIEWERS> ] [-a <ASSIGNEES>] [-M <MILESTONE>] [-l <LABELS>] hub pull-request -m <MESSAGE> hub pull-request -F <FILE> [--edit] hub pull-request -i <ISSUE> * `hub pull-request` and `hub issue create` now support pull request and issue templates. * Commands that print the resulting URL, such as `hub pull-request` or `hub create`, now accept `--copy` to put the URL to the system clipboard instead. * `hub pull-request` now supports `--push` and `--open` flags to push the head branch to the remote and open the resulting PR in a web browser, respectively. * `hub pull-request` now strips away the `Signed-off-by` line and the commit signature when generating the default pull request message. * Commands that take input via `-m` or `-F` arguments now also respect `--edit` to additionally edit the text in a text editor before submitting. * Support `core.commentchar=auto` git configuration when editing pull request/issue/release message in a text editor. * Support `/OWNER/REPO/pull/XYZ/commits/SHA` format of URLs as argument to `cherry-pick`, `am`, and `apply`. * Commands such as `cherry-pick`, `merge <PR-URL>`, and `checkout <PR-URL>` don't leave leftover git remotes anymore. * New `hub compare -b BASE` flag. * New `hub fork --org=ORGANIZATION` flag. * New `hub fork --remote-name=NAME` flag to configure the new git remote. * New, manpage-based help system; see `hub help hub` and `hub help hub-<command>`. * Added fish shell completion script. * When prompted to authenticate with username/password, pasting a Personal Access Token now works just as well instead of the password.
2018-06-01 17:42:22 +02:00
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"