]> git.pld-linux.org Git - packages/apr-util.git/blob - apr-util.spec
- release 2
[packages/apr-util.git] / apr-util.spec
1 #
2 # Conditional build:
3 %bcond_with     freetds # with FreeTDS (sybdb) DBD module (unfinished)
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  tests
12
13 # define        dbver   db50
14 %if 0%{!?dbver:1}
15         %if "%{pld_release}" == "th"
16                 %define dbver   db47
17         %endif
18         %if "%{pld_release}" == "ti"
19                 %define dbver   db45
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.3.12
30 Release:        2
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:  0f671b037ca62751a8a7005578085560
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.3.0
42 BuildRequires:  autoconf >= 2.59
43 %if "%{pld_release}" == "th"
44 BuildRequires:  db-devel >= 4.7
45 %endif
46 %if "%{pld_release}" == "ti"
47 BuildRequires:  db-devel >= 4.5
48 %endif
49 %if "%{pld_release}" == "ac"
50 BuildRequires:  db-devel >= 4.2
51 BuildConflicts: db4.5-devel
52 %endif
53 BuildRequires:  expat-devel
54 %{?with_freetds:BuildRequires:  freetds-devel}
55 BuildRequires:  libtool
56 %{?with_mysql:BuildRequires:    mysql-devel}
57 %{?with_ldap:BuildRequires:     openldap-devel >= 2.3.0}
58 %{?with_pgsql:BuildRequires:    postgresql-devel}
59 BuildRequires:  rpm >= 4.4.9-56
60 %{?with_sqlite2:BuildRequires:  sqlite-devel >= 2}
61 %{?with_sqlite3:BuildRequires:  sqlite3-devel >= 3}
62 %{?with_odbc:BuildRequires:     unixODBC-devel}
63 BuildRequires:  which
64 Requires:       apr >= 1:1.3.0
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 dbm-db
77 Summary:        DBM driver for DB
78 Summary(pl.UTF-8):      Sterownik DBM dla DB
79 Group:          Libraries
80 Requires:       %{name} = %{epoch}:%{version}-%{release}
81
82 %description dbm-db
83 DBM driver for DB.
84
85 %description dbm-db -l pl.UTF-8
86 Sterownik DBM dla DB.
87
88 %package dbd-freetds
89 Summary:        DBD driver for FreeTDS (Sybase/MS SQL)
90 Summary(pl.UTF-8):      Sterownik DBD dla FreeTDS (Sybase/MS SQL)
91 Group:          Libraries
92 Requires:       %{name} = %{epoch}:%{version}-%{release}
93
94 %description dbd-freetds
95 DBD driver for FreeTDS (Sybase/MS SQL).
96
97 %description dbd-freetds -l pl.UTF-8
98 Sterownik DBD dla FreeTDS (Sybase/MS SQL).
99
100 %package dbd-mysql
101 Summary:        DBD driver for MySQL
102 Summary(pl.UTF-8):      Sterownik DBD dla MySQL-a
103 License:        GPL
104 Group:          Libraries
105 Requires:       %{name} = %{epoch}:%{version}-%{release}
106
107 %description dbd-mysql
108 DBD driver for MySQL.
109
110 %description dbd-mysql -l pl.UTF-8
111 Sterownik DBD dla MySQL-a.
112
113 %package dbd-odbc
114 Summary:        DBD driver for ODBC
115 Summary(pl.UTF-8):      Sterownik DBD dla ODBC
116 License:        GPL
117 Group:          Libraries
118 Requires:       %{name} = %{epoch}:%{version}-%{release}
119
120 %description dbd-odbc
121 DBD driver for ODBC.
122
123 %description dbd-odbc -l pl.UTF-8
124 Sterownik DBD dla ODBC.
125
126 %package dbd-oracle
127 Summary:        DBD driver for Oracle
128 Summary(pl.UTF-8):      Sterownik DBD dla Oracle'a
129 Group:          Libraries
130 Requires:       %{name} = %{epoch}:%{version}-%{release}
131
132 %description dbd-oracle
133 DBD driver for Oracle.
134
135 %description dbd-oracle -l pl.UTF-8
136 Sterownik DBD dla Oracle'a.
137
138 %package dbd-pgsql
139 Summary:        DBD driver for PostgreSQL
140 Summary(pl.UTF-8):      Sterownik DBD dla PostgreSQL-a
141 Group:          Libraries
142 Requires:       %{name} = %{epoch}:%{version}-%{release}
143
144 %description dbd-pgsql
145 DBD driver for PostgreSQL.
146
147 %description dbd-pgsql -l pl.UTF-8
148 Sterownik DBD dla PostgreSQL-a.
149
150 %package dbd-sqlite2
151 Summary:        DBD driver for SQLite 2
152 Summary(pl.UTF-8):      Sterownik DBD dla SQLite 2
153 Group:          Libraries
154 Requires:       %{name} = %{epoch}:%{version}-%{release}
155
156 %description dbd-sqlite2
157 DBD driver for SQLite 2.
158
159 %description dbd-sqlite2 -l pl.UTF-8
160 Sterownik DBD dla SQLite 2.
161
162 %package dbd-sqlite3
163 Summary:        DBD driver for SQLite 3
164 Summary(pl.UTF-8):      Sterownik DBD dla SQLite 3
165 Group:          Libraries
166 Requires:       %{name} = %{epoch}:%{version}-%{release}
167
168 %description dbd-sqlite3
169 DBD driver for SQLite 3.
170
171 %description dbd-sqlite3 -l pl.UTF-8
172 Sterownik DBD dla SQLite 3.
173
174 %package ldap
175 Summary:        APR LDAP driver
176 Summary(pl.UTF-8):      Sterownik APR dla LDAP
177 Group:          Libraries
178 Requires:       %{name} = %{epoch}:%{version}-%{release}
179
180 %description ldap
181 APR LDAP driver.
182
183 %description ldap -l pl.UTF-8
184 Sterownik APR dla LDAP.
185
186 %package devel
187 Summary:        Header files and development documentation for apr-util
188 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumentacja programisty do apr-util
189 Group:          Development/Libraries
190 Requires:       %{name} = %{epoch}:%{version}-%{release}
191 Requires:       apr-devel >= 1:1.3.0
192 Requires:       expat-devel
193
194 %description devel
195 Header files and development documentation for apr-util.
196
197 %description devel -l pl.UTF-8
198 Pliki nagłówkowe i dokumentacja programisty do apr-util.
199
200 %package static
201 Summary:        Static apr-util library
202 Summary(pl.UTF-8):      Statyczna biblioteka apr-util
203 Group:          Development/Libraries
204 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
205
206 %description static
207 Static apr-util library.
208
209 %description static -l pl.UTF-8
210 Statyczna biblioteka apr-util.
211
212 %prep
213 %setup -q
214 %patch0 -p1
215 %patch1 -p1
216 %patch2 -p1
217 %patch3 -p1
218
219 # be sure to link with db version requested
220 %{__sed} -i -e 's/db4 db\|db5 db//' build/dbm.m4
221
222 %{__rm} -r xml/expat
223
224 echo '
225 <Layout PLD>
226     prefix:        %{_prefix}
227     exec_prefix:   %{_exec_prefix}
228     bindir:        %{_bindir}
229     sbindir:       %{_sbindir}
230     libdir:        %{_libdir}
231     libexecdir:    %{_libdir}/apr
232     mandir:        %{_mandir}
233     sysconfdir:    %{_sysconfdir}
234     datadir:       %{_datadir}
235     installbuilddir: %{_datadir}/build
236     includedir:    %{_includedir}
237     localstatedir: %{_localstatedir}
238     runtimedir:    %{_localstatedir}/run
239     libsuffix:     -${APRUTIL_MAJOR_VERSION}
240 </Layout>
241 ' > config.layout
242
243 %build
244 ./buildconf \
245         --with-apr=%{_datadir}/apr
246
247 %configure \
248         --enable-layout=PLD \
249         --with-apr=%{_bindir}/apr-1-config \
250         --with-berkeley-db=%{_prefix} \
251         --with-dbm=%{dbver} \
252         --with-iconv=%{_prefix} \
253 %if %{with ldap}
254         --with-ldap \
255         --with-ldap-include=%{_prefix}/include \
256         --with-ldap-lib=%{_libdir} \
257 %endif
258         %{!?with_freetds:--without-freetds} \
259         %{?with_mysql:--with-mysql=%{_prefix}} \
260         %{!?with_odbc:--without-odbc} \
261         %{?with_oracle:--with-oracle} \
262         %{!?with_pgsql:--without-pgsql} \
263         %{!?with_sqlite2:--without-sqlite2} \
264         %{!?with_sqlite3:--without-sqlite3}
265
266 %{__make} \
267         CC="%{__cc}"
268
269 %{?with_tests:%{__make} -j1 check}
270
271 %install
272 rm -rf $RPM_BUILD_ROOT
273
274 %{__make} install \
275         DESTDIR=$RPM_BUILD_ROOT
276
277 %{__rm} $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a}
278
279 %clean
280 rm -rf $RPM_BUILD_ROOT
281
282 %post   -p /sbin/ldconfig
283 %postun -p /sbin/ldconfig
284
285 %files
286 %defattr(644,root,root,755)
287 %doc CHANGES NOTICE README
288 %attr(755,root,root) %{_libdir}/libaprutil-1.so.*.*.*
289 %attr(755,root,root) %ghost %{_libdir}/libaprutil-1.so.0
290 %dir %{_libdir}/apr-util-1
291
292 %files dbm-db
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db-1.so
295 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db.so
296
297 %if %{with freetds}
298 %files dbd-freetds
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds-1.so
301 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds.so
302 %endif
303
304 %if %{with mysql}
305 %files dbd-mysql
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql-1.so
308 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql.so
309 %endif
310
311 %if %{with odbc}
312 %files dbd-odbc
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc-1.so
315 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc.so
316 %endif
317
318 %if %{with oracle}
319 %files dbd-oracle
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle-1.so
322 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle.so
323 %endif
324
325 %if %{with pgsql}
326 %files dbd-pgsql
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql-1.so
329 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql.so
330 %endif
331
332 %if %{with sqlite2}
333 %files dbd-sqlite2
334 %defattr(644,root,root,755)
335 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2-1.so
336 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2.so
337 %endif
338
339 %if %{with sqlite3}
340 %files dbd-sqlite3
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3-1.so
343 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3.so
344 %endif
345
346 %if %{with ldap}
347 %files ldap
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap-1.so
350 %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap.so
351 %endif
352
353 %files devel
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_bindir}/apu-1-config
356 %attr(755,root,root) %{_libdir}/libaprutil-1.so
357 %{_libdir}/libaprutil-1.la
358 %{_libdir}/aprutil.exp
359 %{_includedir}
360 %{_pkgconfigdir}/apr-util-1.pc
361
362 %files static
363 %defattr(644,root,root,755)
364 %{_libdir}/libaprutil-1.a
This page took 0.066932 seconds and 3 git commands to generate.