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