3 # Summary clean +pl, description,
5 %define mod_name vhost_mysql
6 %define apxs /usr/sbin/apxs
7 Summary: Apache vhost in mysql
8 Name: apache-mod_%{mod_name}
12 Group: Networking/Daemons
13 Source0: http://fabienne.tc2.utelisys.net/~skinkie/mod_%{mod_name}2/mod_%{mod_name}2-%{version}.tar.gz
14 # Source0-md5: c47c8dc4ac41e9ed2c91a239c876d272
15 BuildRequires: %{apxs}
16 BuildRequires: apache-devel
17 BuildRequires: db-devel >= 4.2.52
18 BuildRequires: mysql-devel
19 Requires(post,preun): %{apxs}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
28 %setup -q -n mod_%{mod_name}2-%{version}
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT%{_pkglibdir}
37 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
40 rm -rf $RPM_BUILD_ROOT
43 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
44 if [ -f /var/lock/subsys/httpd ]; then
45 /etc/rc.d/init.d/httpd restart 1>&2
49 if [ "$1" = "0" ]; then
50 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
51 if [ -f /var/lock/subsys/httpd ]; then
52 /etc/rc.d/init.d/httpd restart 1>&2
57 %defattr(644,root,root,755)
59 %attr(755,root,root) %{_pkglibdir}/*