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