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