#Module-Specific definitions %define mod_name mod_vhost_mysql %define mod_conf A74_%{mod_name}.conf %define mod_so %{mod_name}.so Summary: Mod_vhost_mysql is a DSO module for the apache web server Name: apache-%{mod_name} Version: 0.10 Release: %mkrel 2 Group: System/Servers License: GPL URL: http://fabienne.tc2.utelisys.net/~skinkie/mod_vhost_mysql2/ Source0: http://fabienne.tc2.utelisys.net/~skinkie/mod_vhost_mysql2/mod_vhost_mysql2-0.10.tar.bz2 Source1: %{mod_conf}.bz2 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 BuildRequires: MySQL-devel BuildRequires: openssl-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description This module provides dynamically configured virtual Hosting. using MySQL in Apache2. %prep %setup -q -n %{mod_name}2-%{version} # 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 `mysql_config --include` `mysql_config --libs` -c %{mod_name}.c %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/httpd/modules.d install -d %{buildroot}%{_libdir}/apache-extramodules install -m0755 .libs/*.so %{buildroot}%{_libdir}/apache-extramodules/ bzcat %{SOURCE1} > %{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 README vh.sql %attr(0640,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf} %attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so} %changelog * Mon Sep 04 2006 Oden Eriksson <oeriksson@mandriva.com> 0.10-1mdv2007.0 - rebuilt against MySQL-5.0.24a-1mdv2007.0 due to ABI changes * Fri Jul 21 2006 Oden Eriksson <oeriksson@mandriva.com> 0.10-1mdv2007.0 - initial Mandriva package