1 # $Rev$, $Date: 2005-09-13 11:40:29 $
2 %define mod_name vhost_dbi
3 %define apxs /usr/sbin/apxs
4 Summary: mod_vhost_dbi - dynamic virtual hosting using database to store information
5 Summary(pl): mod_vhost_dbi - dynamiczne hosty wirtualne z informacjami trzymanymi w bazie danych
6 Name: apache-mod_%{mod_name}
10 Group: Networking/Daemons
11 Source0: http://www.outoforder.cc/downloads/mod_vhost_dbi/mod_%{mod_name}-%{version}.tar.bz2
12 # Source0-md5: fd70c654e6b2e78280acb4643207ab68
13 URL: http://www.outoforder.cc/projects/apache/mod_vhost_dbi/
14 BuildRequires: %{apxs}
15 BuildRequires: autoconf
16 BuildRequires: automake
17 BuildRequires: apache-devel >= 2.0.40
18 BuildRequires: apache-mod_dbi_pool-devel >= 0.4.0
19 BuildRequires: libtool
21 Requires: apache >= 2.0.40
22 Requires: apache-mod_dbi_pool >= 0.4.0
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
26 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29 mod_vhost_dbi creates virtual hosts for Apache 2.0 completely
30 dynamically, without the need to edit your configuration file or
31 restart Apache if you change a Vhost.
34 mod_vhost_dbi tworzy wirtualne hosty dla Apache'a 2.0 w sposób
35 ca³kowicie dynamiczny, bez potrzeby modyfikowania pliku
36 konfiguracyjnego czy restartowania Apache'a po zmianie vhosta.
39 %setup -q -n mod_%{mod_name}-%{version}
47 sed -i -e 's,test_paths="/usr/lib /usr/local/lib",test_paths="/usr/%{_lib} /usr/lib",g' configure
52 %{__make} -C src make_so
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_includedir}/apache,%{_sysconfdir}/httpd.conf}
58 install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
59 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/79_%{mod_name}.conf
60 LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
61 # vim: filetype=apache ts=4 sw=4 et
65 rm -rf $RPM_BUILD_ROOT
68 if [ -f /var/lock/subsys/httpd ]; then
69 /etc/rc.d/init.d/httpd restart 1>&2
73 if [ "$1" = "0" ]; then
74 if [ -f /var/lock/subsys/httpd ]; then
75 /etc/rc.d/init.d/httpd restart 1>&2
80 %defattr(644,root,root,755)
81 %attr(755,root,root) %{_pkglibdir}/*.so