]> git.pld-linux.org Git - packages/apache-mod_bw.git/blame_incremental - apache-mod_bw.spec
- rel 3
[packages/apache-mod_bw.git] / apache-mod_bw.spec
... / ...
CommitLineData
1# TODO:
2# - cron?
3%define mod_name bw
4%define apxs /usr/sbin/apxs
5Summary: Apache module: bandwidth limits
6Summary(pl.UTF-8): Moduł do Apache: limity pasma
7Name: apache-mod_%{mod_name}
8Version: 0.92
9Release: 3
10License: Apache v2.0
11Group: Networking/Daemons/HTTP
12Source0: http://ivn.cl/files/source/mod_bw-%{version}.tgz
13# Source0-md5: 90f5e632dad5de8d49dcdb61453dcf97
14Source1: %{name}.conf
15Source2: %{name}.tmpfiles
16URL: http://www.ivn.cl/apache/
17BuildRequires: %{apxs}
18BuildRequires: apache-devel >= 2.0.0
19BuildRequires: rpmbuild(macros) >= 1.268
20BuildRequires: sed >= 4.0
21Requires: apache(modules-api) = %apache_modules_api
22Requires: crondaemon
23Requires: procps
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
27%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
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
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.
37
38%prep
39%setup -qc
40
41%build
42%{apxs} -c mod_bw.c
43
44%install
45rm -rf $RPM_BUILD_ROOT
46install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} \
47 $RPM_BUILD_ROOT%{_var}/run/%{name}/{link,master} \
48 $RPM_BUILD_ROOT{/etc/cron.d,%{_sbindir}} \
49 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
50
51install -p .libs/mod_bw.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
52cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/97_mod_%{mod_name}.conf
53install %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
54
55%clean
56rm -rf $RPM_BUILD_ROOT
57
58%post
59%service -q httpd restart
60
61%postun
62if [ "$1" = "0" ]; then
63 %service -q httpd restart
64fi
65
66%files
67%defattr(644,root,root,755)
68%doc mod_bw.txt LICENSE ChangeLog
69%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
70%attr(755,root,root) %{_pkglibdir}/*.so
71#%config(noreplace) %verify(not size mtime md5) %attr(640,root,root) /etc/cron.d/%{name}
72#%attr(755,root,root) %{_sbindir}/*
73/usr/lib/tmpfiles.d/%{name}.conf
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.0662 seconds and 4 git commands to generate.