mirror of https://github.com/fail2ban/fail2ban
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.6 KiB
76 lines
2.6 KiB
#!/usr/bin/make -f
|
|
# -*- makefile -*-
|
|
# Sample debian/rules that uses debhelper.
|
|
# This file was originally written by Joey Hess and Craig Small.
|
|
# As a special exception, when this file is copied by dh-make into a
|
|
# dh-make output file, you may use that output file without restriction.
|
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
export DH_VERBOSE=1
|
|
|
|
export PYBUILD_DISABLE_python2=1
|
|
ifneq (,$(filter notest,$(DEB_BUILD_OPTIONS)))
|
|
: # no test in package needed
|
|
export PYBUILD_BUILD_ARGS=--without-tests
|
|
export PYBUILD_INSTALL_ARGS=--without-tests
|
|
endif
|
|
|
|
%:
|
|
dh $@ --with python3 --buildsystem pybuild
|
|
|
|
DESTDIR=$(CURDIR)/debian/fail2ban
|
|
PYVERSION=$(shell py3versions -dv)
|
|
SYSTEMD_SYSTEM_UNIT_DIR = $(shell pkg-config --variable=systemdsystemunitdir systemd)
|
|
override_dh_clean:
|
|
-rm -rf fail2ban.egg-info
|
|
-rm -f debian/fail2ban.init
|
|
dh_clean
|
|
: # auto generated
|
|
-rm -f bin/fail2ban-python
|
|
ifneq (,$(filter notest,$(DEB_BUILD_OPTIONS)))
|
|
: # no test in package needed (2to3 ist faster):
|
|
-rm -f bin/fail2ban-testcases
|
|
-rm -rf fail2ban/tests
|
|
endif
|
|
|
|
override_dh_auto_configure:
|
|
dh_auto_configure
|
|
|
|
override_dh_auto_test:
|
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
|
LC_ALL=C.UTF-8 python3 bin/fail2ban-testcases --verbosity=2 --no-network
|
|
endif
|
|
|
|
override_dh_install:
|
|
rm -f $(DESTDIR)/usr/share/doc/fail2ban/README.Solaris
|
|
find "$(DESTDIR)/etc/fail2ban/" -type f -name 'paths-*.conf' -not -name 'paths-common.conf' -not -name 'paths-debian.conf' -delete
|
|
: # Remove explicitly created /var/run/fail2ban
|
|
: # just to please lintian since init file will
|
|
: # take care about it anyways
|
|
rm -rf $(DESTDIR)/var/run/ $(DESTDIR)/run/
|
|
: # Install monit configuration
|
|
install -d $(DESTDIR)/etc/monit/conf-available
|
|
install -d $(DESTDIR)/etc/monit/monitrc.d
|
|
install -m 644 files/monit/fail2ban $(DESTDIR)/etc/monit/monitrc.d/fail2ban
|
|
: # Install bash completion
|
|
install -d $(DESTDIR)/usr/share/bash-completion/completions
|
|
install -m 644 files/bash-completion $(DESTDIR)/usr/share/bash-completion/completions/fail2ban
|
|
: # Install systemd files
|
|
install -d $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)
|
|
install -d $(DESTDIR)/usr/lib/tmpfiles.d
|
|
install -m 644 build/fail2ban.service $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)
|
|
install -m 644 files/fail2ban-tmpfiles.conf $(DESTDIR)/usr/lib/tmpfiles.d
|
|
install -d $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)
|
|
dh_install
|
|
|
|
override_dh_installexamples:
|
|
dh_installexamples files/ipmasq-* files/nagios files/cacti
|
|
|
|
override_dh_installinit:
|
|
cp -p files/debian-initd debian/fail2ban.init
|
|
dh_installinit -- defaults 99
|
|
|
|
override_dh_installman:
|
|
dh_installman man/*.[15]
|