pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/gh



Module Name:    pkgsrc
Committed By:   kim
Date:           Thu May 12 15:45:54 UTC 2022

Modified Files:
        pkgsrc/net/gh: Makefile

Log Message:
gh: Make "gh --version" output the actual version.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 pkgsrc/net/gh/Makefile

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

Modified files:

Index: pkgsrc/net/gh/Makefile
diff -u pkgsrc/net/gh/Makefile:1.39 pkgsrc/net/gh/Makefile:1.40
--- pkgsrc/net/gh/Makefile:1.39 Thu May 12 11:15:14 2022
+++ pkgsrc/net/gh/Makefile      Thu May 12 15:45:54 2022
@@ -1,6 +1,9 @@
-# $NetBSD: Makefile,v 1.39 2022/05/12 11:15:14 kim Exp $
+# $NetBSD: Makefile,v 1.40 2022/05/12 15:45:54 kim Exp $
+
+# Please also update GH_REL_DATE when upgrading to a new release.
 
 DISTNAME=      gh-2.10.1
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=cli/}
 GITHUB_PROJECT=        cli
@@ -15,6 +18,19 @@ DEPENDS+=            git-base-[0-9]*:../../devel/g
 
 GO_BUILD_PATTERN=      ./cmd/gh
 
+GH_REL_DATE=   2022-05-10
+
+# Because we are not calling scripts/build as the Makefile for gh would
+# do, we do not get these flags set. These flags make the output from
+# "gh --version" meaningful.
+
+GH_LDFLAGS=    -X github.com/cli/cli/v2/internal/build.Date=${GH_REL_DATE}
+GH_LDFLAGS+=   -X github.com/cli/cli/v2/internal/build.Version=${PKGVERSION_NOREV}
+
+do-build:
+       ${RUN} cd ${WRKSRC} && ${_ULIMIT_CMD} ${PKGSRC_SETENV} ${MAKE_ENV} \
+               ${GO} install -v -ldflags "${GH_LDFLAGS}" ${GO_BUILD_PATTERN}
+
 .include "go-modules.mk"
 
 .include "../../lang/go/go-module.mk"



Home | Main Index | Thread Index | Old Index