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