From 2c03ac4cf5690397e2f46df51a65c12cc4fd71fb Mon Sep 17 00:00:00 2001 From: yo Date: Sat, 30 Mar 2024 17:50:51 +0100 Subject: [PATCH] Add freebsd binary build --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a1d4b20..2d698df 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ PREFIX ?= /usr/local BINDIR = $(PREFIX)/bin SYSTEMDDIR ?= /etc/systemd -all: reaction ip46tables nft46 +all: reaction reaction.freebsd ip46tables nft46 clean: - rm -f reaction ip46tables nft46 reaction.deb deb reaction.minisig ip46tables.minisig reaction.deb.minisig nft46.minisig + rm -f reaction reaction.freebsd ip46tables nft46 reaction.deb deb reaction.minisig ip46tables.minisig reaction.deb.minisig nft46.minisig ip46tables: helpers_c/ip46tables.c $(CC) -s -static helpers_c/ip46tables.c -o ip46tables @@ -17,6 +17,9 @@ nft46: helpers_c/nft46.c reaction: app/* reaction.go go.mod go.sum CGO_ENABLED=0 go build -buildvcs=false -ldflags "-s -X main.version=`git tag --sort=v:refname | tail -n1` -X main.commit=`git rev-parse --short HEAD`" +reaction.freebsd: app/* reaction.go go.mod go.sum + GOOS=freebsd CGO_ENABLED=0 go build -buildvcs=false -ldflags "-s -X main.version=`git tag --sort=v:refname | tail -n1` -X main.commit=`git rev-parse --short HEAD`" -o reaction.freebsd + reaction.deb: reaction ip46tables nft46 chmod +x reaction ip46tables nft46 mkdir -p deb/reaction/usr/bin/ deb/reaction/usr/sbin/ deb/reaction/lib/systemd/system/