Import net/traefik2 version 2.2.0
[dports.git] / net / traefik2 / Makefile
1 # $FreeBSD$
2
3 PORTNAME=       traefik2
4 DISTVERSIONPREFIX=      v
5 DISTVERSION=    2.2.0
6 DISTVERSIONSUFFIX=      -vendor
7 CATEGORIES=     net
8
9 MAINTAINER=     freebsd@funzi.org
10 COMMENT=        High availability reverse proxy and load balancer
11
12 LICENSE=        MIT
13 LICENSE_FILE=   ${WRKSRC}/LICENSE.md
14
15 USES=           go:modules
16
17 USE_GITHUB=     yes
18 GH_ACCOUNT=     Funzinator
19 GH_PROJECT=     traefik
20 GH_SUBDIR=      src/github.com/containous/traefik
21
22 USE_RC_SUBR=    traefik
23
24 GO_BUILDFLAGS=  -ldflags "-s -w \
25                 -X github.com/containous/traefik/v2/pkg/version.Version=${DISTVERSION} \
26                 -X github.com/containous/traefik/v2/pkg/version.Codename=chevrotin \
27                 -X github.com/containous/traefik/v2/pkg/version.BuildDate=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"
28 GO_TARGET=      ./cmd/traefik
29 CGO_ENABLED=    0
30
31 USERS=          traefik
32 GROUPS=         traefik
33
34 PLIST_FILES=    bin/traefik \
35                 "@sample etc/traefik.toml.sample"
36
37 post-patch:
38         # Install a sample configuration file which works by default
39         # without manual tweaking
40         ${REINPLACE_CMD} -e 's|:80|:8088|' -e 's|:443|:8443|' \
41                          -e 's|\[docker|# \[docker|' ${WRKSRC}/traefik.sample.toml
42
43 post-install:
44         ${INSTALL_DATA} ${WRKSRC}/traefik.sample.toml ${STAGEDIR}${PREFIX}/etc/traefik.toml.sample
45
46 .include <bsd.port.mk>