Changeset View
Changeset View
Standalone View
Standalone View
head/net/traefik/Makefile
Show All 17 Lines | |||||
USES= go | USES= go | ||||
USE_GITHUB= yes | USE_GITHUB= yes | ||||
GH_ACCOUNT= containous | GH_ACCOUNT= containous | ||||
GH_SUBDIR= src/github.com/containous/traefik | GH_SUBDIR= src/github.com/containous/traefik | ||||
USE_RC_SUBR= 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 | USERS= traefik | ||||
GROUPS= traefik | GROUPS= traefik | ||||
PLIST_FILES= bin/traefik \ | PLIST_FILES= bin/traefik \ | ||||
"@sample etc/traefik.toml.sample" | "@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 | # Recipe for building the web UI | ||||
# Note this is not done during a standard port build as | # Note this is not done during a standard port build as | ||||
# it downloads node modules from the internet during build. | # it downloads node modules from the internet during build. | ||||
# Instead, we use the pre-generated from LOCAL. | # Instead, we use the pre-generated from LOCAL. | ||||
# (20180510: the upath module requires node < 10) | # (20180510: the upath module requires node < 10) | ||||
# BUILD_DEPENDS+= npm:www/npm \ | # BUILD_DEPENDS+= npm:www/npm \ | ||||
# yarnpkg:www/yarn | # yarnpkg:www/yarn | ||||
#USES+= python:2.7,build | #USES+= python:2.7,build | ||||
#pre-build: | #pre-build: | ||||
# @cd ${WRKSRC}/webui; \ | # @cd ${WRKSRC}/webui; \ | ||||
# yarn install && \ | # yarn install && \ | ||||
# yarn run build | # yarn run build | ||||
post-extract: | post-patch: | ||||
@${MV} ${WRKDIR}/static ${WRKSRC} | @${MV} ${WRKDIR}/static ${WRKSRC} | ||||
# Install a sample configuration file which works by default | # Install a sample configuration file which works by default | ||||
# without manual tweaking | # without manual tweaking | ||||
${REINPLACE_CMD} -e 's|:80|:8088|' \ | ${REINPLACE_CMD} -e 's|:80|:8088|' \ | ||||
-e 's|\[docker|# \[docker|' ${WRKSRC}/traefik.sample.toml | -e 's|\[docker|# \[docker|' ${WRKSRC}/traefik.sample.toml | ||||
do-build: | pre-build: | ||||
@cd ${WRKSRC}/src/github.com/containous/traefik; \ | cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} generate | ||||
${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 | |||||
do-install: | post-install: | ||||
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/containous/traefik/traefik ${STAGEDIR}${PREFIX}/bin/traefik | ${INSTALL_DATA} ${WRKSRC}/traefik.sample.toml ${STAGEDIR}${PREFIX}/etc/traefik.toml.sample | ||||
${INSTALL_DATA} ${WRKSRC}/src/github.com/containous/traefik/traefik.sample.toml ${STAGEDIR}${PREFIX}/etc/traefik.toml.sample | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |