2021-08-18 11:57:06 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
export DEB_VERSION=$(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
|
|
|
export BUILD_VERSION=v${DEB_VERSION}-debian-pragmatic
|
|
|
|
export GO111MODULE=on
|
|
|
|
|
|
|
|
%:
|
|
|
|
dh $@
|
|
|
|
|
|
|
|
override_dh_auto_clean:
|
|
|
|
override_dh_auto_test:
|
|
|
|
override_dh_auto_build:
|
|
|
|
override_dh_auto_install:
|
|
|
|
# mkdir /tmp/go
|
|
|
|
# echo $(go version)
|
|
|
|
# echo $($GOCMD version)
|
|
|
|
# cd cmd/crowdsec && GOROOT=/tmp/go GO111MODULE=on $(GOBUILD) $(LD_OPTS) -o $(CROWDSEC_BIN) -v && cd ..
|
|
|
|
# cd cmd/crowdsec-cli && GOROOT=/tmp/go GO111MODULE=on $(GOBUILD) $(LD_OPTS) -o cscli -v && cd ..
|
2022-02-18 17:09:19 +00:00
|
|
|
make build
|
2021-08-18 11:57:06 +00:00
|
|
|
mkdir -p debian/crowdsec/usr/bin
|
|
|
|
mkdir -p debian/crowdsec/etc/crowdsec
|
|
|
|
mkdir -p debian/crowdsec/usr/share/crowdsec
|
|
|
|
mkdir -p debian/crowdsec/etc/crowdsec/hub/
|
|
|
|
mkdir -p debian/crowdsec/usr/share/crowdsec/config
|
2023-01-04 15:50:02 +00:00
|
|
|
mkdir -p debian/crowdsec/etc/crowdsec/console/
|
2021-08-25 09:43:29 +00:00
|
|
|
|
2021-09-07 15:18:55 +00:00
|
|
|
mkdir -p debian/crowdsec/usr/lib/crowdsec/plugins/
|
2021-08-25 09:43:29 +00:00
|
|
|
mkdir -p debian/crowdsec/etc/crowdsec/notifications/
|
|
|
|
|
2021-09-07 15:18:55 +00:00
|
|
|
install -m 551 plugins/notifications/slack/notification-slack debian/crowdsec/usr/lib/crowdsec/plugins/
|
|
|
|
install -m 551 plugins/notifications/http/notification-http debian/crowdsec/usr/lib/crowdsec/plugins/
|
|
|
|
install -m 551 plugins/notifications/splunk/notification-splunk debian/crowdsec/usr/lib/crowdsec/plugins/
|
2022-02-02 09:08:32 +00:00
|
|
|
install -m 551 plugins/notifications/email/notification-email debian/crowdsec/usr/lib/crowdsec/plugins/
|
2021-08-25 09:43:29 +00:00
|
|
|
|
2021-08-18 11:57:06 +00:00
|
|
|
cp cmd/crowdsec/crowdsec debian/crowdsec/usr/bin
|
|
|
|
cp cmd/crowdsec-cli/cscli debian/crowdsec/usr/bin
|
|
|
|
cp wizard.sh debian/crowdsec/usr/share/crowdsec
|
2022-05-17 10:50:18 +00:00
|
|
|
install -m 600 config/config.yaml debian/crowdsec/etc/crowdsec/config.yaml
|
2021-09-08 09:36:59 +00:00
|
|
|
cp config/simulation.yaml debian/crowdsec/etc/crowdsec/simulation.yaml
|
|
|
|
cp config/profiles.yaml debian/crowdsec/etc/crowdsec/profiles.yaml
|
2023-01-04 15:50:02 +00:00
|
|
|
cp config/context.yaml debian/crowdsec/etc/crowdsec/console/context.yaml
|
2022-01-21 10:52:23 +00:00
|
|
|
cp config/console.yaml debian/crowdsec/etc/crowdsec/console.yaml
|
2021-09-08 09:36:59 +00:00
|
|
|
cp -a config/patterns debian/crowdsec/etc/crowdsec
|
2022-01-25 19:32:46 +00:00
|
|
|
|
2022-07-12 14:05:27 +00:00
|
|
|
override_dh_fixperms:
|
|
|
|
dh_fixperms
|
2022-09-14 12:23:18 +00:00
|
|
|
chmod 600 debian/crowdsec/etc/crowdsec/notifications/*
|
2022-07-12 14:05:27 +00:00
|
|
|
chmod 600 debian/crowdsec/etc/crowdsec/config.yaml
|