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