]>
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} | |
39669db7 | 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 | |
b1802398 | 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 |
d12a4eaf | 28 | Version: 1.3.10 |
36548bad | 29 | Release: 2 |
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 |
d12a4eaf | 34 | # Source0-md5: 6a6f501a1b2a45166b8ffd6df29204bb |
90687e98 | 35 | Patch0: %{name}-link.patch |
155bafb5 | 36 | Patch1: %{name}-config-noldap.patch |
16929f4d | 37 | Patch2: %{name}-libtool.patch |
d12a4eaf | 38 | Patch3: %{name}-flags.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} |
ab046b66 | 61 | BuildRequires: which |
92c6255c | 62 | Requires: apr >= 1:1.3.0 |
72a05a99 AM |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
65 | %define _includedir /usr/include/apr-util | |
66 | ||
67 | %description | |
68 | A companion library to Apache Portable Runtime. | |
69 | ||
61c4246a JR |
70 | %description -l pl.UTF-8 |
71 | Biblioteka towarzysząca dla biblioteki Apache Portable Runtime | |
72 | (przenośnej biblioteki uruchomieniowej). | |
77bbdc19 | 73 | |
c10367e4 AM |
74 | %package dbm-db |
75 | Summary: DBM driver for DB | |
76 | Summary(pl.UTF-8): Sterownik DBM dla DB | |
77 | Group: Libraries | |
78 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
79 | ||
80 | %description dbm-db | |
81 | DBM driver for DB. | |
82 | ||
83 | %description dbm-db -l pl.UTF-8 | |
84 | Sterownik DBM dla DB. | |
85 | ||
92c6255c JB |
86 | %package dbd-freetds |
87 | Summary: DBD driver for FreeTDS (Sybase/MS SQL) | |
88 | Summary(pl.UTF-8): Sterownik DBD dla FreeTDS (Sybase/MS SQL) | |
89 | Group: Libraries | |
90 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
91 | ||
92 | %description dbd-freetds | |
93 | DBD driver for FreeTDS (Sybase/MS SQL). | |
94 | ||
95 | %description dbd-freetds -l pl.UTF-8 | |
96 | Sterownik DBD dla FreeTDS (Sybase/MS SQL). | |
97 | ||
40238ac3 ER |
98 | %package dbd-mysql |
99 | Summary: DBD driver for MySQL | |
1cdce4f9 | 100 | Summary(pl.UTF-8): Sterownik DBD dla MySQL-a |
a7e1e844 | 101 | License: GPL |
40238ac3 ER |
102 | Group: Libraries |
103 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
40238ac3 ER |
104 | |
105 | %description dbd-mysql | |
106 | DBD driver for MySQL. | |
107 | ||
61c4246a | 108 | %description dbd-mysql -l pl.UTF-8 |
a7e1e844 JB |
109 | Sterownik DBD dla MySQL-a. |
110 | ||
48e7a7b5 AG |
111 | %package dbd-odbc |
112 | Summary: DBD driver for ODBC | |
113 | Summary(pl.UTF-8): Sterownik DBD dla ODBC | |
114 | License: GPL | |
115 | Group: Libraries | |
116 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
117 | ||
118 | %description dbd-odbc | |
119 | DBD driver for ODBC. | |
120 | ||
121 | %description dbd-odbc -l pl.UTF-8 | |
122 | Sterownik DBD dla ODBC. | |
123 | ||
92c6255c JB |
124 | %package dbd-oracle |
125 | Summary: DBD driver for Oracle | |
126 | Summary(pl.UTF-8): Sterownik DBD dla Oracle'a | |
127 | Group: Libraries | |
128 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
129 | ||
130 | %description dbd-oracle | |
131 | DBD driver for Oracle. | |
132 | ||
133 | %description dbd-oracle -l pl.UTF-8 | |
134 | Sterownik DBD dla Oracle'a. | |
135 | ||
40238ac3 ER |
136 | %package dbd-pgsql |
137 | Summary: DBD driver for PostgreSQL | |
1cdce4f9 | 138 | Summary(pl.UTF-8): Sterownik DBD dla PostgreSQL-a |
40238ac3 ER |
139 | Group: Libraries |
140 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
141 | ||
142 | %description dbd-pgsql | |
143 | DBD driver for PostgreSQL. | |
144 | ||
61c4246a | 145 | %description dbd-pgsql -l pl.UTF-8 |
a7e1e844 JB |
146 | Sterownik DBD dla PostgreSQL-a. |
147 | ||
40238ac3 ER |
148 | %package dbd-sqlite2 |
149 | Summary: DBD driver for SQLite 2 | |
1cdce4f9 | 150 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 2 |
40238ac3 ER |
151 | Group: Libraries |
152 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
153 | ||
154 | %description dbd-sqlite2 | |
a7e1e844 JB |
155 | DBD driver for SQLite 2. |
156 | ||
61c4246a | 157 | %description dbd-sqlite2 -l pl.UTF-8 |
a7e1e844 | 158 | Sterownik DBD dla SQLite 2. |
40238ac3 ER |
159 | |
160 | %package dbd-sqlite3 | |
161 | Summary: DBD driver for SQLite 3 | |
1cdce4f9 | 162 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 3 |
40238ac3 ER |
163 | Group: Libraries |
164 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
165 | ||
166 | %description dbd-sqlite3 | |
a7e1e844 JB |
167 | DBD driver for SQLite 3. |
168 | ||
61c4246a | 169 | %description dbd-sqlite3 -l pl.UTF-8 |
a7e1e844 | 170 | Sterownik DBD dla SQLite 3. |
40238ac3 | 171 | |
92c6255c JB |
172 | %package ldap |
173 | Summary: APR LDAP driver | |
174 | Summary(pl.UTF-8): Sterownik APR dla LDAP | |
175 | Group: Libraries | |
176 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
177 | ||
178 | %description ldap | |
179 | APR LDAP driver. | |
180 | ||
181 | %description ldap -l pl.UTF-8 | |
182 | Sterownik APR dla LDAP. | |
183 | ||
72a05a99 | 184 | %package devel |
77bbdc19 | 185 | Summary: Header files and development documentation for apr-util |
1cdce4f9 | 186 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty do apr-util |
72a05a99 | 187 | Group: Development/Libraries |
77bbdc19 | 188 | Requires: %{name} = %{epoch}:%{version}-%{release} |
92c6255c | 189 | Requires: apr-devel >= 1:1.3.0 |
93be47f8 | 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 |