]> git.pld-linux.org Git - packages/apr-util.git/blob - apr-util.spec
- added db patch to allow db4.8 and db5.0; default db version can be changed by dbver...
[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 # define        dbver   db50
13 %if 0%{!?dbver:1}
14 %  if "%{pld_release}" == "ti"
15 %    define     dbver   db45
16 %  else
17 %    if "%{pld_release}" == "th"
18 %      define   dbver   db47
19 %    else
20 %      define   dbver   db4
21 %    endif
22 %  endif
23 %endif
24 #
25 Summary:        A companion library to Apache Portable Runtime
26 Summary(pl.UTF-8):      Biblioteka towarzysząca Apache Portable Runtime
27 Name:           apr-util
28 Version:        1.3.9
29 Release:        3
30 Epoch:          1
31 License:        Apache v2.0
32 Group:          Libraries
33 Source0:        http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
34 # Source0-md5:  29dd557f7bd891fc2bfdffcfa081db59
35 Patch0:         %{name}-link.patch
36 Patch1:         %{name}-config-noldap.patch
37 Patch2:         %{name}-libtool.patch
38 Patch3:         %{name}-db.patch
39 URL:            http://apr.apache.org/
40 BuildRequires:  apr-devel >= 1:1.3.0
41 BuildRequires:  autoconf
42 %if "%{pld_release}" == "ti"
43 BuildRequires:  db-devel >= 4.5
44 %else
45 %if "%{pld_release}" == "th"
46 BuildRequires:  db-devel >= 4.7
47 %else
48 BuildRequires:  db-devel
49 %endif
50 %endif
51 BuildRequires:  expat-devel
52 %{?with_freetds:BuildRequires:  freetds-devel}
53 BuildRequires:  libtool
54 %{?with_mysql:BuildRequires:    mysql-devel}
55 %{?with_ldap:BuildRequires:     openldap-devel >= 2.3.0}
56 %{?with_pgsql:BuildRequires:    postgresql-devel}
57 BuildRequires:  rpm >= 4.4.9-56
58 %{?with_sqlite2:BuildRequires:  sqlite-devel >= 2}
59 %{?with_sqlite3:BuildRequires:  sqlite3-devel >= 3}
60 %{?with_odbc:BuildRequires:     unixODBC-devel}
61 Requires:       apr >= 1:1.3.0
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %define         _includedir     /usr/include/apr-util
65
66 %description
67 A companion library to Apache Portable Runtime.
68
69 %description -l pl.UTF-8
70 Biblioteka towarzysząca dla biblioteki Apache Portable Runtime
71 (przenośnej biblioteki uruchomieniowej).
72
73 %package dbm-db
74 Summary:        DBM driver for DB
75 Summary(pl.UTF-8):      Sterownik DBM dla DB
76 Group:          Libraries
77 Requires:       %{name} = %{epoch}:%{version}-%{release}
78
79 %description dbm-db
80 DBM driver for DB.
81
82 %description dbm-db -l pl.UTF-8
83 Sterownik DBM dla DB.
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 ldap
172 Summary:        APR LDAP driver
173 Summary(pl.UTF-8):      Sterownik APR dla LDAP
174 Group:          Libraries
175 Requires:       %{name} = %{epoch}:%{version}-%{release}
176
177 %description ldap
178 APR LDAP driver.
179
180 %description ldap -l pl.UTF-8
181 Sterownik APR dla LDAP.
182
183 %package devel
184 Summary:        Header files and development documentation for apr-util
185 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumentacja programisty do apr-util
186 Group:          Development/Libraries
187 Requires:       %{name} = %{epoch}:%{version}-%{release}
188 Requires:       apr-devel >= 1:1.3.0
189 Requires:       db-devel
190 Requires:       expat-devel
191
192 %description devel
193 Header files and development documentation for apr-util.
194
195 %description devel -l pl.UTF-8
196 Pliki nagłówkowe i dokumentacja programisty do apr-util.
197
198 %package static
199 Summary:        Static apr-util library
200 Summary(pl.UTF-8):      Statyczna biblioteka apr-util
201 Group:          Development/Libraries
202 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
203
204 %description static
205 Static apr-util library.
206
207 %description static -l pl.UTF-8
208 Statyczna biblioteka apr-util.
209
210 %prep
211 %setup -q
212 %patch0 -p1
213 %patch1 -p1
214 %patch2 -p1
215 %patch3 -p1
216
217 rm -rf xml/expat
218
219 echo '
220 <Layout PLD>
221     prefix:        %{_prefix}
222     exec_prefix:   %{_exec_prefix}
223     bindir:        %{_bindir}
224     sbindir:       %{_sbindir}
225     libdir:        %{_libdir}
226     libexecdir:    %{_libdir}/apr
227     mandir:        %{_mandir}
228     sysconfdir:    %{_sysconfdir}
229     datadir:       %{_datadir}
230     installbuilddir: %{_datadir}/build
231     includedir:    %{_includedir}
232     localstatedir: %{_localstatedir}
233     runtimedir:    %{_localstatedir}/run
234     libsuffix:     -${APRUTIL_MAJOR_VERSION}
235 </Layout>
236 ' > config.layout
237
238 %build
239 ./buildconf \
240         --with-apr=%{_datadir}/apr
241
242 %configure \
243         --enable-layout=PLD \
244         --with-apr=%{_bindir}/apr-1-config \
245         --with-berkeley-db=%{_prefix} \
246         --with-dbm=%{dbver} \
247         --with-iconv=%{_prefix} \
248 %if %{with ldap}
249         --with-ldap \
250         --with-ldap-include=%{_prefix}/include \
251         --with-ldap-lib=%{_libdir} \
252 %endif
253         %{!?with_freetds:--without-freetds} \
254         %{?with_mysql:--with-mysql=%{_prefix}} \
255         %{!?with_odbc:--without-odbc} \
256         %{?with_oracle:--with-oracle} \
257         %{!?with_pgsql:--without-pgsql} \
258         %{!?with_sqlite2:--without-sqlite2} \
259         %{!?with_sqlite3:--without-sqlite3}
260
261 %{__make} \
262         CC="%{__cc}"
263
264 %{?with_tests:%{__make} -j1 check}
265
266 %install
267 rm -rf $RPM_BUILD_ROOT
268
269 %{__make} install \
270         DESTDIR=$RPM_BUILD_ROOT
271
272 rm $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a}
273
274 %clean
275 rm -rf $RPM_BUILD_ROOT
276
277 %post   -p /sbin/ldconfig
278 %postun -p /sbin/ldconfig
279
280 %files
281 %defattr(644,root,root,755)
282 %doc CHANGES NOTICE README
283 %attr(755,root,root) %{_libdir}/libaprutil-1.so.*.*.*
284 %attr(755,root,root) %ghost %{_libdir}/libaprutil-1.so.0
285 %dir %{_libdir}/apr-util-1
286
287 %files dbm-db
288 %defattr(644,root,root,755)
289 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db-1.so
290 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db.so
291
292 %if %{with freetds}
293 %files dbd-freetds
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds-1.so
296 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds.so
297 %endif
298
299 %if %{with mysql}
300 %files dbd-mysql
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql-1.so
303 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql.so
304 %endif
305
306 %if %{with odbc}
307 %files dbd-odbc
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc-1.so
310 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc.so
311 %endif
312
313 %if %{with oracle}
314 %files dbd-oracle
315 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle-1.so
317 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle.so
318 %endif
319
320 %if %{with pgsql}
321 %files dbd-pgsql
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql-1.so
324 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql.so
325 %endif
326
327 %if %{with sqlite2}
328 %files dbd-sqlite2
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2-1.so
331 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2.so
332 %endif
333
334 %if %{with sqlite3}
335 %files dbd-sqlite3
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3-1.so
338 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3.so
339 %endif
340
341 %if %{with ldap}
342 %files ldap
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap-1.so
345 %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap.so
346 %endif
347
348 %files devel
349 %defattr(644,root,root,755)
350 %attr(755,root,root) %{_bindir}/apu-1-config
351 %attr(755,root,root) %{_libdir}/libaprutil-1.so
352 %{_libdir}/libaprutil-1.la
353 %{_libdir}/aprutil.exp
354 %{_includedir}
355 %{_pkgconfigdir}/apr-util-1.pc
356
357 %files static
358 %defattr(644,root,root,755)
359 %{_libdir}/libaprutil-1.a
This page took 0.13772 seconds and 3 git commands to generate.