]>
Commit | Line | Data |
---|---|---|
1 | %define mod_name dbi_pool | |
2 | %define apxs /usr/sbin/apxs | |
3 | Summary: mod_dbi_pool - Pool Database connections between modules and requests | |
4 | Summary(pl.UTF-8): mod_dbi_pool - połączenia bazowanowe między modułami i żądaniami | |
5 | Name: apache-mod_%{mod_name} | |
6 | Version: 0.4.0 | |
7 | Release: 1 | |
8 | License: GPL | |
9 | Group: Networking/Daemons | |
10 | Source0: http://www.outoforder.cc/downloads/mod_dbi_pool/mod_%{mod_name}-%{version}.tar.bz2 | |
11 | # Source0-md5: 7fd42e90358b370eafdddf1f7252a65e | |
12 | URL: http://www.outoforder.cc/projects/apache/mod_dbi_pool/ | |
13 | BuildRequires: apache-apxs >= 2.0 | |
14 | BuildRequires: apache-devel >= 2.0.40 | |
15 | BuildRequires: autoconf | |
16 | BuildRequires: automake | |
17 | BuildRequires: libdbi-devel >= 0.7.2 | |
18 | BuildRequires: libtool | |
19 | BuildRequires: pkgconfig | |
20 | BuildRequires: rpmbuild(macros) >= 1.268 | |
21 | BuildRequires: sed >= 4.0 | |
22 | Requires: apache(modules-api) = %apache_modules_api | |
23 | Requires: libdbi >= 0.7.2 | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
27 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
28 | ||
29 | %description | |
30 | mod_dbi_pool provides database connection pooling services for other | |
31 | Apache Modules. Using libdbi it allows other modules to have a dynamic | |
32 | pool of database connections for many common SQL Servers, including | |
33 | mSQL, MySQL, PostgreSQL, Oracle and SQLite. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | mod_dbi_pool dostarcza usługi utrzymywania puli połączeń z bazą danych | |
37 | dla innych modułów Apache'a. Poprzez użycie libdbi umożliwia innym | |
38 | modułom posiadanie dynamicznej puli połączeń z bazą danych dla wielu | |
39 | popularnych serwerów SQL, w tym mSQL, MySQL, PostgreSQL, Oracle i | |
40 | SQLite. | |
41 | ||
42 | %package devel | |
43 | Summary: Header files for mod_dbi_pool API | |
44 | Summary(pl.UTF-8): Pliki nagłówkowe dla API mod_dbi_pool | |
45 | Group: Development/Libraries | |
46 | Requires: apache-devel >= 2.0.40 | |
47 | ||
48 | %description devel | |
49 | Header files for mod_dbi_pool API. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Pliki nagłówkowe dla API mod_dbi_pool. | |
53 | ||
54 | %prep | |
55 | %setup -q -n mod_%{mod_name}-%{version} | |
56 | ||
57 | %build | |
58 | %{__libtoolize} | |
59 | %{__aclocal} -I m4 | |
60 | %{__autoconf} | |
61 | %{__automake} | |
62 | ||
63 | sed -i -e 's,test_paths="/usr/lib /usr/local/lib",test_paths="/usr/%{_lib} /usr/lib",g' configure | |
64 | ||
65 | %configure \ | |
66 | --with-apxs=%{apxs} | |
67 | %{__make} | |
68 | %{__make} -C src make_so | |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_includedir}/apache,%{_sysconfdir}/httpd.conf} | |
73 | ||
74 | install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
75 | ||
76 | install include/mod_dbi_pool.h $RPM_BUILD_ROOT%{_includedir}/apache | |
77 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ | |
78 | $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/75_mod_%{mod_name}.conf | |
79 | ||
80 | %clean | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %post | |
84 | %service -q httpd restart | |
85 | ||
86 | %postun | |
87 | if [ "$1" = "0" ]; then | |
88 | %service -q httpd restart | |
89 | fi | |
90 | ||
91 | %files | |
92 | %defattr(644,root,root,755) | |
93 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf | |
94 | %attr(755,root,root) %{_pkglibdir}/*.so | |
95 | ||
96 | %files devel | |
97 | %defattr(644,root,root,755) | |
98 | %{_includedir}/apache/*.h |