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