aboutsummaryrefslogtreecommitdiff
path: root/security/crowdsec-firewall-bouncer/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'security/crowdsec-firewall-bouncer/Makefile')
-rw-r--r--security/crowdsec-firewall-bouncer/Makefile47
1 files changed, 33 insertions, 14 deletions
diff --git a/security/crowdsec-firewall-bouncer/Makefile b/security/crowdsec-firewall-bouncer/Makefile
index 60925f445797..36a868801a50 100644
--- a/security/crowdsec-firewall-bouncer/Makefile
+++ b/security/crowdsec-firewall-bouncer/Makefile
@@ -1,40 +1,59 @@
PORTNAME= crowdsec-firewall-bouncer
-PORTVERSION= 0.0.13
+PORTVERSION= 0.0.17 # NOTE: change BUILD_VERSION and BUILD_TAG as well
DISTVERSIONPREFIX= v
CATEGORIES= security
-MAINTAINER= sbz@FreeBSD.org
-COMMENT= Crowdsec bouncer written in golang for firewalls
+MAINTAINER= marco@crowdsec.net
+COMMENT= CrowdSec bouncer written in golang for firewalls
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
+BUILD_DEPENDS= git:devel/git@lite \
+ go:lang/go
+
+USES= gmake
+
RUN_DEPENDS= crowdsec>0:security/crowdsec
-USES= go:modules
+USE_GITHUB= yes
+GH_ACCOUNT= crowdsecurity
+GH_PROJECT= cs-firewall-bouncer
+#GH_TAGNAME is automatically set from DISTVERSION
USE_RC_SUBR= crowdsec_firewall
-GO_MODULE= github.com/crowdsecurity/cs-firewall-bouncer
+SUB_FILES= pkg-message \
+ pkg-deinstall
+
+# BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
+# BUILD_TAG=$(git rev-parse HEAD)
+MAKE_ENV= BUILD_VERSION="v0.0.17" \
+ BUILD_TAG="b330209afcdefd0046fd6790999bbb342c02f1b3"
-GO_BUILDFLAGS= -ldflags "-s -w \
- -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Version=v${PORTVERSION} \
- -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Tag=freebsd \
- -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.BuildDate=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"
+ETCDIR= ${PREFIX}/etc/crowdsec/bouncers
-SUB_FILES= pkg-message
+do-patch:
+ cd ${WRKSRC} && go mod download github.com/mattn/go-sqlite3
post-patch:
${REINPLACE_CMD} 's,$${BACKEND},pf,g' \
${WRKSRC}/config/crowdsec-firewall-bouncer.yaml
do-install:
- @${MKDIR} ${STAGEDIR}${ETCDIR}
+ #
+ # Binaries
+ #
+
+ ${INSTALL_PROGRAM} ${WRKSRC}/crowdsec-firewall-bouncer \
+ ${STAGEDIR}${PREFIX}/bin/crowdsec-firewall-bouncer
+
+ #
+ # Configuration
+ #
+ @${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/config/crowdsec-firewall-bouncer.yaml \
${STAGEDIR}${ETCDIR}/crowdsec-firewall-bouncer.yaml.sample
- ${INSTALL_PROGRAM} ${WRKDIR}/bin/crowdsec-firewall-bouncer \
- ${STAGEDIR}${PREFIX}/bin/crowdsec-firewall-bouncer
-
.include <bsd.port.mk>