summaryrefslogtreecommitdiffstats
path: root/mod_bw.spec
blob: d8faa3fc53ac6e267c718cf88d3322c00f9e8809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}}
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}

Name:           mod_bw
Version:        0.92
Release:        3%{?dist}
Summary:        Bandwidth Limiter For Apache

Group:          System Environment/Daemons
License:        ASL 2.0
URL:            http://www.ivn.cl/apache
Source0:        http://www.ivn.cl/apache/files/source/mod_bw-%{version}.tgz
Source1:        mod_bw.conf
Patch0:         mod_bw-httpd24.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  httpd-devel
Requires:       httpd-mmn = %{_httpd_mmn}

%description
mod_bw is a bandwidth administration module for Apache httpd 2.x

* Restricts the number of simultaneous connections per vhost/dir
* Limits the bandwidth for files on vhost/dir

%prep
%setup -q -c

%patch0 -p1 -b .httpd24

mv mod_bw.txt mod_bw.txt.iso8859
iconv -f ISO-8859-1 -t UTF-8 mod_bw.txt.iso8859 > mod_bw.txt 


%build
%{_httpd_apxs} -Wc,"%{optflags}" -c mod_bw.c


%install
rm -rf $RPM_BUILD_ROOT
install -Dpm 755 .libs/mod_bw.so \
                 $RPM_BUILD_ROOT%{_libdir}/httpd/modules/mod_bw.so
install -Dpm 644 %{SOURCE1} \
                 $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mod_bw.conf


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc ChangeLog LICENSE TODO mod_bw.txt
%config(noreplace) %{_sysconfdir}/httpd/conf.d/mod_bw.conf
%{_libdir}/httpd/modules/mod_bw.so


%changelog
* Thu Aug 23 2012 Remi Collet <RPMS@FamilleCollet.com> - 0.92-3
- sync patch with rawhide (but keep version 0.92)

* Mon Jul 23 2012 Jan Kaluza <jkaluza@redhat.com> - 0.8-10
- Use proper httpd-2.4 patch

* Wed Apr 18 2012 Remi Collet <RPMS@FamilleCollet.com> - 0.92-2
- sync patch with rawhide (but keep version 0.92)

* Tue Apr 10 2012  - Jakub Hrozek <jhrozek@redhat.com> 0.8-8
- Fix compilation with httpd-2.4 (Jan Kaluza <jkaluza@redhat.com>)
- Provide backwards-compatible _httpd_apxs macro

* Sun Apr 01 2012 Remi Collet <RPMS@FamilleCollet.com> - 0.92-1
- update to 0.92 for remi repo and httpd 2.4

* Wed Mar 14 2012 Jakub Hrozek <jhrozek@redhat.com> - 0.8-7
- Do not require httpd itself

* Wed Mar 14 2012 Jakub Hrozek <jhrozek@redhat.com> - 0.8-6
- Require httpd-mmn (#803067)

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Feb 18 2008 Jakub Hrozek <jhrozek@redhat.com> - 0.8-1
- initial packaging