2 %define apxs %{_sbindir}/apxs1
3 Summary: Apache module: assign IPTOS bits to different vhosts or directories.
4 Name: apache1-mod_%{mod_name}
8 Group: Networking/Daemons
9 Source0: http://www.arctic.org/~dean/mod_iptos/libapache-mod-%{mod_name}_%{version}.orig.tar.gz
10 # Source0-md5: 1e5582acf63b6fabf567ecb79e57bdd5
11 URL: http://www.arctic.org/~dean/mod_iptos/
12 BuildRequires: apache1-devel >= 1.3.33-2
13 BuildRequires: rpmbuild(macros) >= 1.228
14 Requires: apache1 >= 1.3.33-2
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
18 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
21 Modify IPTOS bits on outbound data for fine-tuned traffic shaping
22 mod_iptos is a module for apache 1.3.x which allows the admin to
23 assign different IPTOS bits to different vhosts or directories. This
24 can be used in combination with traffic shaping to give much better
25 control (than other userland-only solutions such as mod_bandwidth)
26 over the bandwidth for various portions of a website.
29 %setup -q -n libapache-mod-%{mod_name}-%{version}
32 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
35 rm -rf $RPM_BUILD_ROOT
36 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
38 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
39 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
40 $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
43 rm -rf $RPM_BUILD_ROOT
46 %service apache restart
49 if [ "$1" = "0" ]; then
50 %service -q apache restart
54 %defattr(644,root,root,755)
55 %doc README debian/changelog
56 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
57 %attr(755,root,root) %{_pkglibdir}/*