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