1 %define apxs /usr/sbin/apxs
2 Summary: Antihak module for Apache
3 Summary(pl): Modu³ antihak dla Apache
4 Name: apache-mod_antihak
8 Group: Networking/Daemons
9 Source0: ftp://ftp.sourceforge.net/pub/sourceforge/apantihak/mod_antihak-%{version}.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 BuildRequires: %{apxs}
18 Requires: apache(EAPI) >= 1.3.1
21 Prereq: %{_sbindir}/apxs
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _libexecdir %{_libdir}/apache
26 %define _htmldocdir /home/httpd/manual/mod
29 mod_antihak is an Apache Module designed to eliminate the CodeRed and
30 Nimda worm's network bandwidth consumption. We're working to make it
31 as easy as writing a line of text to add more worms! :)
34 mod_antihak to modu³ Apache s³u¿±cy do eliminowania zapychania sieci
35 przez robaki CodeRed i Nimda. Ponadto trwaj± prace nad umo¿liwieniem
36 ³atwego dodawania obs³ugi kolejnych robaków.
39 %setup -q -n mod_antihak-0.3.1-beta
55 CFLAGS="%{rpmcflags} -I/usr/include/mysql" \
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
67 install mod_antihak/mod_antihak.so $RPM_BUILD_ROOT%{_libexecdir}
70 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` = 0 ]; then
71 echo "http ALL= NOPASSWD: /sbin/iptables" >> /etc/sudoers
74 %{apxs} -e -a -n antihak %{_libexecdir}/mod_antihak.so 1>&2
75 if [ -f /var/lock/subsys/httpd ]; then
76 /etc/rc.d/init.d/httpd restart 1>&2
78 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
82 if [ "$1" = "0" ]; then
83 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` != 0 ]
85 grep -v '^http ALL= NOPASSWD: /sbin/iptables$' /etc/sudoers \
86 > /etc/sudoers.rpmnew-antihak
87 mv -f /etc/sudoers.rpmnew-antihak /etc/sudoers
90 %{apxs} -e -A -n antihak %{_libexecdir}/mod_antihak.so 1>&2
91 if [ -f /var/lock/subsys/httpd ]; then
92 /etc/rc.d/init.d/httpd restart 1>&2
97 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc src/{AUTHORS,INSTALL,ChangeLog,NEWS,TODO}
102 %attr(755,root,root) %{_libexecdir}/*