--- setup.py.orig 2015-09-28 15:10:23.000000000 +0200 +++ setup.py 2015-10-07 15:39:54.000000000 +0200 @@ -126,29 +126,29 @@ for f in w[2]] }, data_files = [ - ('/etc/fail2ban', + ('@@PREFIX@@/etc/fail2ban', glob("config/*.conf") ), - ('/etc/fail2ban/filter.d', + ('@@PREFIX@@/etc/fail2ban/filter.d', glob("config/filter.d/*.conf") ), - ('/etc/fail2ban/filter.d/ignorecommands', + ('@@PREFIX@@/etc/fail2ban/filter.d/ignorecommands', glob("config/filter.d/ignorecommands/*") ), - ('/etc/fail2ban/action.d', + ('@@PREFIX@@/etc/fail2ban/action.d', glob("config/action.d/*.conf") + glob("config/action.d/*.py") ), - ('/etc/fail2ban/fail2ban.d', + ('@@PREFIX@@/etc/fail2ban/fail2ban.d', '' ), - ('/etc/fail2ban/jail.d', + ('@@PREFIX@@/etc/fail2ban/jail.d', '' ), - ('/var/lib/fail2ban', + ('@@PREFIX@@/var/lib/fail2ban', '' ), - ('/usr/share/doc/fail2ban', + ('@@PREFIX@@/share/doc/fail2ban', ['README.md', 'README.Solaris', 'DEVELOP', 'FILTERS', 'doc/run-rootless.txt'] ) @@ -160,15 +160,15 @@ # Search for obsolete files. obsoleteFiles = [] elements = { - "/etc/": + "@@PREFIX@@/etc/": [ "fail2ban.conf" ], - "/usr/bin/": + "@@PREFIX@@/usr/bin/": [ "fail2ban.py" ], - "/usr/lib/fail2ban/": + "@@PREFIX@@/usr/lib/fail2ban/": [ "version.py", "protocol.py" @@ -191,16 +191,16 @@ print("\t" + f) print("") -if isdir("/usr/lib/fail2ban"): +if isdir("@@PREFIX@@/usr/lib/fail2ban"): print("") - print("Fail2ban is not installed under /usr/lib anymore. The new " - "location is under /usr/share. Please remove the directory " - "/usr/lib/fail2ban and everything under this directory.") + print("Fail2ban is not installed under @@PREFIX@@/usr/lib anymore. The new " + "location is under @@PREFIX@@/usr/share. Please remove the directory " + "@@PREFIX@@/usr/lib/fail2ban and everything under this directory.") print("") # Update config file if sys.argv[1] == "install": print("") print("Please do not forget to update your configuration files.") - print("They are in /etc/fail2ban/.") + print("They are in @@PREFIX@@/etc/fail2ban/.") print("")