aboutsummaryrefslogtreecommitdiff
path: root/net/traefik
diff options
context:
space:
mode:
authorDmitri Goutnik <dmgk@FreeBSD.org>2019-09-29 22:31:57 +0000
committerDmitri Goutnik <dmgk@FreeBSD.org>2019-09-29 22:31:57 +0000
commit67c4b925b7fd606361a2152563b80da493232dfb (patch)
tree16884a4188ae95c6d4b3c8e73cfaf24404fd28e8 /net/traefik
parent34156e93e84fe00711fac9dbf19e33534dc665f9 (diff)
downloadports-67c4b925b7fd606361a2152563b80da493232dfb.tar.gz
ports-67c4b925b7fd606361a2152563b80da493232dfb.zip
Go ports: cleanup, finish transition to USES=go started with r505321 (cat. misc-shells)
- Remove custom build/install targets left in place after r505321 - Switch to the new GO_TARGET tuple syntax introduced in r512001 - Switch to go:modules when upstream already uses them Reviewed by: tobik Approved by: araujo (mentor), portmgr (adamw) Differential Revision: https://reviews.freebsd.org/D21743
Notes
Notes: svn path=/head/; revision=513275
Diffstat (limited to 'net/traefik')
-rw-r--r--net/traefik/Makefile26
1 files changed, 11 insertions, 15 deletions
diff --git a/net/traefik/Makefile b/net/traefik/Makefile
index c6149587db63..9cc3f657009f 100644
--- a/net/traefik/Makefile
+++ b/net/traefik/Makefile
@@ -23,19 +23,18 @@ GH_SUBDIR= src/github.com/containous/traefik
USE_RC_SUBR= traefik
+GO_BUILDFLAGS= -ldflags "-s -w \
+ -X github.com/containous/traefik/version.Version=${DISTVERSION} \
+ -X github.com/containous/traefik/version.BuildDate=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"
+GO_TARGET= ./cmd/traefik
+CGO_ENABLED= 0
+
USERS= traefik
GROUPS= traefik
PLIST_FILES= bin/traefik \
"@sample etc/traefik.toml.sample"
-TRAEFIK_BUILD_ENV= ${MAKE_ENV} \
- CGO_ENABLED=0
-
-TRAEFIK_LDARGS= -ldflags "-s -w \
- -X github.com/containous/traefik/version.Version=${DISTVERSION} \
- -X github.com/containous/traefik/version.BuildDate=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"
-
# Recipe for building the web UI
# Note this is not done during a standard port build as
# it downloads node modules from the internet during build.
@@ -49,20 +48,17 @@ TRAEFIK_LDARGS= -ldflags "-s -w \
# yarn install && \
# yarn run build
-post-extract:
+post-patch:
@${MV} ${WRKDIR}/static ${WRKSRC}
# Install a sample configuration file which works by default
# without manual tweaking
${REINPLACE_CMD} -e 's|:80|:8088|' \
-e 's|\[docker|# \[docker|' ${WRKSRC}/traefik.sample.toml
-do-build:
- @cd ${WRKSRC}/src/github.com/containous/traefik; \
- ${SETENV} ${BUILD_ENV} ${TRAEFIK_BUILD_ENV} GOPATH=${WRKSRC} go generate && \
- ${SETENV} ${BUILD_ENV} ${TRAEFIK_BUILD_ENV} GOPATH=${WRKSRC} go build ${TRAEFIK_LDARGS} -v -x ./cmd/traefik
+pre-build:
+ cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} generate
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/containous/traefik/traefik ${STAGEDIR}${PREFIX}/bin/traefik
- ${INSTALL_DATA} ${WRKSRC}/src/github.com/containous/traefik/traefik.sample.toml ${STAGEDIR}${PREFIX}/etc/traefik.toml.sample
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/traefik.sample.toml ${STAGEDIR}${PREFIX}/etc/traefik.toml.sample
.include <bsd.port.mk>