]> git.pld-linux.org Git - packages/apache1-mod_throttle.git/blob - apache1-mod_throttle.spec
909903178d17b9a27afb22eadf93846639df375f
[packages/apache1-mod_throttle.git] / apache1-mod_throttle.spec
1 Summary:        Bandwidth & Request Throttling
2 Name:           apache-mod_throttle
3 Version:        3.1.2
4 Release:        1
5 License:        Anthony Howe
6 Group:          Networking/Daemons
7 Group(de):      Netzwerkwesen/Server
8 Group(pl):      Sieciowe/Serwery
9 Source0:        http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz
10 URL:            http://www.snert.com/Software/mod_throttle/
11 BuildRequires:  apache-devel
12 Requires:       apache >= 1.3.1
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %define         _libexecdir     %{_libdir}/apache
16 %define         _htmldocdir     /home/httpd/manual/mod
17
18 %description
19 This Apache module is intended to reduce the load on your server &
20 bandwidth generated by popular virtual hosts, directories, locations,
21 or users according to supported polices (see below) that decide when
22 to delay or refuse requests. Also mod_throttle can track and throttle
23 incoming connections by IP address or by authenticated remote user.
24
25 %prep
26 %setup -q -n mod_throttle-%{version}
27
28 %build
29 apxs -D SUEXEC_BIN="\"\\\"%{_sbindir}/suexec\\\"\"" -o mod_throttle.so -c *.c
30 # to don't bother about ssi counter inside
31 mv index.shtml index.html
32
33 %install
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
36
37 install mod_throttle.so $RPM_BUILD_ROOT%{_libexecdir}
38 install *.html $RPM_BUILD_ROOT%{_htmldocdir}
39
40 gzip -9nf *.txt
41
42 %post
43 %{_sbindir}/apxs -e -a -n throttle %{_libexecdir}/mod_throttle.so 1>&2
44 if [ -f /var/lock/subsys/httpd ]; then
45         /etc/rc.d/init.d/httpd restart 1>&2
46 else
47         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
48 fi
49
50 %preun
51 if [ "$1" = "0" ]; then
52         %{_sbindir}/apxs -e -A -n throttle %{_libexecdir}/mod_throttle.so 1>&2
53         if [ -f /var/lock/subsys/httpd ]; then
54                 /etc/rc.d/init.d/httpd restart 1>&2
55         fi
56 fi
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %files
62 %defattr(644,root,root,755)
63 %doc *.gz
64 %doc %{_htmldocdir}/index.html
65 %attr(755,root,root) %{_libexecdir}/*
This page took 0.070097 seconds and 2 git commands to generate.