%define mod_name cband
%define apxs /usr/sbin/apxs
-%define _pkglibdir %(%{apxs} -q LIBEXECDIR)
-%define _sysconfdir %(%{apxs} -q SYSCONFDIR)
-
Summary: Apache module: bandwidth limits per vhosts
Summary(pl): Modu³ do Apache: limity pasma dla poszczególnych vhostów
Name: apache-mod_%{mod_name}
-Version: 0.9.5.1
+Version: 0.9.7.5
Release: 1
License: Apache
Group: Networking/Daemons
Source0: http://cband.linux.pl/download/mod-%{mod_name}-%{version}.tgz
-# Source0-md5: 68fd4cbf429dfe88d1f56650880c1b54
+# Source0-md5: 5c5d65dc9abe6cdc6931b6dd33be5018
Source1: %{name}.conf
URL: http://cband.linux.pl/
-BuildRequires: apache-devel >= 2.0.0
BuildRequires: %{apxs}
-Requires(post,preun): %{apxs}
-Requires(post,preun): grep
-Requires(preun): fileutils
-Requires: apache >= 2.0.0
+BuildRequires: apache-devel >= 2.0.0
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires: apache(modules-api) = %apache_modules_api
Requires: crondaemon
Requires: procps
-Obsoletes: apache-mod_%{mod_name} <= %{version}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+
%description
mod_cband is an Apache 2 module provided to solve the problem of
limiting users' and virtualhosts' bandwidth usage. When the configured
rm -rf $RPM_BUILD_ROOT
%post
-if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
-fi
+%service -q httpd restart
-%preun
+%postun
if [ "$1" = "0" ]; then
- umask 027
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
- fi
+ %service -q httpd restart
fi
%files
%defattr(644,root,root,755)
-%doc AUTHORS Changes INSTALL TODO conf/*.example
+%doc AUTHORS Changes INSTALL conf/*.example
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*mod_*.conf
-%attr(755,root,root) %{_pkglibdir}/*
+%attr(755,root,root) %{_pkglibdir}/*.so