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