]> git.pld-linux.org Git - packages/apache1-mod_bandwidth.git/blame - apache1-mod_bandwidth.spec
- use apache1(EAPI) for runtime dep
[packages/apache1-mod_bandwidth.git] / apache1-mod_bandwidth.spec
CommitLineData
8b8d7a94 1%define mod_name bandwidth
3d01cd87 2%define apxs /usr/sbin/apxs1
8b8d7a94 3Summary: Apache module: bandwidth limits
ed302e87 4Summary(pl.UTF-8): Moduł do Apache: limity pasma
3d01cd87 5Name: apache1-mod_%{mod_name}
66da1140 6Version: 2.0.5
7e2c15b0 7Release: 1.5
8b8d7a94
JB
8License: Apache
9Group: Networking/Daemons
10Source0: ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c
255adf52 11# Source0-md5: 00f0905d777f79485beb428b53191ecf
8b8d7a94
JB
12# ftp://ftp.cohprog.com/pub/apache/module/cleanlink.pl
13# modified to work from cron NOT as daemon!
14Source1: %{name}-cleanlink.pl
15Source2: %{name}.conf
16# http://www.cohprog.com/v3/bandwidth/doc-en.html
17Source4: %{name}-doc.html
18URL: http://www.cohprog.com/v3/bandwidth/intro-en.html
fc5a2091 19BuildRequires: apache1-devel >= 1.3.39
dcfc3b6e 20BuildRequires: rpmbuild(macros) >= 1.268
7e2c15b0 21Requires: apache1(EAPI)
a750f5bb 22Requires: crondaemon
8b8d7a94 23Requires: procps
ec5c398d 24Obsoletes: apache-mod_bandwidth <= 2.0.5
8b8d7a94
JB
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
3701610a
ER
27%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
28%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
8b8d7a94
JB
29
30%description
31"Mod_bandwidth" is a module for the Apache webserver that enable the
32setting of server-wide or per connection bandwidth limits, based on
33the directory, size of files and remote IP/domain.
34
a5c3ce13
JR
35%description -l pl.UTF-8
36Moduł pozwalający na ograniczanie pasma poprzez serwer Apache bazując
37na katalogu, wielkości plików oraz zdalnym IP/domenie.
8b8d7a94
JB
38
39%prep
40%setup -q -T -c
41cp %{SOURCE0} .
42
43%build
44%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
45
46%install
47rm -rf $RPM_BUILD_ROOT
3701610a 48install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} \
8b8d7a94
JB
49 $RPM_BUILD_ROOT%{_var}/run/%{name}/{link,master} \
50 $RPM_BUILD_ROOT{/etc/cron.d,%{_sbindir}}
51
52install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
53install %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}
3701610a 54install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
8b8d7a94
JB
55install %{SOURCE4} .
56
57echo '* * * * * http %{_sbindir}/%{name}-cleanlink.pl' > \
58 $RPM_BUILD_ROOT/etc/cron.d/%{name}
59
60%clean
61rm -rf $RPM_BUILD_ROOT
62
63%post
dcfc3b6e 64%service -q apache restart
8b8d7a94 65
7637c8ea 66%postun
8b8d7a94 67if [ "$1" = "0" ]; then
dcfc3b6e 68 %service -q apache restart
8b8d7a94
JB
69fi
70
71%files
72%defattr(644,root,root,755)
73%doc *html
51a61d6f
ER
74%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
75%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) /etc/cron.d/%{name}
8b8d7a94
JB
76%attr(755,root,root) %{_sbindir}/*
77%attr(755,root,root) %{_pkglibdir}/*
78%attr(750,http,root) %dir %{_var}/run/%{name}
79%attr(750,http,root) %dir %{_var}/run/%{name}/link
80%attr(750,http,root) %dir %{_var}/run/%{name}/master
This page took 0.086205 seconds and 4 git commands to generate.