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