freebsd-ports/security/crowdsec-firewall-bouncer/Makefile
Marco Mariani e7efe5be3f security/crowdsec-firewall-bouncer: include configuration patch
The update to 0.0.28 from PR 274213  did not include a file that sets
backend mode in new installations. If the backend is not set, the
application does not start.

This version includes the missing patch file, and also sets the
$BACKEND environment variable as a fallback. The application will
substitute it at runtime if required.

PR:		274213, 274529
Fixes:		714e7fb44f
2023-10-19 03:07:30 -04:00

52 lines
1.2 KiB
Makefile

PORTNAME= crowdsec-firewall-bouncer
PORTREVISION= 1
DISTVERSIONPREFIX= v
DISTVERSION= 0.0.28
CATEGORIES= security
MAINTAINER= marco@crowdsec.net
COMMENT= CrowdSec bouncer written in golang for firewalls
WWW= https://github.com/crowdsecurity/cs-firewall-bouncer
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go:modules
_COMMIT= af6e7e2
_BUILD_DATE= $$(date -u "+%F_%T")
USE_RC_SUBR= crowdsec_firewall
GO_MODULE= github.com/crowdsecurity/cs-firewall-bouncer
GO_TARGET= ${PORTNAME}:./${PORTNAME}
GO_BUILDFLAGS= -trimpath -tags netgo \
-ldflags="\
-a -s -w -extldflags '-static' \
-X github.com/crowdsecurity/go-cs-lib/version.Version=${DISTVERSIONPREFIX}${DISTVERSION}-freebsd \
-X github.com/crowdsecurity/go-cs-lib/version.BuildDate=${_BUILD_DATE} \
-X github.com/crowdsecurity/go-cs-lib/version.Tag=${_COMMIT}"
CGO_ENABLED= 0
SUB_FILES= pkg-deinstall \
pkg-install \
pkg-message
ETCDIR= ${PREFIX}/etc/crowdsec/bouncers
do-install:
#
# Binaries
#
${INSTALL_PROGRAM} ${WRKDIR}/bin/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
#
# Configuration
#
@${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/config/${PORTNAME}.yaml \
${STAGEDIR}${ETCDIR}/${PORTNAME}.yaml.sample
.include <bsd.port.mk>