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