]>
Commit | Line | Data |
---|---|---|
a7e1e844 | 1 | # |
30276236 | 2 | # Conditional build: |
92c6255c | 3 | %bcond_with freetds # with FreeTDS (sybdb) DBD module (unfinished) |
48e7a7b5 AG |
4 | %bcond_without mysql # without MySQL DBD module |
5 | %bcond_without odbc # without ODBC DBD module | |
92c6255c JB |
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 | |
30276236 | 11 | # |
72a05a99 | 12 | Summary: A companion library to Apache Portable Runtime |
1cdce4f9 | 13 | Summary(pl.UTF-8): Biblioteka towarzysząca Apache Portable Runtime |
72a05a99 | 14 | Name: apr-util |
48e7a7b5 | 15 | Version: 1.3.2 |
92c6255c | 16 | Release: 1 |
72a05a99 | 17 | Epoch: 1 |
30276236 | 18 | License: Apache v2.0 |
72a05a99 | 19 | Group: Libraries |
4078c8d7 | 20 | Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2 |
48e7a7b5 | 21 | # Source0-md5: aa782fb9ced8b59c8e99419d8cdd1981 |
90687e98 | 22 | Patch0: %{name}-link.patch |
92c6255c | 23 | Patch1: %{name}-db47.patch |
7a0ecb3b | 24 | Patch2: %{name}-pg_libs.patch |
72a05a99 | 25 | URL: http://apr.apache.org/ |
92c6255c | 26 | BuildRequires: apr-devel >= 1:1.3.0 |
77bbdc19 | 27 | BuildRequires: autoconf |
ec97abe4 | 28 | %if "%{pld_release}" == "ti" |
7b70f674 | 29 | BuildRequires: db-devel >= 4.5 |
30 | %else | |
92c6255c | 31 | BuildRequires: db-devel >= 4.7 |
7b70f674 | 32 | %endif |
77bbdc19 | 33 | BuildRequires: expat-devel |
92c6255c | 34 | %{?with_freetds:BuildRequires: freetds-devel} |
fed4b95d | 35 | BuildRequires: libtool |
e753ced3 | 36 | %{?with_mysql:BuildRequires: mysql-devel} |
315bdeba | 37 | %{?with_ldap:BuildRequires: openldap-devel >= 2.4.6} |
48e7a7b5 | 38 | %{?with_odbc:BuildRequires: unixODBC-devel} |
e753ced3 | 39 | %{?with_pgsql:BuildRequires: postgresql-devel} |
7b70f674 | 40 | BuildRequires: rpm >= 4.4.9-56 |
40238ac3 | 41 | %{?with_sqlite2:BuildRequires: sqlite-devel >= 2} |
4078c8d7 | 42 | %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3} |
92c6255c | 43 | Requires: apr >= 1:1.3.0 |
72a05a99 AM |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %define _includedir /usr/include/apr-util | |
47 | ||
48 | %description | |
49 | A companion library to Apache Portable Runtime. | |
50 | ||
61c4246a JR |
51 | %description -l pl.UTF-8 |
52 | Biblioteka towarzysząca dla biblioteki Apache Portable Runtime | |
53 | (przenośnej biblioteki uruchomieniowej). | |
77bbdc19 | 54 | |
92c6255c JB |
55 | %package dbd-freetds |
56 | Summary: DBD driver for FreeTDS (Sybase/MS SQL) | |
57 | Summary(pl.UTF-8): Sterownik DBD dla FreeTDS (Sybase/MS SQL) | |
58 | Group: Libraries | |
59 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
60 | ||
61 | %description dbd-freetds | |
62 | DBD driver for FreeTDS (Sybase/MS SQL). | |
63 | ||
64 | %description dbd-freetds -l pl.UTF-8 | |
65 | Sterownik DBD dla FreeTDS (Sybase/MS SQL). | |
66 | ||
40238ac3 ER |
67 | %package dbd-mysql |
68 | Summary: DBD driver for MySQL | |
1cdce4f9 | 69 | Summary(pl.UTF-8): Sterownik DBD dla MySQL-a |
a7e1e844 | 70 | License: GPL |
40238ac3 ER |
71 | Group: Libraries |
72 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
40238ac3 ER |
73 | |
74 | %description dbd-mysql | |
75 | DBD driver for MySQL. | |
76 | ||
61c4246a | 77 | %description dbd-mysql -l pl.UTF-8 |
a7e1e844 JB |
78 | Sterownik DBD dla MySQL-a. |
79 | ||
48e7a7b5 AG |
80 | %package dbd-odbc |
81 | Summary: DBD driver for ODBC | |
82 | Summary(pl.UTF-8): Sterownik DBD dla ODBC | |
83 | License: GPL | |
84 | Group: Libraries | |
85 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
86 | ||
87 | %description dbd-odbc | |
88 | DBD driver for ODBC. | |
89 | ||
90 | %description dbd-odbc -l pl.UTF-8 | |
91 | Sterownik DBD dla ODBC. | |
92 | ||
92c6255c JB |
93 | %package dbd-oracle |
94 | Summary: DBD driver for Oracle | |
95 | Summary(pl.UTF-8): Sterownik DBD dla Oracle'a | |
96 | Group: Libraries | |
97 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
98 | ||
99 | %description dbd-oracle | |
100 | DBD driver for Oracle. | |
101 | ||
102 | %description dbd-oracle -l pl.UTF-8 | |
103 | Sterownik DBD dla Oracle'a. | |
104 | ||
40238ac3 ER |
105 | %package dbd-pgsql |
106 | Summary: DBD driver for PostgreSQL | |
1cdce4f9 | 107 | Summary(pl.UTF-8): Sterownik DBD dla PostgreSQL-a |
40238ac3 ER |
108 | Group: Libraries |
109 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
110 | ||
111 | %description dbd-pgsql | |
112 | DBD driver for PostgreSQL. | |
113 | ||
61c4246a | 114 | %description dbd-pgsql -l pl.UTF-8 |
a7e1e844 JB |
115 | Sterownik DBD dla PostgreSQL-a. |
116 | ||
40238ac3 ER |
117 | %package dbd-sqlite2 |
118 | Summary: DBD driver for SQLite 2 | |
1cdce4f9 | 119 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 2 |
40238ac3 ER |
120 | Group: Libraries |
121 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
122 | ||
123 | %description dbd-sqlite2 | |
a7e1e844 JB |
124 | DBD driver for SQLite 2. |
125 | ||
61c4246a | 126 | %description dbd-sqlite2 -l pl.UTF-8 |
a7e1e844 | 127 | Sterownik DBD dla SQLite 2. |
40238ac3 ER |
128 | |
129 | %package dbd-sqlite3 | |
130 | Summary: DBD driver for SQLite 3 | |
1cdce4f9 | 131 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 3 |
40238ac3 ER |
132 | Group: Libraries |
133 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
134 | ||
135 | %description dbd-sqlite3 | |
a7e1e844 JB |
136 | DBD driver for SQLite 3. |
137 | ||
61c4246a | 138 | %description dbd-sqlite3 -l pl.UTF-8 |
a7e1e844 | 139 | Sterownik DBD dla SQLite 3. |
40238ac3 | 140 | |
92c6255c JB |
141 | %package ldap |
142 | Summary: APR LDAP driver | |
143 | Summary(pl.UTF-8): Sterownik APR dla LDAP | |
144 | Group: Libraries | |
145 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
146 | ||
147 | %description ldap | |
148 | APR LDAP driver. | |
149 | ||
150 | %description ldap -l pl.UTF-8 | |
151 | Sterownik APR dla LDAP. | |
152 | ||
72a05a99 | 153 | %package devel |
77bbdc19 | 154 | Summary: Header files and development documentation for apr-util |
1cdce4f9 | 155 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty do apr-util |
72a05a99 | 156 | Group: Development/Libraries |
77bbdc19 | 157 | Requires: %{name} = %{epoch}:%{version}-%{release} |
92c6255c | 158 | Requires: apr-devel >= 1:1.3.0 |
93be47f8 JB |
159 | Requires: db-devel |
160 | Requires: expat-devel | |
72a05a99 AM |
161 | |
162 | %description devel | |
77bbdc19 JB |
163 | Header files and development documentation for apr-util. |
164 | ||
61c4246a JR |
165 | %description devel -l pl.UTF-8 |
166 | Pliki nagłówkowe i dokumentacja programisty do apr-util. | |
72a05a99 AM |
167 | |
168 | %package static | |
169 | Summary: Static apr-util library | |
1cdce4f9 | 170 | Summary(pl.UTF-8): Statyczna biblioteka apr-util |
72a05a99 | 171 | Group: Development/Libraries |
77bbdc19 | 172 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
72a05a99 AM |
173 | |
174 | %description static | |
175 | Static apr-util library. | |
176 | ||
61c4246a | 177 | %description static -l pl.UTF-8 |
77bbdc19 JB |
178 | Statyczna biblioteka apr-util. |
179 | ||
72a05a99 | 180 | %prep |
33c0565f | 181 | %setup -q |
90687e98 | 182 | %patch0 -p1 |
2a086b24 | 183 | %patch1 -p1 |
7a0ecb3b | 184 | %patch2 -p1 |
d77c67c3 ER |
185 | |
186 | rm -rf xml/expat | |
ce5f5d28 | 187 | |
ad0b28d7 AM |
188 | echo ' |
189 | <Layout PLD> | |
190 | prefix: %{_prefix} | |
191 | exec_prefix: %{_exec_prefix} | |
192 | bindir: %{_bindir} | |
193 | sbindir: %{_sbindir} | |
194 | libdir: %{_libdir} | |
195 | libexecdir: %{_libdir}/apr | |
196 | mandir: %{_mandir} | |
197 | sysconfdir: %{_sysconfdir} | |
198 | datadir: %{_datadir} | |
199 | installbuilddir: %{_datadir}/build | |
200 | includedir: %{_includedir} | |
201 | localstatedir: %{_localstatedir} | |
202 | runtimedir: %{_localstatedir}/run | |
2c9c8118 | 203 | libsuffix: -${APRUTIL_MAJOR_VERSION} |
ad0b28d7 AM |
204 | </Layout> |
205 | ' > config.layout | |
206 | ||
72a05a99 | 207 | %build |
d94db474 AM |
208 | ./buildconf \ |
209 | --with-apr=%{_datadir}/apr | |
33c0565f | 210 | |
72a05a99 | 211 | %configure \ |
ad0b28d7 | 212 | --enable-layout=PLD \ |
33c0565f | 213 | --with-apr=%{_bindir}/apr-1-config \ |
7e89f5b8 | 214 | --with-berkeley-db=%{_prefix} \ |
ec97abe4 | 215 | %if "%{pld_release}" == "ti" |
7b70f674 | 216 | --with-dbm=db45 \ |
217 | %else | |
92c6255c JB |
218 | --with-dbm=db47 \ |
219 | %endif | |
220 | --with-iconv=%{_prefix} \ | |
221 | %if %{with ldap} | |
222 | --with-ldap \ | |
223 | --with-ldap-include=%{_prefix}/include \ | |
224 | --with-ldap-lib=%{_libdir} \ | |
7b70f674 | 225 | %endif |
92c6255c | 226 | %{!?with_freetds:--without-freetds} \ |
dbda5121 | 227 | %{?with_mysql:--with-mysql=%{_prefix}} \ |
48e7a7b5 | 228 | %{!?with_odbc:--without-odbc} \ |
92c6255c | 229 | %{?with_oracle:--with-oracle} \ |
e753ced3 | 230 | %{!?with_pgsql:--without-pgsql} \ |
40238ac3 | 231 | %{!?with_sqlite2:--without-sqlite2} \ |
c31ea3e4 | 232 | %{!?with_sqlite3:--without-sqlite3} |
33c0565f | 233 | |
d77c67c3 ER |
234 | %{__make} \ |
235 | CC="%{__cc}" | |
236 | ||
72a05a99 AM |
237 | %install |
238 | rm -rf $RPM_BUILD_ROOT | |
239 | ||
240 | %{__make} install \ | |
241 | DESTDIR=$RPM_BUILD_ROOT | |
48e7a7b5 | 242 | |
92c6255c | 243 | rm $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a} |
72a05a99 | 244 | |
72a05a99 AM |
245 | %clean |
246 | rm -rf $RPM_BUILD_ROOT | |
247 | ||
77bbdc19 JB |
248 | %post -p /sbin/ldconfig |
249 | %postun -p /sbin/ldconfig | |
250 | ||
72a05a99 AM |
251 | %files |
252 | %defattr(644,root,root,755) | |
92c6255c | 253 | %doc CHANGES NOTICE README |
27418c3e JB |
254 | %attr(755,root,root) %{_libdir}/libaprutil-1.so.*.*.* |
255 | %attr(755,root,root) %ghost %{_libdir}/libaprutil-1.so.0 | |
92c6255c JB |
256 | %dir %{_libdir}/apr-util-1 |
257 | ||
258 | %if %{with freetds} | |
259 | %files dbd-freetds | |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds-1.so | |
262 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_freetds.so | |
263 | %endif | |
40238ac3 | 264 | |
40238ac3 ER |
265 | %if %{with mysql} |
266 | %files dbd-mysql | |
267 | %defattr(644,root,root,755) | |
27418c3e | 268 | %doc README.MySQL |
92c6255c JB |
269 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql-1.so |
270 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql.so | |
271 | %endif | |
272 | ||
58900fcc | 273 | %if %{with odbc} |
48e7a7b5 AG |
274 | %files dbd-odbc |
275 | %defattr(644,root,root,755) | |
276 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc-1.so | |
277 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_odbc.so | |
278 | %endif | |
279 | ||
92c6255c JB |
280 | %if %{with oracle} |
281 | %files dbd-oracle | |
282 | %defattr(644,root,root,755) | |
283 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle-1.so | |
284 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_oracle.so | |
40238ac3 ER |
285 | %endif |
286 | ||
287 | %if %{with pgsql} | |
288 | %files dbd-pgsql | |
289 | %defattr(644,root,root,755) | |
92c6255c JB |
290 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql-1.so |
291 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_pgsql.so | |
40238ac3 ER |
292 | %endif |
293 | ||
294 | %if %{with sqlite2} | |
295 | %files dbd-sqlite2 | |
296 | %defattr(644,root,root,755) | |
92c6255c JB |
297 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2-1.so |
298 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite2.so | |
40238ac3 ER |
299 | %endif |
300 | ||
301 | %if %{with sqlite3} | |
302 | %files dbd-sqlite3 | |
303 | %defattr(644,root,root,755) | |
92c6255c JB |
304 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3-1.so |
305 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3.so | |
40238ac3 | 306 | %endif |
92c6255c JB |
307 | |
308 | %if %{with ldap} | |
309 | %files ldap | |
310 | %defattr(644,root,root,755) | |
311 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap-1.so | |
312 | %attr(755,root,root) %{_libdir}/apr-util-1/apr_ldap.so | |
40238ac3 | 313 | %endif |
72a05a99 AM |
314 | |
315 | %files devel | |
316 | %defattr(644,root,root,755) | |
27418c3e JB |
317 | %attr(755,root,root) %{_bindir}/apu-1-config |
318 | %attr(755,root,root) %{_libdir}/libaprutil-1.so | |
319 | %{_libdir}/libaprutil-1.la | |
72a05a99 AM |
320 | %{_libdir}/aprutil.exp |
321 | %{_includedir} | |
33c0565f | 322 | %{_pkgconfigdir}/apr-util-1.pc |
72a05a99 AM |
323 | |
324 | %files static | |
325 | %defattr(644,root,root,755) | |
27418c3e | 326 | %{_libdir}/libaprutil-1.a |