]> git.pld-linux.org Git - packages/apache-mod_bw.git/blame - apache-mod_bw.spec
- BR s@%{apxs}@apache-apxs@g
[packages/apache-mod_bw.git] / apache-mod_bw.spec
CommitLineData
a5de1fd2 1# TODO:
5d474532 2# - cron?
ac0fe2df 3%define mod_name bw
1dd6fe21 4%define apxs /usr/sbin/apxs
e44745e2 5Summary: Apache module: bandwidth limits
d5c887ee 6Summary(pl.UTF-8): Moduł do Apache: limity pasma
1dd6fe21 7Name: apache-mod_%{mod_name}
435796e2 8Version: 0.6
9da792dd 9Release: 3
e44745e2
JB
10License: Apache
11Group: Networking/Daemons
cd77293e 12Source0: http://www.ivn.cl/apache/bw_mod-%{version}.tgz
435796e2 13# Source0-md5: 0c92fa6344f487321291a592dbb49856
0511ec6d 14Source1: %{name}.conf
e339b99b 15Patch0: %{name}-apr_1.0.patch
1dd6fe21 16URL: http://www.ivn.cl/apache/
91c4c31e 17BuildRequires: apache-apxs >= 2.0
b9a8f100 18BuildRequires: apache-devel >= 2.0.0
b2f4d847 19BuildRequires: rpmbuild(macros) >= 1.268
6fc9aff3
ER
20BuildRequires: sed >= 4.0
21Requires: apache(modules-api) = %apache_modules_api
348c5ac8 22Requires: crondaemon
e44745e2
JB
23Requires: procps
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
6fc9aff3
ER
26%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
27%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
e44745e2
JB
28
29%description
30"Mod_bandwidth" is a module for the Apache webserver that enable the
31setting of server-wide or per connection bandwidth limits, based on
32the directory, size of files and remote IP/domain.
33
c944853d
JR
34%description -l pl.UTF-8
35Moduł pozwalający na ograniczanie pasma serwera Apache bazując na
36katalogu, wielkości plików lub zdalnym IP/domenie.
e44745e2
JB
37
38%prep
cd77293e 39%setup -q -n bw_mod-%{version}
e339b99b 40%patch0 -p1
6fc9aff3
ER
41sed -i -e 's@include "apr@include "apr/apr@g' bw_mod-%{version}.c
42sed -i -e 's@^.*apr_buckets.h.*$@@' bw_mod-%{version}.c
ed6ddc97
ER
43
44%build
cd77293e 45%{apxs} -c bw_mod-%{version}.c
e44745e2
JB
46
47%install
48rm -rf $RPM_BUILD_ROOT
ed6ddc97 49install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} \
e44745e2 50 $RPM_BUILD_ROOT%{_var}/run/%{name}/{link,master} \
ed6ddc97 51 $RPM_BUILD_ROOT{/etc/cron.d,%{_sbindir}}
e44745e2 52
ed6ddc97 53install .libs/bw_mod-%{version}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
0511ec6d 54install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/97_mod_%{mod_name}.conf
e44745e2
JB
55
56%clean
57rm -rf $RPM_BUILD_ROOT
58
59%post
b2f4d847 60%service -q httpd restart
e44745e2 61
8d98470e 62%postun
e44745e2 63if [ "$1" = "0" ]; then
b2f4d847 64 %service -q httpd restart
e44745e2
JB
65fi
66
67%files
68%defattr(644,root,root,755)
cd77293e 69%doc bw_mod-%{version}.txt LICENSE
ed6ddc97 70%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
c67d93f1 71%attr(755,root,root) %{_pkglibdir}/*.so
0511ec6d
MWP
72#%config(noreplace) %verify(not size mtime md5) %attr(640,root,root) /etc/cron.d/%{name}
73#%attr(755,root,root) %{_sbindir}/*
e44745e2
JB
74%attr(750,http,root) %dir %{_var}/run/%{name}
75%attr(750,http,root) %dir %{_var}/run/%{name}/link
76%attr(750,http,root) %dir %{_var}/run/%{name}/master
This page took 0.054536 seconds and 4 git commands to generate.