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