]> git.pld-linux.org Git - packages/apache1-mod_antihak.git/blame - apache1-mod_antihak.spec
- patch for using iptables instead ipchains.
[packages/apache1-mod_antihak.git] / apache1-mod_antihak.spec
CommitLineData
89968183 1Summary: Antihak module for Apache
2Name: apache-mod_antihak
3Version: 0.3.1beta
4Release: 2
5License: GPL
89968183 6Group: Networking/Daemons
7Group(de): Netzwerkwesen/Server
8Group(pl): Sieciowe/Serwery
d5022a56 9Source0: http://prdownloads.sourceforge.net/apantihak/mod_antihak-0.3.1-beta.tar.gz
10Patch0: mod_antihak-iptables.patch
89968183 11Patch1: mod_antihak-am.patch
f448d080 12BuildRequires: automake
13BuildRequires: autoconf
14BuildRequires: apache(EAPI)-devel
15BuildRequires: libtool
16BuildRequires: mysql-devel
17Requires: apache(EAPI) >= 1.3.1
18Requires: iptables
19Requires: sudo
89968183 20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89968183 21
22%define _libexecdir %{_libdir}/apache
23%define _htmldocdir /home/httpd/manual/mod
24
25%description
f448d080 26mod_antihak is an Apache Module designed to eliminate the CodeRed and
27Nimda worm's network bandwidth consumption. We're working to make it
28as easy as writing a line of text to add more worms! :)
89968183 29
30%prep
31%setup -q -n mod_antihak-0.3.1-beta
32cd src
33%patch0 -p0
34%patch1 -p0
35
36%build
37cd src
38
f448d080 39rm -f tools/missing
89968183 40libtoolize --copy --force
41aclocal
42autoconf
43automake -a -c
44
45%configure \
f448d080 46 CC=%{__cc} \
89968183 47 CFLAGS="${CFLAGS:-%optflags} -I/usr/include/mysql" \
48 APACHE_APXS=/usr/sbin/apxs \
49 --with-mysql
50
f448d080 51%{__make}
89968183 52
53%install
54rm -rf $RPM_BUILD_ROOT
55install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
56
57cd src
58
59install mod_antihak/mod_antihak.so $RPM_BUILD_ROOT%{_libexecdir}
60
f448d080 61gzip -9nf AUTHORS INSTALL ChangeLog NEWS TODO
89968183 62
63%post
f448d080 64if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` = 0 ] then
89968183 65 echo "http ALL= NOPASSWD: /sbin/iptables" >> /etc/sudoers
66fi
67
68%{_sbindir}/apxs -e -a -n antihak %{_libexecdir}/mod_antihak.so 1>&2
69if [ -f /var/lock/subsys/httpd ]; then
70 /etc/rc.d/init.d/httpd restart 1>&2
71else
72 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
73fi
74
75%preun
76if [ "$1" = "0" ]; then
77 if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` != 0 ]
78 then
79 perl -pi -e "s|http ALL= NOPASSWD: /sbin/iptables\n||" /etc/sudoers
80 fi
81
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
85 fi
86fi
87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
91%files
92%defattr(644,root,root,755)
f448d080 93%doc src/*.gz
89968183 94%attr(755,root,root) %{_libexecdir}/*
This page took 0.063327 seconds and 4 git commands to generate.