]> git.pld-linux.org Git - packages/apache-mod_vhost_mysql.git/blobdiff - apache-mod_vhost_mysql.spec
- added patch for public_html,
[packages/apache-mod_vhost_mysql.git] / apache-mod_vhost_mysql.spec
index 63a246cd92d97b9396f7e41fdb1801af93ae8da6..383285f85b274670b61f28945ce920cc03fa248d 100644 (file)
@@ -1,24 +1,27 @@
 %define                mod_name        vhost_mysql
 %define        apxs            /usr/sbin/apxs
+%bcond_with     publichtml           # enables search of public_html in home taken from mysql
 Summary:       Apache vhost in MySQL
 Summary(pl):   Wirtualne hosty dla Apache'a w bazie MySQL
 Name:          apache-mod_%{mod_name}
 Version:       0.10
-Release:       3
+Release:       6
 License:       GPL
 Group:         Networking/Daemons
 Source0:       http://fabienne.tc2.utelisys.net/~skinkie/mod_vhost_mysql2/mod_%{mod_name}2-%{version}.tar.gz
 # Source0-md5: c47c8dc4ac41e9ed2c91a239c876d272
 Source1:       apache_vhost_mysql.conf
+Patch0:                mod_%{mod_name}2-publichtml.patch               
 BuildRequires: %{apxs}
-BuildRequires: apache-devel
+BuildRequires: apache-devel >= 2.0
 BuildRequires: db-devel >= 4.2.52
 BuildRequires: mysql-devel
-Requires(post,preun):  %{apxs}
-Requires:      apache
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires:      apache(modules-api) = %apache_modules_api
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 This module provides dynamically configured virtual hosting using
@@ -31,6 +34,10 @@ Apache'u 2 przy u
 %prep
 %setup -q -n mod_%{mod_name}2-%{version}
 rm -rf .libs *.{la,lo,o,slo}
+%if %{with publichtml}
+%patch -p1
+%endif
+
 
 %build
 %{__make} \
@@ -38,31 +45,24 @@ rm -rf .libs *.{la,lo,o,slo}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd/httpd.conf}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
 
 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/21_vhost_mysql.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/21_vhost_mysql.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-fi
+%service -q httpd restart
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
-       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
+       %service -q httpd restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc README vh.sql
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_vhost_mysql.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_vhost_mysql.conf
 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.703459 seconds and 4 git commands to generate.