2 Summary: Antihak module for Apache
3 Name: apache-mod_antihak
7 Packager: glen <glen@delfi.ee>
8 Group: Networking/Daemons
9 Group(de): Netzwerkwesen/Server
10 Group(pl): Sieciowe/Serwery
11 Source0: http://prdownloads.sourceforge.net/apantihak/mod_antihak-0.3.1-beta.tar.bz2
12 Patch0: mod_antihak-iptables.patch.bz2
13 Patch1: mod_antihak-am.patch
14 BuildRequires: apache-devel
15 Requires: apache >= 1.3.1
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 Requires: iptables sudo
19 %define _libexecdir %{_libdir}/apache
20 %define _htmldocdir /home/httpd/manual/mod
23 mod_antihak is an Apache Module designed to eliminate the CodeRed and Nimda
24 worm's network bandwidth consumption. We're working to make it as easy as
25 writing a line of text to add more worms! :)
28 %setup -q -n mod_antihak-0.3.1-beta
37 libtoolize --copy --force
44 CFLAGS="${CFLAGS:-%optflags} -I/usr/include/mysql" \
45 APACHE_APXS=/usr/sbin/apxs \
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
56 install mod_antihak/mod_antihak.so $RPM_BUILD_ROOT%{_libexecdir}
58 gzip -9nf AUTHORS COPYING ChangeLog INSTALL NEWS TODO
61 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` = 0 ]
63 echo "http ALL= NOPASSWD: /sbin/iptables" >> /etc/sudoers
66 %{_sbindir}/apxs -e -a -n antihak %{_libexecdir}/mod_antihak.so 1>&2
67 if [ -f /var/lock/subsys/httpd ]; then
68 /etc/rc.d/init.d/httpd restart 1>&2
70 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
74 if [ "$1" = "0" ]; then
75 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` != 0 ]
77 perl -pi -e "s|http ALL= NOPASSWD: /sbin/iptables\n||" /etc/sudoers
80 %{_sbindir}/apxs -e -A -n antihak %{_libexecdir}/mod_antihak.so 1>&2
81 if [ -f /var/lock/subsys/httpd ]; then
82 /etc/rc.d/init.d/httpd restart 1>&2
87 rm -rf $RPM_BUILD_ROOT
90 %defattr(644,root,root,755)
91 %doc src/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,TODO}.gz
92 %attr(755,root,root) %{_libexecdir}/*
95 * Wed Jan 09 2002 glen <glen@delfi.ee>
96 - added /etc/sudoers editing
98 * Wed Jan 09 2002 glen <glen@delfi.ee>
99 - built PLD package, based on PLD apache-mod_fastcgi and mandrake's mod_antihack