]>
Commit | Line | Data |
---|---|---|
ebd61457 AF |
1 | # |
2 | # Conditional build: | |
e08b8661 | 3 | %bcond_without java # don't build Java bindings |
ebd61457 AF |
4 | %bcond_without tcl # don't build Tcl bindings |
5 | %bcond_without static_libs # don't build static libraries | |
a13cf434 | 6 | %bcond_with default_db # use this db as default system db |
ebd61457 | 7 | |
ebd61457 AF |
8 | |
9 | %define major 5 | |
10 | %define libver %{major}.0 | |
e08b8661 | 11 | %define ver %{libver}.32 |
ebd61457 AF |
12 | %define patchlevel 0 |
13 | Summary: Berkeley DB database library for C | |
14 | Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB | |
15 | Name: db5.0 | |
16 | Version: %{ver}.%{patchlevel} | |
e08b8661 | 17 | Release: 1 |
ebd61457 AF |
18 | License: BSD-like (see LICENSE) |
19 | Group: Libraries | |
e08b8661 | 20 | #Source0Download: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html |
ebd61457 | 21 | Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz |
e08b8661 | 22 | # Source0-md5: b63afbd6ab191d0f19e00927f25d66fe |
e08b8661 | 23 | URL: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html |
ebd61457 AF |
24 | BuildRequires: automake |
25 | %if %{with java} | |
26 | BuildRequires: jdk | |
27 | BuildRequires: rpm-javaprov | |
28 | %endif | |
29 | BuildRequires: libstdc++-devel | |
30 | BuildRequires: rpmbuild(macros) >= 1.426 | |
31 | BuildRequires: sed >= 4.0 | |
32 | %{?with_tcl:BuildRequires: tcl-devel >= 8.4.0} | |
33 | Requires: uname(release) >= 2.6.0 | |
a13cf434 | 34 | %if %{with default_db} |
ebd61457 | 35 | Provides: db = %{version}-%{release} |
a13cf434 | 36 | Provides: db = %{libver} |
ebd61457 | 37 | Obsoletes: db4 |
a13cf434 | 38 | %endif |
ebd61457 AF |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
a13cf434 JB |
41 | %if %{without default_db} |
42 | %define _includedir %{_prefix}/include/db%{libver} | |
43 | %endif | |
44 | ||
ebd61457 AF |
45 | %description |
46 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
47 | provides embedded database support for both traditional and | |
48 | client/server applications. Berkeley DB is used by many applications, | |
49 | including Python and Perl, so this should be installed on all systems. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
53 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
54 | klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w | |
55 | Pythonie i Perlu. | |
56 | ||
57 | %package devel | |
58 | Summary: Header files for Berkeley database library | |
59 | Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database | |
60 | Group: Development/Libraries | |
472cec60 | 61 | Requires: %{name} = %{version}-%{release} |
a13cf434 | 62 | %if %{with default_db} |
ebd61457 AF |
63 | Provides: db-devel = %{version}-%{release} |
64 | Obsoletes: db-devel | |
65 | Obsoletes: db3-devel | |
66 | Obsoletes: db4-devel | |
a13cf434 | 67 | %endif |
ebd61457 AF |
68 | |
69 | %description devel | |
70 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
71 | provides embedded database support for both traditional and | |
72 | client/server applications. Berkeley DB includes B+tree, Extended | |
73 | Linear Hashing, Fixed and Variable-length record access methods, | |
74 | transactions, locking, logging, shared memory caching and database | |
75 | recovery. DB supports C, C++, Java and Perl APIs. | |
76 | ||
77 | This package contains the header files, libraries, and documentation | |
78 | for building programs which use Berkeley DB. | |
79 | ||
80 | %description devel -l pl.UTF-8 | |
81 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
82 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
83 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
84 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
85 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
86 | dla C, C++, Javy i Perla. | |
87 | ||
88 | Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania | |
89 | programów używających Berkeley DB. | |
90 | ||
91 | %package static | |
92 | Summary: Static libraries for Berkeley database library | |
93 | Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database | |
94 | Group: Development/Libraries | |
472cec60 | 95 | Requires: %{name}-devel = %{version}-%{release} |
a13cf434 | 96 | %if %{with default_db} |
ebd61457 AF |
97 | Provides: db-static = %{version}-%{release} |
98 | Obsoletes: db-static | |
99 | Obsoletes: db3-static | |
100 | Obsoletes: db4-static | |
a13cf434 | 101 | %endif |
ebd61457 AF |
102 | |
103 | %description static | |
104 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
105 | provides embedded database support for both traditional and | |
106 | client/server applications. Berkeley DB includes B+tree, Extended | |
107 | Linear Hashing, Fixed and Variable-length record access methods, | |
108 | transactions, locking, logging, shared memory caching and database | |
109 | recovery. DB supports C, C++, Java and Perl APIs. | |
110 | ||
111 | This package contains the static libraries for building programs which | |
112 | use Berkeley DB. | |
113 | ||
114 | %description static -l pl.UTF-8 | |
115 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
116 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
117 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
118 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
119 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
120 | dla C, C++, Javy i Perla. | |
121 | ||
122 | Ten pakiet zawiera statyczne biblioteki do budowania programów | |
123 | używających Berkeley DB. | |
124 | ||
125 | %package cxx | |
126 | Summary: Berkeley database library for C++ | |
127 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++ | |
128 | Group: Libraries | |
a13cf434 | 129 | %if %{with default_db} |
ebd61457 AF |
130 | Provides: db-cxx = %{version}-%{release} |
131 | Obsoletes: db4-cxx | |
a13cf434 | 132 | %endif |
ebd61457 AF |
133 | |
134 | %description cxx | |
135 | Berkeley database library for C++. | |
136 | ||
137 | %description cxx -l pl.UTF-8 | |
138 | Biblioteka baz danych Berkeley dla C++. | |
139 | ||
140 | %package cxx-devel | |
141 | Summary: Header files for db-cxx library | |
142 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx | |
143 | Group: Development/Libraries | |
472cec60 JB |
144 | Requires: %{name}-cxx = %{version}-%{release} |
145 | Requires: %{name}-devel = %{version}-%{release} | |
a13cf434 | 146 | %if %{with default_db} |
ebd61457 AF |
147 | Provides: db-cxx-devel = %{version}-%{release} |
148 | Obsoletes: db-cxx-devel | |
a13cf434 | 149 | %endif |
ebd61457 AF |
150 | Conflicts: db-devel < 4.1.25-3 |
151 | ||
152 | %description cxx-devel | |
153 | Header files for db-cxx library. | |
154 | ||
155 | %description cxx-devel -l pl.UTF-8 | |
156 | Pliki nagłówkowe biblioteki db-cxx. | |
157 | ||
158 | %package cxx-static | |
159 | Summary: Static version of db-cxx library | |
160 | Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx | |
161 | Group: Development/Libraries | |
472cec60 | 162 | Requires: %{name}-cxx-devel = %{version}-%{release} |
a13cf434 | 163 | %if %{with default_db} |
ebd61457 AF |
164 | Provides: db-cxx-static = %{version}-%{release} |
165 | Obsoletes: db-cxx-static | |
a13cf434 | 166 | %endif |
ebd61457 AF |
167 | Conflicts: db-static < 4.2.50-1 |
168 | ||
169 | %description cxx-static | |
170 | Static version of db-cxx library. | |
171 | ||
172 | %description cxx-static -l pl.UTF-8 | |
173 | Statyczna wersja biblioteki db-cxx. | |
174 | ||
175 | %package java | |
176 | Summary: Berkeley database library for Java | |
177 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy | |
178 | Group: Libraries | |
179 | Requires: jpackage-utils | |
a13cf434 | 180 | %if %{with default_db} |
ebd61457 | 181 | Provides: db-java = %{version}-%{release} |
ebd61457 | 182 | Obsoletes: db-java |
a13cf434 | 183 | %endif |
ebd61457 AF |
184 | |
185 | %description java | |
186 | Berkeley database library for Java. | |
187 | ||
188 | %description java -l pl.UTF-8 | |
189 | Biblioteka baz danych Berkeley dla Javy. | |
190 | ||
191 | %package java-devel | |
192 | Summary: Development files for db-java library | |
193 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java | |
194 | Group: Development/Languages/Java | |
472cec60 | 195 | Requires: %{name}-java = %{version}-%{release} |
a13cf434 | 196 | %if %{with default_db} |
ebd61457 AF |
197 | Provides: db-java-devel = %{version}-%{release} |
198 | Obsoletes: db-java-devel | |
a13cf434 | 199 | %endif |
ebd61457 AF |
200 | Conflicts: db-devel < 4.1.25-3 |
201 | ||
202 | %description java-devel | |
203 | Development files for db-java library. | |
204 | ||
205 | %description java-devel -l pl.UTF-8 | |
206 | Pliki programistyczne biblioteki db-java. | |
207 | ||
208 | %package tcl | |
209 | Summary: Berkeley database library for Tcl | |
210 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl | |
211 | Group: Development/Languages/Tcl | |
212 | Requires: tcl | |
a13cf434 | 213 | %if %{with default_db} |
ebd61457 AF |
214 | Provides: db-tcl = %{version}-%{release} |
215 | Obsoletes: db4-tcl | |
a13cf434 | 216 | %endif |
ebd61457 AF |
217 | |
218 | %description tcl | |
219 | Berkeley database library for Tcl. | |
220 | ||
221 | %description tcl -l pl.UTF-8 | |
222 | Biblioteka baz danych Berkeley dla Tcl. | |
223 | ||
224 | %package tcl-devel | |
225 | Summary: Development files for db-tcl library | |
226 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl | |
227 | Group: Development/Languages/Tcl | |
472cec60 | 228 | Requires: %{name}-tcl = %{version}-%{release} |
a13cf434 | 229 | %if %{with default_db} |
ebd61457 AF |
230 | Provides: db-tcl-devel = %{version}-%{release} |
231 | Obsoletes: db-tcl-devel | |
a13cf434 | 232 | %endif |
ebd61457 AF |
233 | Conflicts: db-devel < 4.1.25-3 |
234 | ||
235 | %description tcl-devel | |
236 | Development files for db-tcl library. | |
237 | ||
238 | %description tcl-devel -l pl.UTF-8 | |
239 | Pliki programistyczne biblioteki db-tcl. | |
240 | ||
241 | %package sql | |
242 | Summary: SQL layer for Berkeley database library | |
243 | Summary(pl.UTF-8): Wartstwa SQL dla biblioteki baz danych Berkeley | |
244 | Group: Libraries | |
8053e49c | 245 | %if %{with default_db} |
ebd61457 | 246 | Provides: db-sql = %{version}-%{release} |
a13cf434 | 247 | %endif |
ebd61457 AF |
248 | |
249 | %description sql | |
250 | SQL layer for Berkeley database library. | |
251 | ||
252 | %description sql -l pl.UTF-8 | |
253 | Warstwa SQL dla biblioteki baz danych Berkeley. | |
254 | ||
255 | %package sql-devel | |
256 | Summary: Development files for db-sql library | |
257 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-sql | |
258 | Group: Development/Libraries | |
472cec60 | 259 | Requires: %{name}-sql = %{version}-%{release} |
8053e49c | 260 | %if %{with default_db} |
ebd61457 | 261 | Provides: db-sql-devel = %{version}-%{release} |
a13cf434 JB |
262 | Obsoletes: db-sql-devel |
263 | %endif | |
ebd61457 AF |
264 | |
265 | %description sql-devel | |
266 | Development files for db-sql library. | |
267 | ||
472cec60 JB |
268 | %description sql-devel -l pl.UTF-8 |
269 | Pliki programistyczne biblioteki db-sql. | |
270 | ||
ebd61457 | 271 | %package stl |
472cec60 JB |
272 | Summary: STL API for Berkeley Database library |
273 | Summary(pl.UTF-8): API STL dla biblioteki Berkeley Database | |
ebd61457 | 274 | Group: Libraries |
a13cf434 | 275 | %if %{with default_db} |
ebd61457 | 276 | Provides: db-stl = %{version}-%{release} |
a13cf434 | 277 | %endif |
ebd61457 AF |
278 | |
279 | %description stl | |
280 | STL API for Berkeley database library. | |
281 | ||
472cec60 JB |
282 | %description stl -l pl.UTF-8 |
283 | API STL dla biblioteki Berkeley Database. | |
284 | ||
ebd61457 AF |
285 | %package stl-devel |
286 | Summary: Development files for db-stl library | |
287 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-stl | |
288 | Group: Development/Libraries | |
472cec60 | 289 | Requires: %{name}-stl = %{version}-%{release} |
a13cf434 | 290 | %if %{with default_db} |
ebd61457 | 291 | Provides: db-stl-devel = %{version}-%{release} |
736e0083 | 292 | Obsoletes: db-stl-devel |
a13cf434 | 293 | %endif |
ebd61457 AF |
294 | |
295 | %description stl-devel | |
296 | Development files for db-stl library. | |
297 | ||
472cec60 JB |
298 | %description stl-devel -l pl.UTF-8 |
299 | Pliki programistyczne biblioteki db-stl. | |
300 | ||
ebd61457 | 301 | %package sqlite3 |
472cec60 JB |
302 | Summary: Sqlite3 API for Berkeley Database library |
303 | Summary(pl.UTF-8): API Sqlite3 dla biblioteki Berkeley Database | |
ebd61457 | 304 | Group: Libraries |
a13cf434 | 305 | %if %{with default_db} |
ebd61457 | 306 | Provides: db-sqlite3 = %{version}-%{release} |
a13cf434 | 307 | %endif |
ebd61457 AF |
308 | |
309 | %description sqlite3 | |
310 | Sqlite3 API for Berkeley database library. | |
311 | ||
472cec60 JB |
312 | %description sqlite3 -l pl.UTF-8 |
313 | API Sqlite3 dla biblioteki Berkeley Database. | |
314 | ||
ebd61457 AF |
315 | %package sqlite3-devel |
316 | Summary: Development files for db-sqlite3 library | |
317 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-sqlite3 | |
318 | Group: Development/Libraries | |
472cec60 | 319 | Requires: %{name}-sqlite3 = %{version}-%{release} |
a13cf434 | 320 | %if %{with default_db} |
ebd61457 | 321 | Provides: db-sqlite3-devel = %{version}-%{release} |
a13cf434 JB |
322 | Obsoletes: db-sqlite3-devel |
323 | %endif | |
ebd61457 AF |
324 | |
325 | %description sqlite3-devel | |
326 | Development files for db-sqlite3 library. | |
327 | ||
472cec60 JB |
328 | %description sqlite3-devel -l pl.UTF-8 |
329 | Pliki programistyczne biblioteki db-sqlite3. | |
330 | ||
ebd61457 AF |
331 | %package utils |
332 | Summary: Command line tools for managing Berkeley DB databases | |
333 | Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń | |
334 | Group: Applications/Databases | |
472cec60 | 335 | Requires: %{name} = %{version}-%{release} |
652486ad | 336 | Requires: %{name}-sql = %{version}-%{release} |
a13cf434 | 337 | %if %{with default_db} |
ebd61457 AF |
338 | Provides: db-utils = %{version}-%{release} |
339 | Obsoletes: db-utils | |
340 | Obsoletes: db3-utils | |
341 | Obsoletes: db4-utils | |
a13cf434 | 342 | %endif |
ebd61457 AF |
343 | |
344 | %description utils | |
345 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
346 | provides embedded database support for both traditional and | |
347 | client/server applications. Berkeley DB includes B+tree, Extended | |
348 | Linear Hashing, Fixed and Variable-length record access methods, | |
349 | transactions, locking, logging, shared memory caching and database | |
350 | recovery. DB supports C, C++, Java and Perl APIs. | |
351 | ||
352 | This package contains command line tools for managing Berkeley DB | |
353 | databases. | |
354 | ||
355 | %description utils -l pl.UTF-8 | |
356 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
357 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
358 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
359 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
360 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
361 | dla C, C++, Javy i Perla. | |
362 | ||
363 | Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii | |
364 | poleceń. | |
365 | ||
366 | %prep | |
367 | %setup -q -n db-%{ver} | |
ebd61457 AF |
368 | |
369 | %build | |
370 | cp -f /usr/share/automake/config.sub dist | |
371 | ||
372 | JAVACFLAGS="-source 1.5 -target 1.5" | |
373 | export JAVACFLAGS | |
374 | ||
375 | %if %{with static_libs} | |
376 | cp -a build_unix build_unix.static | |
377 | ||
378 | cd build_unix.static | |
379 | ||
380 | CC="%{__cc}" | |
381 | CXX="%{__cxx}" | |
382 | CFLAGS="%{rpmcflags}" | |
383 | CXXFLAGS="%{rpmcflags} -fno-implicit-templates" | |
384 | LDFLAGS="%{rpmcflags} %{rpmldflags}" | |
ebd61457 AF |
385 | export CC CXX CFLAGS CXXFLAGS LDFLAGS |
386 | ||
387 | ../dist/%configure \ | |
ebd61457 AF |
388 | --disable-shared \ |
389 | --enable-static \ | |
e5faf60c JB |
390 | --enable-compat185 \ |
391 | --enable-cxx \ | |
392 | --enable-dbm \ | |
393 | --enable-build_dbm \ | |
394 | --enable-posixmutexes | |
ebd61457 AF |
395 | |
396 | # (temporarily?) disabled because of compilation errors: | |
397 | # --enable-dump185 \ | |
398 | ||
399 | %{__make} library_build | |
400 | cd .. | |
401 | %endif | |
402 | ||
403 | cd build_unix | |
404 | ||
405 | ../dist/%configure \ | |
406 | --prefix=%{_prefix} \ | |
407 | --libdir=%{_libdir} \ | |
e5faf60c JB |
408 | --enable-shared \ |
409 | --disable-static \ | |
ebd61457 | 410 | --enable-compat185 \ |
ebd61457 | 411 | --enable-cxx \ |
e5faf60c JB |
412 | --enable-dbm \ |
413 | --enable-build_dbm \ | |
414 | --enable-posixmutexes \ | |
ebd61457 AF |
415 | --enable-sql \ |
416 | --enable-sql_compat \ | |
417 | --enable-sql_codegen \ | |
e5faf60c | 418 | --enable-stl \ |
ebd61457 | 419 | %{?with_java:--enable-java} \ |
e5faf60c | 420 | %{?with_tcl:--enable-tcl --with-tcl=/usr/lib} |
ebd61457 AF |
421 | |
422 | %{__make} library_build \ | |
423 | TCFLAGS='-I$(builddir) -I%{_includedir}' \ | |
424 | LIBSO_LIBS="\$(LIBS)" \ | |
425 | LIBTSO_LIBS="\$(LIBS) -ltcl" | |
426 | ||
427 | %install | |
428 | rm -rf $RPM_BUILD_ROOT | |
a13cf434 | 429 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}} |
ebd61457 AF |
430 | %if %{with java} |
431 | install -d $RPM_BUILD_ROOT%{_javadir} | |
432 | %endif | |
433 | ||
434 | %if %{with static_libs} | |
435 | %{__make} -C build_unix.static library_install \ | |
e08b8661 | 436 | DESTDIR=$RPM_BUILD_ROOT \ |
a13cf434 JB |
437 | docdir=%{_docdir}/db-%{version}-docs \ |
438 | includedir=%{_includedir} | |
ebd61457 AF |
439 | %endif |
440 | ||
441 | %{__make} -C build_unix library_install \ | |
ebd61457 | 442 | DESTDIR=$RPM_BUILD_ROOT \ |
e08b8661 | 443 | LIB_INSTALL_FILE_LIST="" \ |
a13cf434 JB |
444 | docdir=%{_docdir}/db-%{version}-docs \ |
445 | includedir=%{_includedir} | |
ebd61457 | 446 | |
a13cf434 JB |
447 | %if %{with default_db} |
448 | install -d $RPM_BUILD_ROOT/%{_lib} | |
ebd61457 | 449 | mv $RPM_BUILD_ROOT%{_libdir}/libdb-%{libver}.so $RPM_BUILD_ROOT/%{_lib} |
a13cf434 | 450 | %endif |
ebd61457 AF |
451 | |
452 | cd $RPM_BUILD_ROOT%{_libdir} | |
a13cf434 JB |
453 | %if %{with static_libs} |
454 | mv -f libdb.a libdb-%{libver}.a | |
455 | mv -f libdb_cxx.a libdb_cxx-%{libver}.a | |
456 | %endif | |
457 | %if %{with java} | |
458 | mv -f $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}/db-%{libver}.jar | |
459 | %endif | |
460 | %if %{with default_db} | |
ebd61457 AF |
461 | ln -sf /%{_lib}/libdb-%{libver}.so libdb.so |
462 | ln -sf /%{_lib}/libdb-%{libver}.so libdb-%{libver}.so | |
463 | ln -sf /%{_lib}/libdb-%{libver}.so libndbm.so | |
464 | ln -sf libdb-%{libver}.la libdb.la | |
465 | ln -sf libdb-%{libver}.la libndbm.la | |
a13cf434 JB |
466 | ln -sf libdb_cxx-%{libver}.so libdb_cxx.so |
467 | ln -sf libdb_cxx-%{libver}.la libdb_cxx.la | |
ebd61457 AF |
468 | %if %{with java} |
469 | ln -sf libdb_java-%{libver}.la libdb_java.la | |
bd446caa | 470 | ln -sf db-%{libver}.jar $RPM_BUILD_ROOT%{_javadir}/db.jar |
ebd61457 AF |
471 | %endif |
472 | %if %{with tcl} | |
473 | ln -sf libdb_tcl-%{libver}.so libdb_tcl.so | |
474 | ln -sf libdb_tcl-%{libver}.la libdb_tcl.la | |
475 | %endif | |
ebd61457 | 476 | %if %{with static_libs} |
ebd61457 AF |
477 | ln -sf libdb-%{libver}.a libdb.a |
478 | ln -sf libdb-%{libver}.a libndbm.a | |
ebd61457 AF |
479 | ln -sf libdb_cxx-%{libver}.a libdb_cxx.a |
480 | %endif | |
a13cf434 | 481 | %endif |
ebd61457 AF |
482 | |
483 | sed -i "s/old_library=''/old_library='libdb-%{libver}.a'/" libdb-%{libver}.la | |
484 | sed -i "s/old_library=''/old_library='libdb_cxx-%{libver}.a'/" libdb_cxx-%{libver}.la | |
485 | ||
486 | cd - | |
487 | ||
488 | cd $RPM_BUILD_ROOT%{_bindir} | |
a13cf434 JB |
489 | mv dbsql dbsql-%{libver} |
490 | %{?with_default_db:ln -sf dbsql-%{libver} dbsql} | |
ebd61457 | 491 | for F in db_*; do |
a13cf434 JB |
492 | Fver=$(echo $F|sed 's/db_/db%{libver}_/') |
493 | mv $F $Fver | |
494 | %{?with_default_db:ln -sf $Fver $F} | |
ebd61457 AF |
495 | done |
496 | cd - | |
497 | ||
357713bc | 498 | # this should be done by configure, but is not |
c00dcbb5 | 499 | sed -i -e 's/ifdef HAVE_DBM/if DB_DBM_HSEARCH != 0/' $RPM_BUILD_ROOT%{_includedir}/db.h |
357713bc | 500 | |
ebd61457 AF |
501 | rm -f examples_c*/tags |
502 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version} | |
503 | cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version} | |
504 | ||
505 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version} | |
506 | cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version} | |
507 | ||
508 | %if %{with java} | |
509 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version} | |
510 | cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version} | |
511 | %endif | |
512 | ||
513 | # in %doc | |
e08b8661 | 514 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/{index.html,license/license_db.html} |
ebd61457 AF |
515 | |
516 | # don't have csharp subpackages yet | |
e08b8661 | 517 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/csharp |
ebd61457 AF |
518 | |
519 | %clean | |
520 | rm -rf $RPM_BUILD_ROOT | |
521 | ||
522 | %post -p /sbin/ldconfig | |
523 | %postun -p /sbin/ldconfig | |
524 | ||
525 | %post tcl -p /sbin/ldconfig | |
526 | %postun tcl -p /sbin/ldconfig | |
527 | ||
528 | %post cxx -p /sbin/ldconfig | |
529 | %postun cxx -p /sbin/ldconfig | |
530 | ||
531 | %post sql -p /sbin/ldconfig | |
532 | %postun sql -p /sbin/ldconfig | |
533 | ||
534 | %post stl -p /sbin/ldconfig | |
535 | %postun stl -p /sbin/ldconfig | |
536 | ||
537 | %files | |
538 | %defattr(644,root,root,755) | |
539 | %doc LICENSE README docs/index.html docs/license | |
a13cf434 | 540 | %if %{with default_db} |
ebd61457 | 541 | %attr(755,root,root) /%{_lib}/libdb-%{libver}.so |
a13cf434 JB |
542 | %else |
543 | %attr(755,root,root) %{_libdir}/libdb-%{libver}.so | |
544 | %endif | |
ebd61457 AF |
545 | |
546 | %files devel | |
547 | %defattr(644,root,root,755) | |
548 | %attr(755,root,root) %{_bindir}/db%{libver}_sql_codegen | |
a13cf434 JB |
549 | %{_libdir}/libdb-%{libver}.la |
550 | %if %{with default_db} | |
551 | %attr(755,root,root) %{_bindir}/db_sql_codegen | |
ebd61457 AF |
552 | %attr(755,root,root) %{_libdir}/libdb-%{libver}.so |
553 | %attr(755,root,root) %{_libdir}/libdb-%{major}.so | |
554 | %attr(755,root,root) %{_libdir}/libdb.so | |
555 | %attr(755,root,root) %{_libdir}/libndbm.so | |
ebd61457 AF |
556 | %{_libdir}/libdb.la |
557 | %{_libdir}/libndbm.la | |
a13cf434 JB |
558 | %else |
559 | %dir %{_includedir} | |
560 | %endif | |
ebd61457 AF |
561 | %{_includedir}/db.h |
562 | %{_includedir}/db_185.h | |
563 | %dir %{_docdir}/db-%{version}-docs | |
564 | %dir %{_docdir}/db-%{version}-docs/api_reference | |
565 | %{_docdir}/db-%{version}-docs/api_reference/C | |
566 | %{_docdir}/db-%{version}-docs/articles | |
567 | %dir %{_docdir}/db-%{version}-docs/gsg | |
568 | %{_docdir}/db-%{version}-docs/gsg/C | |
569 | %dir %{_docdir}/db-%{version}-docs/gsg_txn | |
570 | %{_docdir}/db-%{version}-docs/gsg_txn/C | |
571 | %dir %{_docdir}/db-%{version}-docs/gsg_db_rep | |
572 | %{_docdir}/db-%{version}-docs/gsg_db_rep/C | |
573 | %{_docdir}/db-%{version}-docs/installation | |
574 | %{_docdir}/db-%{version}-docs/porting | |
575 | %{_docdir}/db-%{version}-docs/programmer_reference | |
576 | %{_examplesdir}/db-%{version} | |
577 | ||
578 | %if %{with static_libs} | |
579 | %files static | |
580 | %defattr(644,root,root,755) | |
581 | %{_libdir}/libdb-%{libver}.a | |
a13cf434 | 582 | %if %{with default_db} |
ebd61457 AF |
583 | %{_libdir}/libdb.a |
584 | %{_libdir}/libndbm.a | |
585 | %endif | |
a13cf434 | 586 | %endif |
ebd61457 AF |
587 | |
588 | %files cxx | |
589 | %defattr(644,root,root,755) | |
590 | %attr(755,root,root) %{_libdir}/libdb_cxx-%{libver}.so | |
591 | ||
592 | %files cxx-devel | |
593 | %defattr(644,root,root,755) | |
ebd61457 | 594 | %{_libdir}/libdb_cxx-%{libver}.la |
a13cf434 JB |
595 | %if %{with default_db} |
596 | %attr(755,root,root) %{_libdir}/libdb_cxx-%{major}.so | |
597 | %attr(755,root,root) %{_libdir}/libdb_cxx.so | |
ebd61457 | 598 | %{_libdir}/libdb_cxx.la |
a13cf434 | 599 | %endif |
ebd61457 AF |
600 | %{_includedir}/db_cxx.h |
601 | %{_docdir}/db-%{version}-docs/api_reference/CXX | |
602 | %{_docdir}/db-%{version}-docs/api_reference/STL | |
603 | %{_docdir}/db-%{version}-docs/gsg/CXX | |
604 | %{_docdir}/db-%{version}-docs/gsg_txn/CXX | |
605 | %{_docdir}/db-%{version}-docs/gsg_db_rep/CXX | |
606 | %{_examplesdir}/db-cxx-%{version} | |
607 | ||
608 | %if %{with static_libs} | |
609 | %files cxx-static | |
610 | %defattr(644,root,root,755) | |
611 | %{_libdir}/libdb_cxx-%{libver}.a | |
a13cf434 | 612 | %if %{with default_db} |
ebd61457 AF |
613 | %{_libdir}/libdb_cxx.a |
614 | %endif | |
a13cf434 | 615 | %endif |
ebd61457 AF |
616 | |
617 | %if %{with java} | |
618 | %files java | |
619 | %defattr(644,root,root,755) | |
620 | %attr(755,root,root) %{_libdir}/libdb_java-%{libver}.so | |
621 | %attr(755,root,root) %{_libdir}/libdb_java-%{libver}_g.so | |
a13cf434 JB |
622 | %{_javadir}/db-%{libver}.jar |
623 | %if %{with default_db} | |
ebd61457 | 624 | %{_javadir}/db.jar |
a13cf434 | 625 | %endif |
ebd61457 AF |
626 | |
627 | %files java-devel | |
628 | %defattr(644,root,root,755) | |
a13cf434 JB |
629 | %{_libdir}/libdb_java-%{libver}.la |
630 | %if %{with default_db} | |
ebd61457 AF |
631 | %attr(755,root,root) %{_libdir}/libdb_java.so |
632 | %attr(755,root,root) %{_libdir}/libdb_java-%{major}.so | |
ebd61457 | 633 | %{_libdir}/libdb_java.la |
a13cf434 | 634 | %endif |
ebd61457 AF |
635 | %{_docdir}/db-%{version}-docs/collections |
636 | %{_docdir}/db-%{version}-docs/gsg/JAVA | |
637 | %{_docdir}/db-%{version}-docs/gsg_txn/JAVA | |
638 | %{_docdir}/db-%{version}-docs/gsg_db_rep/JAVA | |
639 | %{_docdir}/db-%{version}-docs/java | |
640 | %{_examplesdir}/db-java-%{version} | |
641 | %endif | |
642 | ||
643 | %if %{with tcl} | |
644 | %files tcl | |
645 | %defattr(644,root,root,755) | |
646 | %attr(755,root,root) %{_libdir}/libdb_tcl-%{libver}.so | |
647 | ||
648 | %files tcl-devel | |
649 | %defattr(644,root,root,755) | |
a13cf434 JB |
650 | %{_libdir}/libdb_tcl-%{libver}.la |
651 | %if %{with default_db} | |
ebd61457 AF |
652 | %attr(755,root,root) %{_libdir}/libdb_tcl.so |
653 | %attr(755,root,root) %{_libdir}/libdb_tcl-%{major}.so | |
ebd61457 | 654 | %{_libdir}/libdb_tcl.la |
a13cf434 | 655 | %endif |
ebd61457 AF |
656 | %{_docdir}/db-%{version}-docs/api_reference/TCL |
657 | %endif | |
658 | ||
659 | %files sql | |
660 | %defattr(644,root,root,755) | |
661 | %attr(755,root,root) %{_libdir}/libdb_sql-%{libver}.so | |
662 | ||
663 | %files sql-devel | |
664 | %defattr(644,root,root,755) | |
a13cf434 JB |
665 | %{_libdir}/libdb_sql-%{libver}.la |
666 | %if %{with default_db} | |
ebd61457 AF |
667 | %attr(755,root,root) %{_libdir}/libdb_sql.so |
668 | %attr(755,root,root) %{_libdir}/libdb_sql-%{major}.so | |
a13cf434 | 669 | %endif |
ebd61457 AF |
670 | %{_includedir}/dbsql.h |
671 | %{_docdir}/db-%{version}-docs/bdb-sql | |
672 | ||
673 | %files stl | |
674 | %defattr(644,root,root,755) | |
675 | %attr(755,root,root) %{_libdir}/libdb_stl-%{libver}.so | |
676 | ||
677 | %files stl-devel | |
678 | %defattr(644,root,root,755) | |
a13cf434 JB |
679 | %{_libdir}/libdb_stl-%{libver}.la |
680 | %if %{with default_db} | |
ebd61457 AF |
681 | %attr(755,root,root) %{_libdir}/libdb_stl.so |
682 | %attr(755,root,root) %{_libdir}/libdb_stl-%{major}.so | |
a13cf434 | 683 | %endif |
ebd61457 AF |
684 | %{_includedir}/dbstl_base_iterator.h |
685 | %{_includedir}/dbstl_common.h | |
686 | %{_includedir}/dbstl_container.h | |
687 | %{_includedir}/dbstl_dbc.h | |
688 | %{_includedir}/dbstl_dbt.h | |
689 | %{_includedir}/dbstl_element_ref.h | |
690 | %{_includedir}/dbstl_exception.h | |
691 | %{_includedir}/dbstl_inner_utility.h | |
692 | %{_includedir}/dbstl_map.h | |
693 | %{_includedir}/dbstl_resource_manager.h | |
694 | %{_includedir}/dbstl_set.h | |
695 | %{_includedir}/dbstl_utility.h | |
696 | %{_includedir}/dbstl_vector.h | |
697 | ||
698 | %files sqlite3 | |
699 | %defattr(644,root,root,755) | |
700 | %attr(755,root,root) %{_bindir}/sqlite3 | |
701 | %attr(755,root,root) %{_libdir}/libsqlite3.so | |
702 | ||
703 | %files sqlite3-devel | |
704 | %defattr(644,root,root,755) | |
705 | %{_libdir}/libsqlite3.la | |
706 | %{_includedir}/sqlite3.h | |
707 | ||
708 | %files utils | |
709 | %defattr(644,root,root,755) | |
710 | %attr(755,root,root) %{_bindir}/db%{libver}_archive | |
711 | %attr(755,root,root) %{_bindir}/db%{libver}_checkpoint | |
712 | %attr(755,root,root) %{_bindir}/db%{libver}_deadlock | |
713 | %attr(755,root,root) %{_bindir}/db%{libver}_dump | |
714 | %attr(755,root,root) %{_bindir}/db%{libver}_hotbackup | |
715 | %attr(755,root,root) %{_bindir}/db%{libver}_load | |
716 | %attr(755,root,root) %{_bindir}/db%{libver}_log_verify | |
717 | %attr(755,root,root) %{_bindir}/db%{libver}_printlog | |
718 | %attr(755,root,root) %{_bindir}/db%{libver}_recover | |
719 | %attr(755,root,root) %{_bindir}/db%{libver}_stat | |
720 | %attr(755,root,root) %{_bindir}/db%{libver}_upgrade | |
721 | %attr(755,root,root) %{_bindir}/db%{libver}_verify | |
722 | %attr(755,root,root) %{_bindir}/dbsql-%{libver} | |
a13cf434 JB |
723 | %if %{with default_db} |
724 | %attr(755,root,root) %{_bindir}/db_archive | |
725 | %attr(755,root,root) %{_bindir}/db_checkpoint | |
726 | %attr(755,root,root) %{_bindir}/db_deadlock | |
727 | %attr(755,root,root) %{_bindir}/db_dump | |
728 | %attr(755,root,root) %{_bindir}/db_hotbackup | |
729 | %attr(755,root,root) %{_bindir}/db_load | |
730 | %attr(755,root,root) %{_bindir}/db_log_verify | |
731 | %attr(755,root,root) %{_bindir}/db_printlog | |
732 | %attr(755,root,root) %{_bindir}/db_recover | |
733 | %attr(755,root,root) %{_bindir}/db_stat | |
734 | %attr(755,root,root) %{_bindir}/db_upgrade | |
735 | %attr(755,root,root) %{_bindir}/db_verify | |
736 | %attr(755,root,root) %{_bindir}/dbsql | |
737 | %endif |