github.com/crowdsecurity/crowdsec@v1.6.1/debian/rules (about)

     1  #!/usr/bin/make -f
     2  
     3  export DEB_VERSION=$(shell dpkg-parsechangelog | grep -E '^Version:' | cut -f 2 -d ' ')
     4  export BUILD_VERSION=v${DEB_VERSION}-debian-pragmatic
     5  export GO111MODULE=on
     6  
     7  %:
     8  	dh $@
     9  
    10  override_dh_auto_clean:
    11  override_dh_auto_test:
    12  override_dh_auto_build:
    13  override_dh_auto_install:
    14  
    15  	# just use the prebuilt binaries, otherwise:
    16  	# make build BUILD_RE_WASM=0 BUILD_STATIC=1
    17  
    18  	mkdir -p debian/crowdsec/usr/bin
    19  	mkdir -p debian/crowdsec/etc/crowdsec
    20  	mkdir -p debian/crowdsec/usr/share/crowdsec
    21  	mkdir -p debian/crowdsec/etc/crowdsec/hub/
    22  	mkdir -p debian/crowdsec/usr/share/crowdsec/config
    23  	mkdir -p debian/crowdsec/etc/crowdsec/console/
    24  
    25  	mkdir -p debian/crowdsec/usr/lib/crowdsec/plugins/
    26  	mkdir -p debian/crowdsec/etc/crowdsec/notifications/
    27  
    28  	install -m 551 cmd/notification-slack/notification-slack debian/crowdsec/usr/lib/crowdsec/plugins/
    29  	install -m 551 cmd/notification-http/notification-http debian/crowdsec/usr/lib/crowdsec/plugins/
    30  	install -m 551 cmd/notification-splunk/notification-splunk debian/crowdsec/usr/lib/crowdsec/plugins/
    31  	install -m 551 cmd/notification-email/notification-email debian/crowdsec/usr/lib/crowdsec/plugins/
    32  	install -m 551 cmd/notification-sentinel/notification-sentinel debian/crowdsec/usr/lib/crowdsec/plugins/
    33  
    34  	cp cmd/crowdsec/crowdsec debian/crowdsec/usr/bin
    35  	cp cmd/crowdsec-cli/cscli debian/crowdsec/usr/bin
    36  	cp wizard.sh debian/crowdsec/usr/share/crowdsec
    37  	install -m 600 config/config.yaml debian/crowdsec/etc/crowdsec/config.yaml
    38  	cp config/simulation.yaml debian/crowdsec/etc/crowdsec/simulation.yaml
    39  	cp config/profiles.yaml debian/crowdsec/etc/crowdsec/profiles.yaml
    40  	cp config/context.yaml debian/crowdsec/etc/crowdsec/console/context.yaml
    41  	cp config/console.yaml debian/crowdsec/etc/crowdsec/console.yaml
    42  	cp -a config/patterns debian/crowdsec/etc/crowdsec
    43  
    44  override_dh_fixperms:
    45  	dh_fixperms
    46  	chmod 600 debian/crowdsec/etc/crowdsec/notifications/*
    47  	chmod 600 debian/crowdsec/etc/crowdsec/config.yaml