2 %define mod_name dbi_pool
3 %define apxs /usr/sbin/apxs
5 Summary(pl): mod_dbi_pool
6 Name: apache-mod_%{mod_name}
10 Group: Networking/Daemons
11 Source0: http://www.outoforder.cc/downloads/mod_dbi_pool/mod_%{mod_name}-%{version}.tar.bz2
12 # Source0-md5: 7fd42e90358b370eafdddf1f7252a65e
13 BuildRequires: %{apxs}
14 BuildRequires: autoconf
15 BuildRequires: automake
16 BuildRequires: apache-devel
17 BuildRequires: libdbi-devel
18 BuildRequires: libtool
19 BuildRequires: pkgconfig
20 Requires(post,preun): %{apxs}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
29 Summary: mod_vhost_dbi
30 Group: Development/Libraries
31 Requires: %{name}-devel = %{version}-%{release}
36 %setup -q -n mod_%{mod_name}-%{version}
46 %{__make} -C src make_so
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_includedir}/apache}
52 install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
54 install include/mod_dbi_pool.h $RPM_BUILD_ROOT%{_includedir}/apache
57 rm -rf $RPM_BUILD_ROOT
60 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
61 if [ -f /var/lock/subsys/httpd ]; then
62 /etc/rc.d/init.d/httpd restart 1>&2
66 if [ "$1" = "0" ]; then
67 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
68 if [ -f /var/lock/subsys/httpd ]; then
69 /etc/rc.d/init.d/httpd restart 1>&2
74 %defattr(644,root,root,755)
75 %attr(755,root,root) %{_pkglibdir}/*.so
78 %defattr(644,root,root,755)
79 %{_includedir}/apache/*.h