]> git.pld-linux.org Git - packages/apache-mod_vhost_dbi.git/blob - apache-mod_vhost_dbi.spec
- use config file to load module (thanks glen)
[packages/apache-mod_vhost_dbi.git] / apache-mod_vhost_dbi.spec
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}
7 Version:        0.1.0
8 Release:        1
9 License:        GPL
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
20 BuildRequires:  sed
21 Requires:       apache >= 2.0.40
22 Requires:       apache-mod_dbi_pool >= 0.4.0
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
26 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
27
28 %description
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.
32
33 %description -l pl
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.
37
38 %prep
39 %setup -q -n mod_%{mod_name}-%{version}
40
41 %build
42 %{__libtoolize}
43 %{__aclocal} -I m4
44 %{__autoconf}
45 %{__automake}
46
47 sed -i -e 's,test_paths="/usr/lib /usr/local/lib",test_paths="/usr/%{_lib} /usr/lib",g' configure
48
49 %configure \
50         --with-apxs=%{apxs}
51 %{__make}
52 %{__make} -C src make_so
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_includedir}/apache,%{_sysconfdir}/httpd.conf}
57
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
62 EOF
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post
68 if [ -f /var/lock/subsys/httpd ]; then
69         /etc/rc.d/init.d/httpd restart 1>&2
70 fi
71
72 %preun
73 if [ "$1" = "0" ]; then
74         if [ -f /var/lock/subsys/httpd ]; then
75                 /etc/rc.d/init.d/httpd restart 1>&2
76         fi
77 fi
78
79 %files
80 %defattr(644,root,root,755)
81 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.080307 seconds and 3 git commands to generate.