]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with freetds # with FreeTDS (sybdb) DBD module (unfinished) | |
4 | %bcond_without mysql # without MySQL DBD module | |
5 | %bcond_without odbc # without ODBC DBD module | |
6 | %bcond_with oracle # with Oracle DBD module (BR: proprietary libs) | |
7 | %bcond_without pgsql # without PostgreSQL DBD module | |
8 | %bcond_with sqlite2 # with SQLite 2.x DBD module | |
9 | %bcond_without sqlite3 # without SQLite3 DBD module | |
10 | %bcond_without ldap # without LDAP module | |
11 | # | |
12 | Summary: A companion library to Apache Portable Runtime | |
13 | Summary(pl.UTF-8): Biblioteka towarzysząca Apache Portable Runtime | |
14 | Name: apr-util | |
15 | Version: 1.3.2 | |
16 | Release: 1 | |
17 | Epoch: 1 | |
18 | License: Apache v2.0 | |
19 | Group: Libraries | |
20 | Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2 | |
21 | # Source0-md5: aa782fb9ced8b59c8e99419d8cdd1981 | |
22 | Patch0: %{name}-link.patch | |
23 | Patch1: %{name}-db47.patch | |
24 | URL: http://apr.apache.org/ | |
25 | BuildRequires: apr-devel >= 1:1.3.0 | |
26 | BuildRequires: autoconf | |
27 | %if "%{pld_release}" == "ti" | |
28 | BuildRequires: db-devel >= 4.5 | |
29 | %else | |
30 | BuildRequires: db-devel >= 4.7 | |
31 | %endif | |
32 | BuildRequires: expat-devel | |
33 | %{?with_freetds:BuildRequires: freetds-devel} | |
34 | BuildRequires: libtool | |
35 | %{?with_mysql:BuildRequires: mysql-devel} | |
36 | %{?with_ldap:BuildRequires: openldap-devel >= 2.4.6} | |
37 | %{?with_odbc:BuildRequires: unixODBC-devel} | |
38 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
39 | BuildRequires: rpm >= 4.4.9-56 | |
40 | %{?with_sqlite2:BuildRequires: sqlite-devel >= 2} | |
41 | %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3} | |
42 | Requires: apr >= 1:1.3.0 | |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %define _includedir /usr/include/apr-util | |
46 | ||
47 | %description | |
48 | A companion library to Apache Portable Runtime. | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | Biblioteka towarzysząca dla biblioteki Apache Portable Runtime | |
52 | (przenośnej biblioteki uruchomieniowej). | |
53 | ||
54 | %package dbd-freetds | |
55 | Summary: DBD driver for FreeTDS (Sybase/MS SQL) | |
56 | Summary(pl.UTF-8): Sterownik DBD dla FreeTDS (Sybase/MS SQL) | |
57 | Group: Libraries | |
58 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
59 | ||
60 | %description dbd-freetds | |
61 | DBD driver for FreeTDS (Sybase/MS SQL). | |
62 | ||
63 | %description dbd-freetds -l pl.UTF-8 | |
64 | Sterownik DBD dla FreeTDS (Sybase/MS SQL). | |
65 | ||
66 | %package dbd-mysql | |
67 | Summary: DBD driver for MySQL | |
68 | Summary(pl.UTF-8): Sterownik DBD dla MySQL-a | |
69 | License: GPL | |
70 | Group: Libraries | |
71 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
72 | ||
73 | %description dbd-mysql | |
74 | DBD driver for MySQL. | |
75 | ||
76 | %description dbd-mysql -l pl.UTF-8 | |
77 | Sterownik DBD dla MySQL-a. | |
78 | ||
79 | %package dbd-odbc | |
80 | Summary: DBD driver for ODBC | |
81 | Summary(pl.UTF-8): Sterownik DBD dla ODBC | |
82 | License: GPL | |
83 | Group: Libraries | |
84 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
85 | ||
86 | %description dbd-odbc | |
87 | DBD driver for ODBC. | |
88 | ||
89 | %description dbd-odbc -l pl.UTF-8 | |
90 | Sterownik DBD dla ODBC. | |
91 | ||
92 | %package dbd-oracle | |
93 | Summary: DBD driver for Oracle | |
94 | Summary(pl.UTF-8): Sterownik DBD dla Oracle'a | |
95 | Group: Libraries | |
96 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
97 | ||
98 | %description dbd-oracle | |
99 | DBD driver for Oracle. | |
100 | ||
101 | %description dbd-oracle -l pl.UTF-8 | |
102 | Sterownik DBD dla Oracle'a. | |
103 | ||
104 | %package dbd-pgsql | |
105 | Summary: DBD driver for PostgreSQL | |
106 | Summary(pl.UTF-8): Sterownik DBD dla PostgreSQL-a | |
107 | Group: Libraries | |
108 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
109 | ||
110 | %description dbd-pgsql | |
111 | DBD driver for PostgreSQL. | |
112 | ||
113 | %description dbd-pgsql -l pl.UTF-8 | |
114 | Sterownik DBD dla PostgreSQL-a. | |
115 | ||
116 | %package dbd-sqlite2 | |
117 | Summary: DBD driver for SQLite 2 | |
118 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 2 | |
119 | Group: Libraries | |
120 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
121 | ||
122 | %description dbd-sqlite2 | |
123 | DBD driver for SQLite 2. | |
124 | ||
125 | %description dbd-sqlite2 -l pl.UTF-8 | |
126 | Sterownik DBD dla SQLite 2. | |
127 | ||
128 | %package dbd-sqlite3 | |
129 | Summary: DBD driver for SQLite 3 | |
130 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 3 | |
131 | Group: Libraries | |
132 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
133 | ||
134 | %description dbd-sqlite3 | |
135 | DBD driver for SQLite 3. | |
136 | ||
137 | %description dbd-sqlite3 -l pl.UTF-8 | |
138 | Sterownik DBD dla SQLite 3. | |
139 | ||
140 | %package ldap | |
141 | Summary: APR LDAP driver | |
142 | Summary(pl.UTF-8): Sterownik APR dla LDAP | |
143 | Group: Libraries | |
144 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
145 | ||
146 | %description ldap | |
147 | APR LDAP driver. | |
148 | ||
149 | %description ldap -l pl.UTF-8 | |
150 | Sterownik APR dla LDAP. | |
151 | ||
152 | %package devel | |
153 | Summary: Header files and development documentation for apr-util | |
154 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty do apr-util | |
155 | Group: Development/Libraries | |
156 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
157 | Requires: apr-devel >= 1:1.3.0 | |
158 | Requires: db-devel | |
159 | Requires: expat-devel | |
160 | ||
161 | %description devel | |
162 | Header files and development documentation for apr-util. | |
163 | ||
164 | %description devel -l pl.UTF-8 | |
165 | Pliki nagłówkowe i dokumentacja programisty do apr-util. | |
166 | ||
167 | %package static | |
168 | Summary: Static apr-util library | |
169 | Summary(pl.UTF-8): Statyczna biblioteka apr-util | |
170 | Group: Development/Libraries | |
171 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
172 | ||
173 | %description static | |
174 | Static apr-util library. | |
175 | ||
176 | %description static -l pl.UTF-8 | |
177 | Statyczna biblioteka apr-util. | |
178 | ||
179 | %prep | |
180 | %setup -q | |
181 | %patch0 -p1 | |
182 | %patch1 -p1 | |
183 | ||
184 | rm -rf xml/expat | |
185 | ||
186 | echo ' | |
187 | <Layout PLD> | |
188 | prefix: %{_prefix} | |
189 | exec_prefix: %{_exec_prefix} | |
190 | bindir: %{_bindir} | |
191 | sbindir: %{_sbindir} | |
192 | libdir: %{_libdir} | |
193 | libexecdir: %{_libdir}/apr | |
194 | mandir: %{_mandir} | |
195 | sysconfdir: %{_sysconfdir} | |
196 | datadir: %{_datadir} | |
197 | installbuilddir: %{_datadir}/build | |
198 | includedir: %{_includedir} | |
199 | localstatedir: %{_localstatedir} | |
200 | runtimedir: %{_localstatedir}/run | |
201 | libsuffix: -${APRUTIL_MAJOR_VERSION} | |
202 | </Layout> | |
203 | ' > config.layout | |
204 | ||
205 | %build | |
206 | ./buildconf \ | |
207 | --with-apr=%{_datadir}/apr | |
208 | ||
209 | %configure \ | |
210 | --enable-layout=PLD \ | |
211 | --with-apr=%{_bindir}/apr-1-config \ | |
212 | --with-berkeley-db=%{_prefix} \ | |
213 | %if "%{pld_release}" == "ti" | |
214 | --with-dbm=db45 \ | |
215 | %else | |
216 | --with-dbm=db47 \ | |
217 | %endif | |
218 | --with-iconv=%{_prefix} \ | |
219 | %if %{with ldap} | |
220 | --with-ldap \ | |
221 | --with-ldap-include=%{_prefix}/include \ | |
222 | --with-ldap-lib=%{_libdir} \ | |
223 | %endif | |
224 | %{!?with_freetds:--without-freetds} \ | |
225 | %{?with_mysql:--with-mysql=%{_prefix}} \ | |
226 | %{!?with_odbc:--without-odbc} \ | |
227 | %{?with_oracle:--with-oracle} \ | |
228 | %{!?with_pgsql:--without-pgsql} \ | |
229 | %{!?with_sqlite2:--without-sqlite2} \ | |
230 | %{!?with_sqlite3:--without-sqlite3} | |
231 | ||
232 | %{__make} \ | |
233 | CC="%{__cc}" | |
234 | ||
235 | %install | |
236 | rm -rf $RPM_BUILD_ROOT | |
237 | ||
238 | %{__make} install \ | |
239 | DESTDIR=$RPM_BUILD_ROOT | |
240 | ||
241 | rm $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a} | |
242 | ||
243 | %clean | |
244 | rm -rf $RPM_BUILD_ROOT | |
245 | ||
246 | %post -p /sbin/ldconfig | |
247 | %postun -p /sbin/ldconfig | |
248 | ||
249 | %files | |
250 | %defattr(644,root,root,755) | |
251 | %doc CHANGES NOTICE README | |
252 | %attr(755,root,root) %{_libdir}/libaprutil-1.so.*.*.* | |
253 | %attr(755,root,root) %ghost %{_libdir}/libaprutil-1.so.0 | |
254 | %dir %{_libdir}/apr-util-1 | |
255 | ||
256 | %if %{with freetds} | |
257 | %files dbd-freetds | |
258 | %defattr(644,root,root,755) | |
259 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds-1.so | |
260 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds.so | |
261 | %endif | |
262 | ||
263 | %if %{with mysql} | |
264 | %files dbd-mysql | |
265 | %defattr(644,root,root,755) | |
266 | %doc README.MySQL | |
267 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql-1.so | |
268 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql.so | |
269 | %endif | |
270 | ||
271 | %if %{with_odbc} | |
272 | %files dbd-odbc | |
273 | %defattr(644,root,root,755) | |
274 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc-1.so | |
275 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc.so | |
276 | %endif | |
277 | ||
278 | %if %{with oracle} | |
279 | %files dbd-oracle | |
280 | %defattr(644,root,root,755) | |
281 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle-1.so | |
282 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle.so | |
283 | %endif | |
284 | ||
285 | %if %{with pgsql} | |
286 | %files dbd-pgsql | |
287 | %defattr(644,root,root,755) | |
288 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql-1.so | |
289 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql.so | |
290 | %endif | |
291 | ||
292 | %if %{with sqlite2} | |
293 | %files dbd-sqlite2 | |
294 | %defattr(644,root,root,755) | |
295 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2-1.so | |
296 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2.so | |
297 | %endif | |
298 | ||
299 | %if %{with sqlite3} | |
300 | %files dbd-sqlite3 | |
301 | %defattr(644,root,root,755) | |
302 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3-1.so | |
303 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3.so | |
304 | %endif | |
305 | ||
306 | %if %{with ldap} | |
307 | %files ldap | |
308 | %defattr(644,root,root,755) | |
309 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap-1.so | |
310 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap.so | |
311 | %endif | |
312 | ||
313 | %files devel | |
314 | %defattr(644,root,root,755) | |
315 | %attr(755,root,root) %{_bindir}/apu-1-config | |
316 | %attr(755,root,root) %{_libdir}/libaprutil-1.so | |
317 | %{_libdir}/libaprutil-1.la | |
318 | %{_libdir}/aprutil.exp | |
319 | %{_includedir} | |
320 | %{_pkgconfigdir}/apr-util-1.pc | |
321 | ||
322 | %files static | |
323 | %defattr(644,root,root,755) | |
324 | %{_libdir}/libaprutil-1.a |