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