2005-07-06 23:10:26 +00:00
|
|
|
#!/usr/bin/make -f
|
2005-07-07 01:47:23 +00:00
|
|
|
# -*- 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
|
|
|
|
|
2006-03-11 06:02:22 +00:00
|
|
|
DESTDIR=$(CURDIR)/debian/fail2ban
|
2005-07-07 01:47:23 +00:00
|
|
|
|
|
|
|
configure: configure-stamp
|
|
|
|
configure-stamp:
|
|
|
|
dh_testdir
|
|
|
|
touch configure-stamp
|
|
|
|
|
2008-02-08 05:52:04 +00:00
|
|
|
build:
|
2005-07-07 01:47:23 +00:00
|
|
|
|
2012-01-07 23:56:07 +00:00
|
|
|
build-arch:
|
|
|
|
|
|
|
|
build-indep:
|
|
|
|
|
2008-02-08 05:52:04 +00:00
|
|
|
clean: clean-inits
|
2005-07-07 01:47:23 +00:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2007-05-15 14:26:28 +00:00
|
|
|
rm -f build-stamp configure-stamp
|
|
|
|
rm -rf build
|
|
|
|
# Does not hurt to ask distutils to do their duty
|
|
|
|
python setup.py clean
|
|
|
|
# Enforce removal of *.pyc files. Apparently dh_clean does
|
|
|
|
# not perform find on provided filename patterns.
|
|
|
|
find . -name \*.pyc -exec rm -f {} \;
|
|
|
|
dh_clean
|
2005-07-07 01:47:23 +00:00
|
|
|
|
2007-05-15 14:26:28 +00:00
|
|
|
install: build
|
2005-07-07 01:47:23 +00:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2006-03-19 05:27:42 +00:00
|
|
|
dh_clean -k
|
2005-07-07 01:47:23 +00:00
|
|
|
dh_installdirs
|
|
|
|
|
2007-05-15 14:26:28 +00:00
|
|
|
# Install the package into debian/fail2ban.
|
2010-02-25 05:03:22 +00:00
|
|
|
python setup.py install --root=$(DESTDIR) --no-compile --install-layout=deb
|
2007-05-15 14:26:28 +00:00
|
|
|
# Install Debian shipped jail file in 1 piece (instead of patching
|
|
|
|
# the shipped one since there are too many changes)
|
2006-09-29 04:05:50 +00:00
|
|
|
install -m 644 debian/jail.conf $(DESTDIR)/etc/fail2ban
|
2009-07-09 05:48:43 +00:00
|
|
|
# Remove explicitely created /var/run/fail2ban
|
|
|
|
# just to please lintian since init file will
|
|
|
|
# take care about it anyways
|
|
|
|
rm -rf $(DESTDIR)/var/run/fail2ban
|
2006-03-11 06:02:22 +00:00
|
|
|
|
2007-05-15 14:26:28 +00:00
|
|
|
#
|
2006-05-16 20:46:27 +00:00
|
|
|
# Just to comply with policy 4.8
|
|
|
|
binary-arch:
|
2006-03-19 05:27:42 +00:00
|
|
|
|
2005-07-07 01:47:23 +00:00
|
|
|
# Build architecture-independent files here.
|
2006-09-05 06:10:29 +00:00
|
|
|
binary-indep: install
|
2005-07-07 01:47:23 +00:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2008-03-06 04:32:42 +00:00
|
|
|
dh_installchangelogs ChangeLog
|
2005-07-15 22:37:42 +00:00
|
|
|
dh_installdocs
|
2008-02-08 04:31:47 +00:00
|
|
|
dh_installexamples config/jail.conf files/ipmasq-*
|
2005-08-13 08:31:19 +00:00
|
|
|
dh_installlogrotate
|
2012-07-31 21:23:32 +00:00
|
|
|
dh_python2 /usr/share/fail2ban
|
2005-10-20 17:46:00 +00:00
|
|
|
dh_installinit -- defaults 99
|
2012-07-31 21:23:32 +00:00
|
|
|
|
|
|
|
# perform swap of order of calls to init and pycentral (or even
|
|
|
|
# bleedingly new dh_python2) in prerm to close #422655 --
|
|
|
|
# python-cleanup section is cut and placed at the end of the file
|
|
|
|
# since .init script would trigger their compilation again
|
|
|
|
sed -i -e '/^#.*ed by dh_python2/,/# End auto/{H;d};$$G' \
|
2007-05-15 14:26:28 +00:00
|
|
|
debian/fail2ban.prerm.debhelper
|
2012-07-31 21:23:32 +00:00
|
|
|
|
2013-03-27 15:28:25 +00:00
|
|
|
dh_installman man/*.[15]
|
2005-07-07 01:47:23 +00:00
|
|
|
dh_link
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
2006-05-16 20:28:31 +00:00
|
|
|
binary: binary-indep
|
2006-05-16 20:46:27 +00:00
|
|
|
.PHONY: build clean binary-indep binary-arch binary install configure copy-inits clean-inits
|