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