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