1 Summary: Antihak module for Apache
2 Name: apache-mod_antihak
6 Group: Networking/Daemons
7 Group(de): Netzwerkwesen/Server
8 Group(pl): Sieciowe/Serwery
9 Source0: http://prdownloads.sourceforge.net/apantihak/mod_antihak-0.3.1-beta.tar.gz
10 Patch0: mod_antihak-iptables.patch
11 Patch1: mod_antihak-am.patch
12 BuildRequires: automake
13 BuildRequires: autoconf
14 BuildRequires: apache(EAPI)-devel
15 BuildRequires: libtool
16 BuildRequires: mysql-devel
17 Requires: apache(EAPI) >= 1.3.1
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _libexecdir %{_libdir}/apache
23 %define _htmldocdir /home/httpd/manual/mod
26 mod_antihak is an Apache Module designed to eliminate the CodeRed and
27 Nimda worm's network bandwidth consumption. We're working to make it
28 as easy as writing a line of text to add more worms! :)
31 %setup -q -n mod_antihak-0.3.1-beta
40 libtoolize --copy --force
47 CFLAGS="${CFLAGS:-%optflags} -I/usr/include/mysql" \
48 APACHE_APXS=/usr/sbin/apxs \
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
59 install mod_antihak/mod_antihak.so $RPM_BUILD_ROOT%{_libexecdir}
61 gzip -9nf AUTHORS INSTALL ChangeLog NEWS TODO
64 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` = 0 ] then
65 echo "http ALL= NOPASSWD: /sbin/iptables" >> /etc/sudoers
68 %{_sbindir}/apxs -e -a -n antihak %{_libexecdir}/mod_antihak.so 1>&2
69 if [ -f /var/lock/subsys/httpd ]; then
70 /etc/rc.d/init.d/httpd restart 1>&2
72 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
76 if [ "$1" = "0" ]; then
77 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` != 0 ]
79 perl -pi -e "s|http ALL= NOPASSWD: /sbin/iptables\n||" /etc/sudoers
82 %{_sbindir}/apxs -e -A -n antihak %{_libexecdir}/mod_antihak.so 1>&2
83 if [ -f /var/lock/subsys/httpd ]; then
84 /etc/rc.d/init.d/httpd restart 1>&2
89 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
94 %attr(755,root,root) %{_libexecdir}/*