]> git.pld-linux.org Git - packages/apache-mod_bw.git/blob - apache-mod_bw.spec
- up to 0.92, builds
[packages/apache-mod_bw.git] / apache-mod_bw.spec
1 # TODO:
2 # - cron?
3 %define         mod_name        bw
4 %define         apxs            /usr/sbin/apxs
5 Summary:        Apache module: bandwidth limits
6 Summary(pl.UTF-8):      Moduł do Apache: limity pasma
7 Name:           apache-mod_%{mod_name}
8 Version:        0.92
9 Release:        1
10 License:        Apache
11 Group:          Networking/Daemons/HTTP
12 Source0:        http://ivn.cl/files/source/mod_bw-%{version}.tgz
13 # Source0-md5:  90f5e632dad5de8d49dcdb61453dcf97
14 Source1:        %{name}.conf
15 URL:            http://www.ivn.cl/apache/
16 BuildRequires:  %{apxs}
17 BuildRequires:  apache-devel >= 2.0.0
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 BuildRequires:  sed >= 4.0
20 Requires:       apache(modules-api) = %apache_modules_api
21 Requires:       crondaemon
22 Requires:       procps
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
26 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
27
28 %description
29 "Mod_bandwidth" is a module for the Apache webserver that enable the
30 setting of server-wide or per connection bandwidth limits, based on
31 the directory, size of files and remote IP/domain.
32
33 %description -l pl.UTF-8
34 Moduł pozwalający na ograniczanie pasma serwera Apache bazując na
35 katalogu, wielkości plików lub zdalnym IP/domenie.
36
37 %prep
38 %setup -qc
39
40 %build
41 %{apxs} -c mod_bw.c
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} \
46         $RPM_BUILD_ROOT%{_var}/run/%{name}/{link,master} \
47         $RPM_BUILD_ROOT{/etc/cron.d,%{_sbindir}}
48
49 install -p .libs/mod_bw.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
50 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/97_mod_%{mod_name}.conf
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %post
56 %service -q httpd restart
57
58 %postun
59 if [ "$1" = "0" ]; then
60         %service -q httpd restart
61 fi
62
63 %files
64 %defattr(644,root,root,755)
65 %doc mod_bw.txt LICENSE ChangeLog
66 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
67 %attr(755,root,root) %{_pkglibdir}/*.so
68 #%config(noreplace) %verify(not size mtime md5) %attr(640,root,root) /etc/cron.d/%{name}
69 #%attr(755,root,root) %{_sbindir}/*
70 %attr(750,http,root) %dir %{_var}/run/%{name}
71 %attr(750,http,root) %dir %{_var}/run/%{name}/link
72 %attr(750,http,root) %dir %{_var}/run/%{name}/master
This page took 0.070499 seconds and 3 git commands to generate.