#Module-Specific definitions %define mod_name mod_log_access %define mod_conf A91_%{mod_name}.conf %define mod_so %{mod_name}.so Summary: A apache 2.2 module for custom log formats Name: apache-%{mod_name} Version: 1.02 Release: %mkrel 2 Group: System/Servers License: Apache License URL: http://www.gjvc.com/software/apache/modules/ Source0: http://www.gjvc.com/software/apache/modules/%{mod_name}-%{version}.tar.gz Source1: %{mod_conf} Requires(pre): rpm-helper Requires(postun): rpm-helper Requires(pre): apache-conf >= 2.2.0 Requires(pre): apache >= 2.2.0 Requires: apache-conf >= 2.2.0 Requires: apache >= 2.2.0 BuildRequires: apache-devel >= 2.2.0 BuildRequires: file BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description mod_log_access is an Apache 2.2.x module, which provides: * custom log formats * conditional logging (requires mod_setenvif) * automatic rotation of both log files and symlinks * symlinks to log files * err... * that's it %prep %setup -q -n %{mod_name}-%{version} cp %{SOURCE1} %{mod_conf} # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' %build %{_sbindir}/apxs -c mod_log_access.c log_timeutils.c tail -175 mod_log_access.c > README.mod_log_access %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/apache-extramodules install -d %{buildroot}%{_sysconfdir}/httpd/modules.d install -m0755 .libs/*.so %{buildroot}%{_libdir}/apache-extramodules/ install -m0644 %{mod_conf} %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf} %post if [ -f %{_var}/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2; fi %postun if [ "$1" = "0" ]; then if [ -f %{_var}/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2 fi fi %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc ChangeLog NOTES README README.mod_log_access %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf} %attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so} %changelog * Sat Mar 10 2007 Oden Eriksson <oeriksson@mandriva.com> 1.02-2mdv2007.1 + Revision: 140711 - rebuild * Mon Feb 12 2007 Oden Eriksson <oeriksson@mandriva.com> 1.02-1mdv2007.1 + Revision: 118960 - Import apache-mod_log_access * Mon Feb 12 2007 Oden Eriksson <oeriksson@mandriva.com> 1.02-1mdv2007.1 - initial Mandriva package