| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DEB_VERSION=$(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') |
| 4 |
export BUILD_VERSION=v${DEB_VERSION}-debian-pragmatic |
| 5 |
export GO111MODULE=on |
| 6 |
|
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ |
| 10 |
|
| 11 |
override_dh_systemd_start: |
| 12 |
echo "Not running dh_systemd_start" |
| 13 |
override_dh_auto_clean: |
| 14 |
override_dh_auto_test: |
| 15 |
override_dh_auto_build: |
| 16 |
override_dh_auto_install: |
| 17 |
make |
| 18 |
|
| 19 |
mkdir -p debian/crowdsec-firewall-bouncer-iptables/usr/sbin |
| 20 |
mkdir -p debian/crowdsec-firewall-bouncer-nftables/usr/sbin |
| 21 |
|
| 22 |
cp crowdsec-firewall-bouncer debian/crowdsec-firewall-bouncer-iptables/usr/sbin |
| 23 |
cp crowdsec-firewall-bouncer debian/crowdsec-firewall-bouncer-nftables/usr/sbin |
| 24 |
|
| 25 |
mkdir -p debian/crowdsec-firewall-bouncer-iptables/etc/crowdsec/bouncers/ |
| 26 |
mkdir -p debian/crowdsec-firewall-bouncer-nftables/etc/crowdsec/bouncers/ |
| 27 |
install -m 0600 config/crowdsec-firewall-bouncer.yaml debian/crowdsec-firewall-bouncer-iptables/etc/crowdsec/bouncers/ |
| 28 |
install -m 0600 config/crowdsec-firewall-bouncer.yaml debian/crowdsec-firewall-bouncer-nftables/etc/crowdsec/bouncers/ |
| 29 |
|
| 30 |
mkdir -p debian/crowdsec-firewall-bouncer-iptables/etc/systemd/system/ |
| 31 |
mkdir -p debian/crowdsec-firewall-bouncer-nftables/etc/systemd/system/ |
| 32 |
|
| 33 |
BIN=/usr/sbin/crowdsec-firewall-bouncer CFG=/etc/crowdsec/bouncers/ envsubst < config/crowdsec-firewall-bouncer.service > debian/crowdsec-firewall-bouncer-iptables/etc/systemd/system/crowdsec-firewall-bouncer.service |
| 34 |
BIN=/usr/sbin/crowdsec-firewall-bouncer CFG=/etc/crowdsec/bouncers/ envsubst < config/crowdsec-firewall-bouncer.service > debian/crowdsec-firewall-bouncer-nftables/etc/systemd/system/crowdsec-firewall-bouncer.service |
| 35 |
|