]>
Commit | Line | Data |
---|---|---|
bb2945d8 | 1 | %define mod_name dbi_pool |
2 | %define apxs /usr/sbin/apxs | |
bfc84d88 | 3 | Summary: mod_dbi_pool - Pool Database connections between modules and requests |
2fc90adf | 4 | Summary(pl.UTF-8): mod_dbi_pool - połączenia bazowanowe między modułami i żądaniami |
bb2945d8 | 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 | |
bfc84d88 | 12 | URL: http://www.outoforder.cc/projects/apache/mod_dbi_pool/ |
bb2945d8 | 13 | BuildRequires: %{apxs} |
3c76c487 | 14 | BuildRequires: apache-devel >= 2.0.40 |
bb2945d8 | 15 | BuildRequires: autoconf |
16 | BuildRequires: automake | |
a0b01d06 | 17 | BuildRequires: libdbi-devel >= 0.7.2 |
bb2945d8 | 18 | BuildRequires: libtool |
19 | BuildRequires: pkgconfig | |
e6e0d369 | 20 | BuildRequires: rpmbuild(macros) >= 1.268 |
3c76c487 ER |
21 | BuildRequires: sed >= 4.0 |
22 | Requires: apache(modules-api) = %apache_modules_api | |
a0b01d06 | 23 | Requires: libdbi >= 0.7.2 |
bb2945d8 | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
438e4942 ER |
26 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) |
27 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
bb2945d8 | 28 | |
29 | %description | |
bfc84d88 JB |
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 | ||
2fc90adf JR |
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 | |
bfc84d88 | 40 | SQLite. |
bb2945d8 | 41 | |
a6d67225 | 42 | %package devel |
bfc84d88 | 43 | Summary: Header files for mod_dbi_pool API |
2fc90adf | 44 | Summary(pl.UTF-8): Pliki nagłówkowe dla API mod_dbi_pool |
a6d67225 | 45 | Group: Development/Libraries |
2ffba946 | 46 | Requires: apache-devel >= 2.0.40 |
a6d67225 | 47 | |
48 | %description devel | |
bfc84d88 JB |
49 | Header files for mod_dbi_pool API. |
50 | ||
2fc90adf JR |
51 | %description devel -l pl.UTF-8 |
52 | Pliki nagłówkowe dla API mod_dbi_pool. | |
bb2945d8 | 53 | |
54 | %prep | |
55 | %setup -q -n mod_%{mod_name}-%{version} | |
56 | ||
57 | %build | |
58 | %{__libtoolize} | |
59 | %{__aclocal} -I m4 | |
60 | %{__autoconf} | |
61 | %{__automake} | |
2ffba946 | 62 | |
21b8606b | 63 | sed -i -e 's,test_paths="/usr/lib /usr/local/lib",test_paths="/usr/%{_lib} /usr/lib",g' configure |
2ffba946 | 64 | |
bb2945d8 | 65 | %configure \ |
66 | --with-apxs=%{apxs} | |
67 | %{__make} | |
68 | %{__make} -C src make_so | |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
438e4942 | 72 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_includedir}/apache,%{_sysconfdir}/httpd.conf} |
bb2945d8 | 73 | |
74 | install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
75 | ||
a6d67225 | 76 | install include/mod_dbi_pool.h $RPM_BUILD_ROOT%{_includedir}/apache |
3c76c487 ER |
77 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
78 | $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/75_mod_%{mod_name}.conf | |
a6d67225 | 79 | |
bb2945d8 | 80 | %clean |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %post | |
e6e0d369 | 84 | %service -q httpd restart |
bb2945d8 | 85 | |
1e1f1b11 | 86 | %postun |
bb2945d8 | 87 | if [ "$1" = "0" ]; then |
e6e0d369 | 88 | %service -q httpd restart |
bb2945d8 | 89 | fi |
90 | ||
91 | %files | |
92 | %defattr(644,root,root,755) | |
3c76c487 | 93 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf |
bb2945d8 | 94 | %attr(755,root,root) %{_pkglibdir}/*.so |
a6d67225 | 95 | |
96 | %files devel | |
97 | %defattr(644,root,root,755) | |
98 | %{_includedir}/apache/*.h |