]>
Commit | Line | Data |
---|---|---|
a7e1e844 | 1 | # |
30276236 | 2 | # Conditional build: |
77bbdc19 | 3 | %bcond_without ldap # without LDAP support |
40238ac3 | 4 | %bcond_without mysql # with MySQL support |
e753ced3 | 5 | %bcond_without pgsql # without PostgreSQL support |
40238ac3 | 6 | %bcond_with sqlite2 # with SQLite 2.x support |
4078c8d7 | 7 | %bcond_without sqlite3 # without SQLite3 support |
40238ac3 | 8 | %bcond_without dso # experimental dso linking |
30276236 | 9 | # |
72a05a99 | 10 | Summary: A companion library to Apache Portable Runtime |
61c4246a | 11 | Summary(pl.UTF-8): Biblioteka towarzysząca Apache Portable Runtime |
72a05a99 | 12 | Name: apr-util |
2a086b24 | 13 | Version: 1.2.8 |
fe512b62 | 14 | Release: 3 |
72a05a99 | 15 | Epoch: 1 |
30276236 | 16 | License: Apache v2.0 |
72a05a99 | 17 | Group: Libraries |
4078c8d7 | 18 | Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2 |
2a086b24 | 19 | # Source0-md5: b122f35ee6883a216cd2e7d44504521e |
1b65e97d | 20 | # http://apache.webthing.com/database/apr_dbd_mysql.c |
8252e05f | 21 | Source1: apr_dbd_mysql.c |
90687e98 | 22 | Patch0: %{name}-link.patch |
2a086b24 JB |
23 | Patch1: %{name}-dso.patch |
24 | Patch2: %{name}-dbd.patch | |
25 | Patch3: %{name}-db45.patch | |
fe512b62 | 26 | Patch4: %{name}-mysql-link.patch |
72a05a99 | 27 | URL: http://apr.apache.org/ |
ce5f5d28 | 28 | BuildRequires: apr-devel >= 1:1.1.0 |
d77c67c3 | 29 | %{?with_mysql:BuildRequires: apr-devel >= 1:1.2.2-2.6} |
77bbdc19 | 30 | BuildRequires: autoconf |
c9a8138c | 31 | BuildRequires: db-devel >= 4.5 |
77bbdc19 | 32 | BuildRequires: expat-devel |
72a05a99 | 33 | BuildRequires: gdbm-devel |
fed4b95d | 34 | BuildRequires: libtool |
e753ced3 | 35 | %{?with_mysql:BuildRequires: mysql-devel} |
9a186868 | 36 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} |
e753ced3 | 37 | %{?with_pgsql:BuildRequires: postgresql-devel} |
d77c67c3 | 38 | BuildRequires: sed >= 4.0 |
40238ac3 | 39 | %{?with_sqlite2:BuildRequires: sqlite-devel >= 2} |
4078c8d7 | 40 | %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3} |
ce5f5d28 | 41 | Requires: apr >= 1:1.1.0 |
72a05a99 AM |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | %define _includedir /usr/include/apr-util | |
45 | ||
46 | %description | |
47 | A companion library to Apache Portable Runtime. | |
48 | ||
61c4246a JR |
49 | %description -l pl.UTF-8 |
50 | Biblioteka towarzysząca dla biblioteki Apache Portable Runtime | |
51 | (przenośnej biblioteki uruchomieniowej). | |
77bbdc19 | 52 | |
40238ac3 ER |
53 | %package dbd-mysql |
54 | Summary: DBD driver for MySQL | |
61c4246a | 55 | Summary(pl.UTF-8): Sterownik DBD dla MySQL-a |
a7e1e844 | 56 | License: GPL |
40238ac3 ER |
57 | Group: Libraries |
58 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
40238ac3 ER |
59 | |
60 | %description dbd-mysql | |
61 | DBD driver for MySQL. | |
62 | ||
61c4246a | 63 | %description dbd-mysql -l pl.UTF-8 |
a7e1e844 JB |
64 | Sterownik DBD dla MySQL-a. |
65 | ||
40238ac3 ER |
66 | %package dbd-pgsql |
67 | Summary: DBD driver for PostgreSQL | |
61c4246a | 68 | Summary(pl.UTF-8): Sterownik DBD dla PostgreSQL-a |
40238ac3 ER |
69 | Group: Libraries |
70 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
71 | ||
72 | %description dbd-pgsql | |
73 | DBD driver for PostgreSQL. | |
74 | ||
61c4246a | 75 | %description dbd-pgsql -l pl.UTF-8 |
a7e1e844 JB |
76 | Sterownik DBD dla PostgreSQL-a. |
77 | ||
40238ac3 ER |
78 | %package dbd-sqlite2 |
79 | Summary: DBD driver for SQLite 2 | |
61c4246a | 80 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 2 |
40238ac3 ER |
81 | Group: Libraries |
82 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
83 | ||
84 | %description dbd-sqlite2 | |
a7e1e844 JB |
85 | DBD driver for SQLite 2. |
86 | ||
61c4246a | 87 | %description dbd-sqlite2 -l pl.UTF-8 |
a7e1e844 | 88 | Sterownik DBD dla SQLite 2. |
40238ac3 ER |
89 | |
90 | %package dbd-sqlite3 | |
91 | Summary: DBD driver for SQLite 3 | |
61c4246a | 92 | Summary(pl.UTF-8): Sterownik DBD dla SQLite 3 |
40238ac3 ER |
93 | Group: Libraries |
94 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
95 | ||
96 | %description dbd-sqlite3 | |
a7e1e844 JB |
97 | DBD driver for SQLite 3. |
98 | ||
61c4246a | 99 | %description dbd-sqlite3 -l pl.UTF-8 |
a7e1e844 | 100 | Sterownik DBD dla SQLite 3. |
40238ac3 | 101 | |
72a05a99 | 102 | %package devel |
77bbdc19 | 103 | Summary: Header files and development documentation for apr-util |
61c4246a | 104 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty do apr-util |
72a05a99 | 105 | Group: Development/Libraries |
77bbdc19 | 106 | Requires: %{name} = %{epoch}:%{version}-%{release} |
ce5f5d28 | 107 | Requires: apr-devel >= 1:1.1.0 |
93be47f8 JB |
108 | Requires: db-devel |
109 | Requires: expat-devel | |
2b1c1223 | 110 | Requires: gdbm-devel |
9a186868 | 111 | %{?with_ldap:Requires: openldap-devel >= 2.3.0} |
72a05a99 AM |
112 | |
113 | %description devel | |
77bbdc19 JB |
114 | Header files and development documentation for apr-util. |
115 | ||
61c4246a JR |
116 | %description devel -l pl.UTF-8 |
117 | Pliki nagłówkowe i dokumentacja programisty do apr-util. | |
72a05a99 AM |
118 | |
119 | %package static | |
120 | Summary: Static apr-util library | |
61c4246a | 121 | Summary(pl.UTF-8): Statyczna biblioteka apr-util |
72a05a99 | 122 | Group: Development/Libraries |
77bbdc19 | 123 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
72a05a99 AM |
124 | |
125 | %description static | |
126 | Static apr-util library. | |
127 | ||
61c4246a | 128 | %description static -l pl.UTF-8 |
77bbdc19 JB |
129 | Statyczna biblioteka apr-util. |
130 | ||
72a05a99 | 131 | %prep |
33c0565f | 132 | %setup -q |
90687e98 | 133 | %patch0 -p1 |
dbda5121 ER |
134 | %if %{with mysql} |
135 | cp %{SOURCE1} dbd/apr_dbd_mysql.c | |
136 | %else | |
137 | # not needed, gen-build.py is not packaged in apr-util | |
d77c67c3 ER |
138 | # (and it shouldn't: apr-devel should have it -glen) |
139 | %{__sed} -i -e 's/^\(.*gen-build\.py\)/#\1/' buildconf | |
dbda5121 | 140 | %endif |
6902bf4c | 141 | %if %{with dso} |
2a086b24 | 142 | %patch1 -p1 |
7f8ead4d | 143 | %patch2 -p1 |
6902bf4c | 144 | %endif |
2a086b24 | 145 | %patch3 -p1 |
fe512b62 | 146 | %patch4 -p1 |
d77c67c3 ER |
147 | |
148 | rm -rf xml/expat | |
ce5f5d28 | 149 | |
ad0b28d7 AM |
150 | echo ' |
151 | <Layout PLD> | |
152 | prefix: %{_prefix} | |
153 | exec_prefix: %{_exec_prefix} | |
154 | bindir: %{_bindir} | |
155 | sbindir: %{_sbindir} | |
156 | libdir: %{_libdir} | |
157 | libexecdir: %{_libdir}/apr | |
158 | mandir: %{_mandir} | |
159 | sysconfdir: %{_sysconfdir} | |
160 | datadir: %{_datadir} | |
161 | installbuilddir: %{_datadir}/build | |
162 | includedir: %{_includedir} | |
163 | localstatedir: %{_localstatedir} | |
164 | runtimedir: %{_localstatedir}/run | |
2c9c8118 | 165 | libsuffix: -${APRUTIL_MAJOR_VERSION} |
ad0b28d7 AM |
166 | </Layout> |
167 | ' > config.layout | |
168 | ||
72a05a99 | 169 | %build |
d94db474 AM |
170 | ./buildconf \ |
171 | --with-apr=%{_datadir}/apr | |
b77b1743 JB |
172 | %if %{with dso} |
173 | %{__sed} -i -e '/OBJECTS_all/s, dbd/apr_dbd_[^ ]*\.lo,,g' build-outputs.mk | |
174 | %endif | |
33c0565f | 175 | |
72a05a99 | 176 | %configure \ |
ad0b28d7 | 177 | --enable-layout=PLD \ |
33c0565f PS |
178 | --with-apr=%{_bindir}/apr-1-config \ |
179 | %if %{with ldap} | |
180 | --with-ldap \ | |
181 | --with-ldap-include=%{_prefix}/include \ | |
182 | --with-ldap-lib=%{_libdir} \ | |
183 | %endif | |
c31ea3e4 | 184 | --with-iconv=%{_prefix} \ |
7e89f5b8 | 185 | --with-berkeley-db=%{_prefix} \ |
c9a8138c | 186 | --with-dbm=db45 \ |
dbda5121 | 187 | %{?with_mysql:--with-mysql=%{_prefix}} \ |
e753ced3 | 188 | %{!?with_pgsql:--without-pgsql} \ |
40238ac3 | 189 | %{!?with_sqlite2:--without-sqlite2} \ |
c31ea3e4 | 190 | %{!?with_sqlite3:--without-sqlite3} |
33c0565f | 191 | |
d77c67c3 ER |
192 | %{__make} \ |
193 | CC="%{__cc}" | |
194 | ||
195 | %if %{with dso} | |
d77c67c3 | 196 | %if %{with mysql} |
b77b1743 | 197 | %{__make} dbd/apr_dbd_mysql.lo |
d77c67c3 ER |
198 | libtool --mode=link --tag=CC %{__cc} -rpath %{_libdir} -avoid-version dbd/apr_dbd_mysql.lo -lmysqlclient_r -o dbd/libapr_dbd_mysql.la |
199 | %endif | |
200 | %if %{with pgsql} | |
b77b1743 | 201 | %{__make} dbd/apr_dbd_pgsql.lo |
d77c67c3 ER |
202 | libtool --mode=link --tag=CC %{__cc} -rpath %{_libdir} -avoid-version dbd/apr_dbd_pgsql.lo -lpq -o dbd/libapr_dbd_pgsql.la |
203 | %endif | |
40238ac3 | 204 | %if %{with sqlite2} |
b77b1743 | 205 | %{__make} dbd/apr_dbd_sqlite2.lo |
40238ac3 ER |
206 | libtool --mode=link --tag=CC %{__cc} -rpath %{_libdir} -avoid-version dbd/apr_dbd_sqlite2.lo -o dbd/libapr_dbd_sqlite2.la |
207 | %endif | |
d77c67c3 | 208 | %if %{with sqlite3} |
b77b1743 | 209 | %{__make} dbd/apr_dbd_sqlite3.lo |
d77c67c3 ER |
210 | libtool --mode=link --tag=CC %{__cc} -rpath %{_libdir} -avoid-version dbd/apr_dbd_sqlite3.lo -lsqlite3 -o dbd/libapr_dbd_sqlite3.la |
211 | %endif | |
d77c67c3 | 212 | %endif |
72a05a99 AM |
213 | |
214 | %install | |
215 | rm -rf $RPM_BUILD_ROOT | |
216 | ||
217 | %{__make} install \ | |
218 | DESTDIR=$RPM_BUILD_ROOT | |
d77c67c3 ER |
219 | |
220 | %if %{with dso} | |
ad0b28d7 | 221 | install -d $RPM_BUILD_ROOT%{_libdir} |
d77c67c3 ER |
222 | %if %{with mysql} |
223 | libtool --mode=install /usr/bin/install -c -m 755 dbd/libapr_dbd_mysql.la $RPM_BUILD_ROOT%{_libdir} | |
224 | mv $RPM_BUILD_ROOT%{_libdir}/{lib,}apr_dbd_mysql.so | |
225 | %endif | |
226 | %if %{with pgsql} | |
227 | libtool --mode=install /usr/bin/install -c -m 755 dbd/libapr_dbd_pgsql.la $RPM_BUILD_ROOT%{_libdir} | |
228 | mv $RPM_BUILD_ROOT%{_libdir}/{lib,}apr_dbd_pgsql.so | |
229 | %endif | |
40238ac3 ER |
230 | %if %{with sqlite2} |
231 | libtool --mode=install /usr/bin/install -c -m 755 dbd/libapr_dbd_sqlite2.la $RPM_BUILD_ROOT%{_libdir} | |
232 | mv $RPM_BUILD_ROOT%{_libdir}/{lib,}apr_dbd_sqlite2.so | |
233 | %endif | |
d77c67c3 ER |
234 | %if %{with sqlite3} |
235 | libtool --mode=install /usr/bin/install -c -m 755 dbd/libapr_dbd_sqlite3.la $RPM_BUILD_ROOT%{_libdir} | |
236 | mv $RPM_BUILD_ROOT%{_libdir}/{lib,}apr_dbd_sqlite3.so | |
237 | %endif | |
1b65e97d | 238 | rm -f $RPM_BUILD_ROOT%{_libdir}/libapr_dbd_*.la |
d77c67c3 | 239 | %endif |
72a05a99 | 240 | |
72a05a99 AM |
241 | %clean |
242 | rm -rf $RPM_BUILD_ROOT | |
243 | ||
77bbdc19 JB |
244 | %post -p /sbin/ldconfig |
245 | %postun -p /sbin/ldconfig | |
246 | ||
72a05a99 AM |
247 | %files |
248 | %defattr(644,root,root,755) | |
37a9d4dd | 249 | %doc CHANGES |
72a05a99 | 250 | %attr(755,root,root) %{_libdir}/lib*.so.*.* |
40238ac3 ER |
251 | |
252 | %if %{with dso} | |
253 | %if %{with mysql} | |
254 | %files dbd-mysql | |
255 | %defattr(644,root,root,755) | |
256 | %doc INSTALL.MySQL | |
257 | %attr(755,root,root) %{_libdir}/apr_dbd_mysql.so | |
258 | %endif | |
259 | ||
260 | %if %{with pgsql} | |
261 | %files dbd-pgsql | |
262 | %defattr(644,root,root,755) | |
263 | %attr(755,root,root) %{_libdir}/apr_dbd_pgsql.so | |
264 | %endif | |
265 | ||
266 | %if %{with sqlite2} | |
267 | %files dbd-sqlite2 | |
268 | %defattr(644,root,root,755) | |
269 | %attr(755,root,root) %{_libdir}/apr_dbd_sqlite2.so | |
270 | %endif | |
271 | ||
272 | %if %{with sqlite3} | |
273 | %files dbd-sqlite3 | |
274 | %defattr(644,root,root,755) | |
275 | %attr(755,root,root) %{_libdir}/apr_dbd_sqlite3.so | |
276 | %endif | |
277 | %endif | |
72a05a99 AM |
278 | |
279 | %files devel | |
280 | %defattr(644,root,root,755) | |
281 | %attr(755,root,root) %{_bindir}/* | |
d77c67c3 | 282 | %attr(755,root,root) %{_libdir}/libaprutil*.so |
72a05a99 AM |
283 | %{_libdir}/lib*.la |
284 | %{_libdir}/aprutil.exp | |
285 | %{_includedir} | |
33c0565f | 286 | %{_pkgconfigdir}/apr-util-1.pc |
72a05a99 AM |
287 | |
288 | %files static | |
289 | %defattr(644,root,root,755) | |
290 | %{_libdir}/lib*.a |