]>
Commit | Line | Data |
---|---|---|
bb2945d8 | 1 | |
2 | %define mod_name dbi_pool | |
3 | %define apxs /usr/sbin/apxs | |
4 | Summary: mod_dbi_pool | |
5 | Summary(pl): mod_dbi_pool | |
6 | Name: apache-mod_%{mod_name} | |
7 | Version: 0.4.0 | |
8 | Release: 1 | |
9 | License: GPL | |
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} | |
21 | Requires: apache | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR) | |
25 | ||
26 | %description | |
27 | ||
28 | %description -l pl | |
29 | ||
30 | %prep | |
31 | %setup -q -n mod_%{mod_name}-%{version} | |
32 | ||
33 | %build | |
34 | %{__libtoolize} | |
35 | %{__aclocal} -I m4 | |
36 | %{__autoconf} | |
37 | %{__automake} | |
38 | %configure \ | |
39 | --with-apxs=%{apxs} | |
40 | %{__make} | |
41 | %{__make} -C src make_so | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd/httpd.conf} | |
46 | ||
47 | install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
48 | ||
49 | %clean | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %post | |
53 | %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
54 | if [ -f /var/lock/subsys/httpd ]; then | |
55 | /etc/rc.d/init.d/httpd restart 1>&2 | |
56 | fi | |
57 | ||
58 | %preun | |
59 | if [ "$1" = "0" ]; then | |
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 | |
63 | fi | |
64 | fi | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
68 | %attr(755,root,root) %{_pkglibdir}/*.so |