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