#Module-Specific definitions %define mod_name mod_vhs %define mod_conf A73_%{mod_name}.conf %define mod_so %{mod_name}.so Summary: Mod_vhs is a DSO module for the apache web server Name: apache-%{mod_name} Version: 1.0.32 Release: %mkrel 2 Group: System/Servers License: GPL URL: http://www.oav.net/projects/mod_vhs/ Source0: http://www.oav.net/projects/mod_vhs/%{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 BuildRequires: libhome-devel BuildRequires: php-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description mod_vhs is an Apache 2.0/2.1 Web server module allowing mass virtual hosting without the need for file-based configuration. The virtual host paths are translated from any database supported by libhome at request time from MySQL, LDAP, PAM, or a system password file. PHP security can be basically auto-configured from the database using this module. %prep %setup -q -n %{mod_name} 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//' # fix attribs chmod 644 * %build %{_sbindir}/apxs -DDEBIAN `apr-1-config --includes` `libhome.sh --includes` `php-config --includes` -lhome -DHAVE_MOD_PHP_SUPPORT -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/ 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 AUTHORS ChangeLog README* THANKS TODO WARNING %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.0.32-2mdv2007.1 + Revision: 140774 - rebuild * Wed Mar 07 2007 Oden Eriksson <oeriksson@mandriva.com> 1.0.32-1mdv2007.1 + Revision: 134884 - 1.0.32 * Thu Nov 09 2006 Oden Eriksson <oeriksson@mandriva.com> 1.0.30-1mdv2007.0 + Revision: 79549 - Import apache-mod_vhs * Fri Jul 21 2006 Oden Eriksson <oeriksson@mandriva.com> 1.0.30-1mdv2007.0 - initial Mandriva package