aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authordanilo <danilo@FreeBSD.org>2018-08-20 11:13:46 +0800
committerdanilo <danilo@FreeBSD.org>2018-08-20 11:13:46 +0800
commit8b0f1cb2469312f1ddc15a1214d0312d797b4ba0 (patch)
tree0e8177f17f662d278100169bf052b2c5df8575cb /sysutils
parent08e5ac0db6f190b641a5923cabd7694a6bee6f45 (diff)
downloadfreebsd-ports-gnome-8b0f1cb2469312f1ddc15a1214d0312d797b4ba0.tar.gz
freebsd-ports-gnome-8b0f1cb2469312f1ddc15a1214d0312d797b4ba0.tar.zst
freebsd-ports-gnome-8b0f1cb2469312f1ddc15a1214d0312d797b4ba0.zip
- Use GH_SUBDIR instead of post-patch
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/kubectl/Makefile13
1 files changed, 5 insertions, 8 deletions
diff --git a/sysutils/kubectl/Makefile b/sysutils/kubectl/Makefile
index bca5276f9ecc..98665234c28f 100644
--- a/sysutils/kubectl/Makefile
+++ b/sysutils/kubectl/Makefile
@@ -16,25 +16,22 @@ USES= go
USE_GITHUB= yes
GH_ACCOUNT= kubernetes
GH_PROJECT= kubernetes
+GH_SUBDIR= src/k8s.io/kubernetes
PLIST_FILES= bin/${PORTNAME}
-post-patch:
- ${LN} -s ${WRKSRC}/vendor ${WRKSRC}/src
- ${MKDIR} ${WRKSRC}/src/k8s.io/kubernetes
- ${LN} -s ${WRKSRC}/pkg ${WRKSRC}/src/k8s.io/kubernetes/pkg
-
do-build:
- cd ${WRKSRC}/cmd/${PORTNAME} && \
+ cd ${WRKSRC}/${GH_SUBDIR} && \
GOPATH=${WRKSRC} go build \
-ldflags="-X k8s.io/kubernetes/pkg/version.gitMajor=${PORTVERSION:R:R} \
-X k8s.io/kubernetes/pkg/version.gitMinor=${PORTVERSION:R:E} \
-X k8s.io/kubernetes/pkg/version.buildDate=$$(date +'%Y-%m-%dT%H:%M:%SZ') \
- -X k8s.io/kubernetes/pkg/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION}"
+ -X k8s.io/kubernetes/pkg/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION}" \
+ ./cmd/${PORTNAME}
do-install:
${INSTALL_PROGRAM} \
- ${WRKSRC}/cmd/${PORTNAME}/${PORTNAME} \
+ ${WRKSRC}/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk>