1 Summary: Antihak module for Apache
2 Summary(pl): Modu³ antihak dla Apache
3 Name: apache-mod_antihak
7 Group: Networking/Daemons
8 Group(de): Netzwerkwesen/Server
9 Group(pl): Sieciowe/Serwery
10 Source0: ftp://ftp.sourceforge.net/pub/sourceforge/apantihak/mod_antihak-0.3.1-beta.tar.gz
11 Patch0: mod_antihak-iptables.patch
12 Patch1: mod_antihak-am.patch
13 BuildRequires: automake
14 BuildRequires: autoconf
15 BuildRequires: apache(EAPI)-devel
16 BuildRequires: libtool
17 BuildRequires: mysql-devel
18 Requires: apache(EAPI) >= 1.3.1
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _libexecdir %{_libdir}/apache
25 %define _htmldocdir /home/httpd/manual/mod
28 mod_antihak is an Apache Module designed to eliminate the CodeRed and
29 Nimda worm's network bandwidth consumption. We're working to make it
30 as easy as writing a line of text to add more worms! :)
33 mod_antihak to modu³ Apache s³u¿±cy do eliminowania zapychania sieci
34 przez robaki CodeRed i Nimda. Ponadto trwaj± prace nad umo¿liwieniem
35 ³atwego dodawania obs³ugi kolejnych robaków.
38 %setup -q -n mod_antihak-0.3.1-beta
47 libtoolize --copy --force
54 CFLAGS="%{rpmcflags} -I/usr/include/mysql" \
55 APACHE_APXS=/usr/sbin/apxs \
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
66 install mod_antihak/mod_antihak.so $RPM_BUILD_ROOT%{_libexecdir}
68 gzip -9nf AUTHORS INSTALL ChangeLog NEWS TODO
71 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` = 0 ] then
72 echo "http ALL= NOPASSWD: /sbin/iptables" >> /etc/sudoers
75 %{_sbindir}/apxs -e -a -n antihak %{_libexecdir}/mod_antihak.so 1>&2
76 if [ -f /var/lock/subsys/httpd ]; then
77 /etc/rc.d/init.d/httpd restart 1>&2
79 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
83 if [ "$1" = "0" ]; then
84 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` != 0 ]
86 grep -v '^http ALL= NOPASSWD: /sbin/iptables$' /etc/sudoers \
87 > /etc/sudoers.rpmnew-antihak
88 mv -f /etc/sudoers.rpmnew-antihak /etc/sudoers
91 %{_sbindir}/apxs -e -A -n antihak %{_libexecdir}/mod_antihak.so 1>&2
92 if [ -f /var/lock/subsys/httpd ]; then
93 /etc/rc.d/init.d/httpd restart 1>&2
98 rm -rf $RPM_BUILD_ROOT
101 %defattr(644,root,root,755)
103 %attr(755,root,root) %{_libexecdir}/*