]> git.pld-linux.org Git - packages/apache-mod_cband.git/blob - apache-mod_cband.spec
0e1a5eacc014650fe547402544e435766d9b4228
[packages/apache-mod_cband.git] / apache-mod_cband.spec
1 %define         mod_name        cband
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: bandwidth limits per vhosts
4 Summary(pl):    Modu³ do Apache: limity pasma dla poszczególnych vhostów
5 Name:           apache-mod_%{mod_name}
6 Version:        0.9.6.0
7 Release:        2
8 License:        Apache
9 Group:          Networking/Daemons
10 Source0:        http://cband.linux.pl/download/mod-%{mod_name}-%{version}.tgz
11 # Source0-md5:  6df461ef7cc61c5133a0d69deefe1902
12 Source1:        %{name}.conf
13 URL:            http://cband.linux.pl/
14 BuildRequires:  %{apxs}
15 BuildRequires:  apache-devel >= 2.0.0
16 Requires:       apache(modules-api) = %apache_modules_api
17 Requires:       crondaemon
18 Requires:       procps
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
22 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
23
24 %description
25 mod_cband is an Apache 2 module provided to solve the problem of
26 limiting users' and virtualhosts' bandwidth usage. When the configured
27 virtualhost's transfer limit is exceeded, mod_cband will redirect all
28 further requests to a location specified in the configuration file.
29
30 %description -l pl
31 mod_cband to modu³ Apache'a 2 maj±cy za zadanie ograniczanie zu¿ycia
32 pasma przez u¿ytkowników i hosty wirtualne. Gdy okre¶lony limit
33 zostanie przekroczony, mod_cband przekieruje wszelkie zapytania do
34 strony wskazanej w pliku konfiguracyjnym.
35
36 %prep
37 %setup -q -n mod-%{mod_name}-%{version}
38
39 %build
40 %configure \
41         --with-apxs=%{apxs}
42 %{__make}
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
47
48 install src/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
49 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/97_mod_%{mod_name}.conf
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 if [ -f /var/lock/subsys/httpd ]; then
56         /etc/rc.d/init.d/httpd restart 1>&2
57 fi
58
59 %preun
60 if [ "$1" = "0" ]; then
61         if [ -f /var/lock/subsys/httpd ]; then
62                 /etc/rc.d/init.d/httpd restart 1>&2
63         fi
64 fi
65
66 %files
67 %defattr(644,root,root,755)
68 %doc AUTHORS Changes INSTALL TODO  conf/*.example
69 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*mod_*.conf
70 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.067705 seconds and 2 git commands to generate.