Lines 1-40
Link Here
|
1 |
PORTNAME= crowdsec-firewall-bouncer |
1 |
PORTNAME= crowdsec-firewall-bouncer |
2 |
PORTVERSION= 0.0.13 |
2 |
PORTVERSION= 0.0.17 # NOTE: change BUILD_VERSION and BUILD_TAG as well |
3 |
DISTVERSIONPREFIX= v |
3 |
DISTVERSIONPREFIX= v |
4 |
CATEGORIES= security |
4 |
CATEGORIES= security |
5 |
|
5 |
|
6 |
MAINTAINER= sbz@FreeBSD.org |
6 |
MAINTAINER= marco@crowdsec.net |
7 |
COMMENT= Crowdsec bouncer written in golang for firewalls |
7 |
COMMENT= CrowdSec bouncer written in golang for firewalls |
8 |
|
8 |
|
9 |
LICENSE= MIT |
9 |
LICENSE= MIT |
10 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
10 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
11 |
|
11 |
|
|
|
12 |
BUILD_DEPENDS= git:devel/git@lite \ |
13 |
go:lang/go |
14 |
|
15 |
USES= gmake |
16 |
|
12 |
RUN_DEPENDS= crowdsec>0:security/crowdsec |
17 |
RUN_DEPENDS= crowdsec>0:security/crowdsec |
13 |
|
18 |
|
14 |
USES= go:modules |
19 |
USE_GITHUB= yes |
|
|
20 |
GH_ACCOUNT= crowdsecurity |
21 |
GH_PROJECT= cs-firewall-bouncer |
22 |
#GH_TAGNAME is automatically set from DISTVERSION |
15 |
|
23 |
|
16 |
USE_RC_SUBR= crowdsec_firewall |
24 |
USE_RC_SUBR= crowdsec_firewall |
17 |
|
25 |
|
18 |
GO_MODULE= github.com/crowdsecurity/cs-firewall-bouncer |
26 |
SUB_FILES= pkg-message \ |
|
|
27 |
pkg-deinstall |
28 |
|
29 |
# BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) |
30 |
# BUILD_TAG=$(git rev-parse HEAD) |
31 |
MAKE_ENV= BUILD_VERSION="v0.0.17" \ |
32 |
BUILD_TAG="b330209afcdefd0046fd6790999bbb342c02f1b3" |
19 |
|
33 |
|
20 |
GO_BUILDFLAGS= -ldflags "-s -w \ |
34 |
ETCDIR= ${PREFIX}/etc/crowdsec/bouncers |
21 |
-X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Version=v${PORTVERSION} \ |
|
|
22 |
-X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Tag=freebsd \ |
23 |
-X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.BuildDate=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" |
24 |
|
35 |
|
25 |
SUB_FILES= pkg-message |
36 |
do-patch: |
|
|
37 |
cd ${WRKSRC} && go mod download github.com/mattn/go-sqlite3 |
26 |
|
38 |
|
27 |
post-patch: |
39 |
post-patch: |
28 |
${REINPLACE_CMD} 's,$${BACKEND},pf,g' \ |
40 |
${REINPLACE_CMD} 's,$${BACKEND},pf,g' \ |
29 |
${WRKSRC}/config/crowdsec-firewall-bouncer.yaml |
41 |
${WRKSRC}/config/crowdsec-firewall-bouncer.yaml |
30 |
|
42 |
|
31 |
do-install: |
43 |
do-install: |
32 |
@${MKDIR} ${STAGEDIR}${ETCDIR} |
44 |
# |
|
|
45 |
# Binaries |
46 |
# |
47 |
|
48 |
${INSTALL_PROGRAM} ${WRKSRC}/crowdsec-firewall-bouncer \ |
49 |
${STAGEDIR}${PREFIX}/bin/crowdsec-firewall-bouncer |
50 |
|
51 |
# |
52 |
# Configuration |
53 |
# |
33 |
|
54 |
|
|
|
55 |
@${MKDIR} ${STAGEDIR}${ETCDIR} |
34 |
${INSTALL_DATA} ${WRKSRC}/config/crowdsec-firewall-bouncer.yaml \ |
56 |
${INSTALL_DATA} ${WRKSRC}/config/crowdsec-firewall-bouncer.yaml \ |
35 |
${STAGEDIR}${ETCDIR}/crowdsec-firewall-bouncer.yaml.sample |
57 |
${STAGEDIR}${ETCDIR}/crowdsec-firewall-bouncer.yaml.sample |
36 |
|
58 |
|
37 |
${INSTALL_PROGRAM} ${WRKDIR}/bin/crowdsec-firewall-bouncer \ |
|
|
38 |
${STAGEDIR}${PREFIX}/bin/crowdsec-firewall-bouncer |
39 |
|
40 |
.include <bsd.port.mk> |
59 |
.include <bsd.port.mk> |