]>
Commit | Line | Data |
---|---|---|
b1652f3f | 1 | # NOTE: drop freetds bcond if/when upstream removes the rest of dbd-freetds code |
a7e1e844 | 2 | # |
30276236 | 3 | # Conditional build: |
b1652f3f | 4 | %bcond_with freetds # without FreeTDS (sybdb) DBD module [unsupported since 1.6.0] |
48e7a7b5 AG |
5 | %bcond_without mysql # without MySQL DBD module |
6 | %bcond_without odbc # without ODBC DBD module | |
92c6255c JB |
7 | %bcond_with oracle # with Oracle DBD module (BR: proprietary libs) |
8 | %bcond_without pgsql # without PostgreSQL DBD module | |
9 | %bcond_with sqlite2 # with SQLite 2.x DBD module | |
10 | %bcond_without sqlite3 # without SQLite3 DBD module | |
11 | %bcond_without ldap # without LDAP module | |
b95223bc JB |
12 | %bcond_without nss # without NSS crypto module |
13 | %bcond_without openssl # without OpenSSL crypto module | |
14 | %bcond_without tests # don't perform "make check" | |
f53e9eb5 | 15 | |
b1802398 JB |
16 | # define dbver db50 |
17 | %if 0%{!?dbver:1} | |
f53e9eb5 | 18 | %if "%{pld_release}" == "th" |
4aaa3621 | 19 | %define dbver db53 |
f53e9eb5 | 20 | %endif |
f53e9eb5 ER |
21 | %if "%{pld_release}" == "ac" |
22 | %define dbver db42 | |
23 | %endif | |
b1802398 | 24 | %endif |
f53e9eb5 | 25 | |
72a05a99 | 26 | Summary: A companion library to Apache Portable Runtime |
1cdce4f9 | 27 | Summary(pl.UTF-8): Biblioteka towarzysząca Apache Portable Runtime |
72a05a99 | 28 | Name: apr-util |
37a3d5ee AM |
29 | Version: 1.6.3 |
30 | Release: 1 | |
72a05a99 | 31 | Epoch: 1 |
30276236 | 32 | License: Apache v2.0 |
72a05a99 | 33 | Group: Libraries |
4078c8d7 | 34 | Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2 |
37a3d5ee | 35 | # Source0-md5: b6e8c9b31d938fe5797ceb0d1ff2eb69 |
90687e98 | 36 | Patch0: %{name}-link.patch |
155bafb5 | 37 | Patch1: %{name}-config-noldap.patch |
37a3d5ee | 38 | |
d12a4eaf | 39 | Patch3: %{name}-flags.patch |
72a05a99 | 40 | URL: http://apr.apache.org/ |
b2d4bebb | 41 | BuildRequires: apr-devel >= 1:1.6.0 |
f7e14f7d | 42 | BuildRequires: autoconf >= 2.59 |
16929f4d | 43 | %if "%{pld_release}" == "th" |
92c6255c | 44 | BuildRequires: db-devel >= 4.7 |
16929f4d | 45 | %endif |
f53e9eb5 ER |
46 | %if "%{pld_release}" == "ac" |
47 | BuildRequires: db-devel >= 4.2 | |
48 | BuildConflicts: db4.5-devel | |
7b70f674 | 49 | %endif |
77bbdc19 | 50 | BuildRequires: expat-devel |
92c6255c | 51 | %{?with_freetds:BuildRequires: freetds-devel} |
fed4b95d | 52 | BuildRequires: libtool |
e753ced3 | 53 | %{?with_mysql:BuildRequires: mysql-devel} |
b95223bc | 54 | %{?with_nss:BuildRequires: nss-devel} |
16929f4d | 55 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} |
b95223bc | 56 | %{?with_openssl:BuildRequires: openssl-devel} |
e753ced3 | 57 | %{?with_pgsql:BuildRequires: postgresql-devel} |
7b70f674 | 58 | BuildRequires: rpm >= 4.4.9-56 |
40238ac3 | 59 | %{?with_sqlite2:BuildRequires: sqlite-devel >= 2} |
4078c8d7 | 60 | %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3} |
c10367e4 | 61 | %{?with_odbc:BuildRequires: unixODBC-devel} |
ab046b66 | 62 | BuildRequires: which |
b2d4bebb | 63 | Requires: apr >= 1:1.6.0 |
b1652f3f | 64 | %{!?with_freetds:Obsoletes: apr-util-dbd-freetds} |
72a05a99 AM |
65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
66 | ||
67 | %define _includedir /usr/include/apr-util | |
68 | ||
69 | %description | |
70 | A companion library to Apache Portable Runtime. | |
71 | ||
61c4246a JR |
72 | %description -l pl.UTF-8 |
73 | Biblioteka towarzysząca dla biblioteki Apache Portable Runtime | |
74 | (przenośnej biblioteki uruchomieniowej). | |
77bbdc19 | 75 | |
b95223bc JB |
76 | %package crypto-nss |
77 | Summary: APR cryptographic module using Mozilla NSS library | |
78 | Summary(pl.UTF-8): Moduł kryptograficzny APR wykorzystujący bibliotekę Mozilla NSS | |
c10367e4 AM |
79 | Group: Libraries |
80 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
81 | ||
b95223bc JB |
82 | %description crypto-nss |
83 | APR cryptographic module using Mozilla NSS library. | |
c10367e4 | 84 | |
b95223bc JB |
85 | %description crypto-nss -l pl.UTF-8 |
86 | Moduł kryptograficzny APR wykorzystujący bibliotekę Mozilla NSS. | |
87 | ||
88 | %package crypto-openssl | |
89 | Summary: APR cryptographic module using OpenSSL library | |
90 | Summary(pl.UTF-8): Moduł kryptograficzny APR wykorzystujący bibliotekę OpenSSL | |
91 | Group: Libraries | |
92 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
93 | ||
94 | %description crypto-openssl | |
95 | APR cryptographic module using OpenSSL library. | |
96 | ||
97 | %description crypto-openssl -l pl.UTF-8 | |
98 | Moduł kryptograficzny APR wykorzystujący bibliotekę OpenSSL. | |
c10367e4 | 99 | |
92c6255c JB |
100 | %package dbd-freetds |
101 | Summary: DBD driver for FreeTDS (Sybase/MS SQL) | |
102 | Summary(pl.UTF-8): Sterownik DBD dla FreeTDS (Sybase/MS SQL) | |
103 | Group: Libraries | |
104 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
105 | ||
106 | %description dbd-freetds | |
107 | DBD driver for FreeTDS (Sybase/MS SQL). | |
108 | ||
109 | %description dbd-freetds -l pl.UTF-8 | |
110 | Sterownik DBD dla FreeTDS (Sybase/MS SQL). | |
111 | ||
40238ac3 ER |
112 | %package dbd-mysql |
113 | Summary: DBD driver for MySQL | |
1cdce4f9 | 114 | Summary(pl.UTF-8): Sterownik DBD dla MySQL-a |
a7e1e844 | 115 | License: GPL |
40238ac3 ER |
116 | Group: Libraries |
117 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
40238ac3 ER |
118 | |
119 | %description dbd-mysql | |
120 | DBD driver for MySQL. | |
121 | ||
61c4246a | 122 | %description dbd-mysql -l pl.UTF-8 |
a7e1e844 JB |
123 | Sterownik DBD dla MySQL-a. |
124 | ||
48e7a7b5 AG |
125 | %package dbd-odbc |
126 | Summary: DBD driver for ODBC | |
127 | Summary(pl.UTF-8): Sterownik DBD dla ODBC | |
128 | License: GPL | |
129 | Group: Libraries | |
130 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
131 | ||
132 | %description dbd-odbc | |
133 | DBD driver for ODBC. | |
134 | ||
135 | %description dbd-odbc -l pl.UTF-8 | |
136 | Sterownik DBD dla ODBC. | |
137 | ||
92c6255c JB |
138 | %package dbd-oracle |
139 | Summary: DBD driver for Oracle | |
140 | Summary(pl.UTF-8): Sterownik DBD dla Oracle'a | |
141 | Group: Libraries | |
142 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
143 | ||
144 | %description dbd-oracle | |
145 | DBD driver for Oracle. | |
146 | ||
147 | %description dbd-oracle -l pl.UTF-8 | |
148 | Sterownik DBD dla Oracle'a. | |
149 | ||
40238ac3 ER |
150 | %package dbd-pgsql |
151 | Summary: DBD driver for PostgreSQL | |
1cdce4f9 | 152 | Summary(pl.UTF-8): Sterownik DBD dla PostgreSQL-a |
40238ac3 ER |
153 | Group: Libraries |
154 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
155 | ||
156 | %description dbd-pgsql | |
157 | DBD driver for PostgreSQL. | |
158 | ||
61c4246a | 159 | %description dbd-pgsql -l pl.UTF-8 |
a7e1e844 JB |
160 | Sterownik DBD dla PostgreSQL-a. |
161 | ||
40238ac3 ER |
162 | %package dbd-sqlite2 |
163 | Summary: DBD driver for SQLite 2 | |
1cdce4f9 | 164 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 2 |
40238ac3 ER |
165 | Group: Libraries |
166 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
167 | ||
168 | %description dbd-sqlite2 | |
a7e1e844 JB |
169 | DBD driver for SQLite 2. |
170 | ||
61c4246a | 171 | %description dbd-sqlite2 -l pl.UTF-8 |
a7e1e844 | 172 | Sterownik DBD dla SQLite 2. |
40238ac3 ER |
173 | |
174 | %package dbd-sqlite3 | |
175 | Summary: DBD driver for SQLite 3 | |
1cdce4f9 | 176 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 3 |
40238ac3 ER |
177 | Group: Libraries |
178 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
179 | ||
180 | %description dbd-sqlite3 | |
a7e1e844 JB |
181 | DBD driver for SQLite 3. |
182 | ||
61c4246a | 183 | %description dbd-sqlite3 -l pl.UTF-8 |
a7e1e844 | 184 | Sterownik DBD dla SQLite 3. |
40238ac3 | 185 | |
b95223bc JB |
186 | %package dbm-db |
187 | Summary: DBM driver for DB | |
188 | Summary(pl.UTF-8): Sterownik DBM dla DB | |
189 | Group: Libraries | |
190 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
191 | ||
192 | %description dbm-db | |
193 | DBM driver for DB. | |
194 | ||
195 | %description dbm-db -l pl.UTF-8 | |
196 | Sterownik DBM dla DB. | |
197 | ||
92c6255c JB |
198 | %package ldap |
199 | Summary: APR LDAP driver | |
200 | Summary(pl.UTF-8): Sterownik APR dla LDAP | |
201 | Group: Libraries | |
202 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
203 | ||
204 | %description ldap | |
205 | APR LDAP driver. | |
206 | ||
207 | %description ldap -l pl.UTF-8 | |
208 | Sterownik APR dla LDAP. | |
209 | ||
72a05a99 | 210 | %package devel |
77bbdc19 | 211 | Summary: Header files and development documentation for apr-util |
1cdce4f9 | 212 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty do apr-util |
72a05a99 | 213 | Group: Development/Libraries |
77bbdc19 | 214 | Requires: %{name} = %{epoch}:%{version}-%{release} |
b2d4bebb | 215 | Requires: apr-devel >= 1:1.6.0 |
93be47f8 | 216 | Requires: expat-devel |
72a05a99 AM |
217 | |
218 | %description devel | |
77bbdc19 JB |
219 | Header files and development documentation for apr-util. |
220 | ||
61c4246a JR |
221 | %description devel -l pl.UTF-8 |
222 | Pliki nagłówkowe i dokumentacja programisty do apr-util. | |
72a05a99 AM |
223 | |
224 | %package static | |
225 | Summary: Static apr-util library | |
1cdce4f9 | 226 | Summary(pl.UTF-8): Statyczna biblioteka apr-util |
72a05a99 | 227 | Group: Development/Libraries |
77bbdc19 | 228 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
72a05a99 AM |
229 | |
230 | %description static | |
231 | Static apr-util library. | |
232 | ||
61c4246a | 233 | %description static -l pl.UTF-8 |
77bbdc19 JB |
234 | Statyczna biblioteka apr-util. |
235 | ||
72a05a99 | 236 | %prep |
33c0565f | 237 | %setup -q |
90687e98 | 238 | %patch0 -p1 |
2a086b24 | 239 | %patch1 -p1 |
37a3d5ee | 240 | |
b1802398 | 241 | %patch3 -p1 |
d77c67c3 | 242 | |
ad0b28d7 AM |
243 | echo ' |
244 | <Layout PLD> | |
245 | prefix: %{_prefix} | |
246 | exec_prefix: %{_exec_prefix} | |
247 | bindir: %{_bindir} | |
248 | sbindir: %{_sbindir} | |
249 | libdir: %{_libdir} | |
250 | libexecdir: %{_libdir}/apr | |
251 | mandir: %{_mandir} | |
252 | sysconfdir: %{_sysconfdir} | |
253 | datadir: %{_datadir} | |
254 | installbuilddir: %{_datadir}/build | |
255 | includedir: %{_includedir} | |
256 | localstatedir: %{_localstatedir} | |
257 | runtimedir: %{_localstatedir}/run | |
2c9c8118 | 258 | libsuffix: -${APRUTIL_MAJOR_VERSION} |
ad0b28d7 AM |
259 | </Layout> |
260 | ' > config.layout | |
261 | ||
72a05a99 | 262 | %build |
37a3d5ee | 263 | PYTHON=%{__python3} \ |
d94db474 AM |
264 | ./buildconf \ |
265 | --with-apr=%{_datadir}/apr | |
33c0565f | 266 | |
72a05a99 | 267 | %configure \ |
ad0b28d7 | 268 | --enable-layout=PLD \ |
33c0565f | 269 | --with-apr=%{_bindir}/apr-1-config \ |
7e89f5b8 | 270 | --with-berkeley-db=%{_prefix} \ |
b95223bc | 271 | --with-crypto \ |
b1802398 | 272 | --with-dbm=%{dbver} \ |
92c6255c JB |
273 | --with-iconv=%{_prefix} \ |
274 | %if %{with ldap} | |
275 | --with-ldap \ | |
276 | --with-ldap-include=%{_prefix}/include \ | |
277 | --with-ldap-lib=%{_libdir} \ | |
7b70f674 | 278 | %endif |
b95223bc JB |
279 | %{?with_nss:--with-nss} \ |
280 | %{?with_openssl:--with-openssl} \ | |
92c6255c | 281 | %{!?with_freetds:--without-freetds} \ |
dbda5121 | 282 | %{?with_mysql:--with-mysql=%{_prefix}} \ |
48e7a7b5 | 283 | %{!?with_odbc:--without-odbc} \ |
92c6255c | 284 | %{?with_oracle:--with-oracle} \ |
e753ced3 | 285 | %{!?with_pgsql:--without-pgsql} \ |
40238ac3 | 286 | %{!?with_sqlite2:--without-sqlite2} \ |
c31ea3e4 | 287 | %{!?with_sqlite3:--without-sqlite3} |
33c0565f | 288 | |
d77c67c3 ER |
289 | %{__make} \ |
290 | CC="%{__cc}" | |
291 | ||
1f395ae1 AM |
292 | %{?with_tests:%{__make} -j1 check} |
293 | ||
72a05a99 AM |
294 | %install |
295 | rm -rf $RPM_BUILD_ROOT | |
296 | ||
297 | %{__make} install \ | |
298 | DESTDIR=$RPM_BUILD_ROOT | |
48e7a7b5 | 299 | |
f7e14f7d | 300 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a} |
72a05a99 | 301 | |
72a05a99 AM |
302 | %clean |
303 | rm -rf $RPM_BUILD_ROOT | |
304 | ||
77bbdc19 JB |
305 | %post -p /sbin/ldconfig |
306 | %postun -p /sbin/ldconfig | |
307 | ||
72a05a99 AM |
308 | %files |
309 | %defattr(644,root,root,755) | |
92c6255c | 310 | %doc CHANGES NOTICE README |
27418c3e JB |
311 | %attr(755,root,root) %{_libdir}/libaprutil-1.so.*.*.* |
312 | %attr(755,root,root) %ghost %{_libdir}/libaprutil-1.so.0 | |
92c6255c JB |
313 | %dir %{_libdir}/apr-util-1 |
314 | ||
b95223bc JB |
315 | %if %{with nss} |
316 | %files crypto-nss | |
c10367e4 | 317 | %defattr(644,root,root,755) |
b95223bc JB |
318 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_crypto_nss-1.so |
319 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_crypto_nss.so | |
320 | %endif | |
321 | ||
322 | %if %{with openssl} | |
323 | %files crypto-openssl | |
324 | %defattr(644,root,root,755) | |
325 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_crypto_openssl-1.so | |
326 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_crypto_openssl.so | |
327 | %endif | |
c10367e4 | 328 | |
92c6255c JB |
329 | %if %{with freetds} |
330 | %files dbd-freetds | |
331 | %defattr(644,root,root,755) | |
332 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds-1.so | |
333 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds.so | |
334 | %endif | |
40238ac3 | 335 | |
40238ac3 ER |
336 | %if %{with mysql} |
337 | %files dbd-mysql | |
338 | %defattr(644,root,root,755) | |
92c6255c JB |
339 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql-1.so |
340 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql.so | |
341 | %endif | |
342 | ||
58900fcc | 343 | %if %{with odbc} |
48e7a7b5 AG |
344 | %files dbd-odbc |
345 | %defattr(644,root,root,755) | |
346 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc-1.so | |
347 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc.so | |
348 | %endif | |
349 | ||
92c6255c JB |
350 | %if %{with oracle} |
351 | %files dbd-oracle | |
352 | %defattr(644,root,root,755) | |
353 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle-1.so | |
354 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle.so | |
40238ac3 ER |
355 | %endif |
356 | ||
357 | %if %{with pgsql} | |
358 | %files dbd-pgsql | |
359 | %defattr(644,root,root,755) | |
92c6255c JB |
360 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql-1.so |
361 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql.so | |
40238ac3 ER |
362 | %endif |
363 | ||
364 | %if %{with sqlite2} | |
365 | %files dbd-sqlite2 | |
366 | %defattr(644,root,root,755) | |
92c6255c JB |
367 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2-1.so |
368 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2.so | |
40238ac3 ER |
369 | %endif |
370 | ||
371 | %if %{with sqlite3} | |
372 | %files dbd-sqlite3 | |
373 | %defattr(644,root,root,755) | |
92c6255c JB |
374 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3-1.so |
375 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3.so | |
40238ac3 | 376 | %endif |
92c6255c | 377 | |
b95223bc JB |
378 | %files dbm-db |
379 | %defattr(644,root,root,755) | |
380 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db-1.so | |
381 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db.so | |
382 | ||
92c6255c JB |
383 | %if %{with ldap} |
384 | %files ldap | |
385 | %defattr(644,root,root,755) | |
386 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap-1.so | |
387 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap.so | |
40238ac3 | 388 | %endif |
72a05a99 AM |
389 | |
390 | %files devel | |
391 | %defattr(644,root,root,755) | |
27418c3e JB |
392 | %attr(755,root,root) %{_bindir}/apu-1-config |
393 | %attr(755,root,root) %{_libdir}/libaprutil-1.so | |
394 | %{_libdir}/libaprutil-1.la | |
72a05a99 AM |
395 | %{_libdir}/aprutil.exp |
396 | %{_includedir} | |
33c0565f | 397 | %{_pkgconfigdir}/apr-util-1.pc |
72a05a99 AM |
398 | |
399 | %files static | |
400 | %defattr(644,root,root,755) | |
27418c3e | 401 | %{_libdir}/libaprutil-1.a |