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