]>
Commit | Line | Data |
---|---|---|
bd7d9534 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 | |
fb06833a | 6 | %bcond_with sqlite3 # build Sqlite3 API libraries |
bd7d9534 | 7 | %bcond_with default_db # use this db as default system db |
ef81fc35 | 8 | %bcond_with rpm_db # install library to rootfs for /bin/rpm |
bd7d9534 | 9 | |
bd7d9534 JB |
10 | |
11 | %define major 5 | |
12 | %define libver %{major}.2 | |
a1f9929c | 13 | %define ver %{libver}.42 |
bd7d9534 JB |
14 | %define patchlevel 0 |
15 | Summary: Berkeley DB database library for C | |
16 | Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB | |
17 | Name: db5.2 | |
18 | Version: %{ver}.%{patchlevel} | |
ef81fc35 | 19 | Release: 5 |
bd7d9534 JB |
20 | License: BSD-like (see LICENSE) |
21 | Group: Libraries | |
093fdf4a | 22 | #Source0Download: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html |
bd7d9534 | 23 | Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz |
a1f9929c JB |
24 | # Source0-md5: 28c39545efbeb926d1efef0bf33135b9 |
25 | Patch0: %{name}-link.patch | |
26 | Patch1: %{name}-sql-features.patch | |
bd7d9534 JB |
27 | URL: http://www.oracle.com/technetwork/database/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 | |
5c49a411 | 133 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
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 | |
5c49a411 | 184 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
185 | Requires: jpackage-utils |
186 | %if %{with default_db} | |
187 | Provides: db-java = %{version}-%{release} | |
188 | Obsoletes: db-java | |
189 | %endif | |
190 | ||
191 | %description java | |
192 | Berkeley database library for Java. | |
193 | ||
194 | %description java -l pl.UTF-8 | |
195 | Biblioteka baz danych Berkeley dla Javy. | |
196 | ||
197 | %package java-devel | |
198 | Summary: Development files for db-java library | |
199 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java | |
200 | Group: Development/Languages/Java | |
201 | Requires: %{name}-java = %{version}-%{release} | |
202 | %if %{with default_db} | |
203 | Provides: db-java-devel = %{version}-%{release} | |
204 | Obsoletes: db-java-devel | |
205 | %endif | |
206 | Conflicts: db-devel < 4.1.25-3 | |
207 | ||
208 | %description java-devel | |
209 | Development files for db-java library. | |
210 | ||
211 | %description java-devel -l pl.UTF-8 | |
212 | Pliki programistyczne biblioteki db-java. | |
213 | ||
214 | %package tcl | |
215 | Summary: Berkeley database library for Tcl | |
216 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl | |
217 | Group: Development/Languages/Tcl | |
5c49a411 | 218 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
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 | |
5c49a411 | 252 | Requires: %{name} = %{version}-%{release} |
04aafde2 | 253 | %if %{with default_db} |
bd7d9534 JB |
254 | Provides: db-sql = %{version}-%{release} |
255 | %endif | |
256 | ||
257 | %description sql | |
258 | SQL layer for Berkeley database library. | |
259 | ||
260 | %description sql -l pl.UTF-8 | |
261 | Warstwa SQL dla biblioteki baz danych Berkeley. | |
262 | ||
263 | %package sql-devel | |
264 | Summary: Development files for db-sql library | |
265 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-sql | |
266 | Group: Development/Libraries | |
267 | Requires: %{name}-sql = %{version}-%{release} | |
04aafde2 | 268 | %if %{with default_db} |
bd7d9534 JB |
269 | Provides: db-sql-devel = %{version}-%{release} |
270 | Obsoletes: db-sql-devel | |
271 | %endif | |
272 | ||
273 | %description sql-devel | |
274 | Development files for db-sql library. | |
275 | ||
276 | %description sql-devel -l pl.UTF-8 | |
277 | Pliki programistyczne biblioteki db-sql. | |
278 | ||
279 | %package stl | |
280 | Summary: STL API for Berkeley Database library | |
281 | Summary(pl.UTF-8): API STL dla biblioteki Berkeley Database | |
282 | Group: Libraries | |
5c49a411 | 283 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
284 | %if %{with default_db} |
285 | Provides: db-stl = %{version}-%{release} | |
286 | %endif | |
287 | ||
288 | %description stl | |
289 | STL API for Berkeley database library. | |
290 | ||
291 | %description stl -l pl.UTF-8 | |
292 | API STL dla biblioteki Berkeley Database. | |
293 | ||
294 | %package stl-devel | |
295 | Summary: Development files for db-stl library | |
296 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-stl | |
297 | Group: Development/Libraries | |
298 | Requires: %{name}-stl = %{version}-%{release} | |
299 | %if %{with default_db} | |
300 | Provides: db-stl-devel = %{version}-%{release} | |
301 | Obsoletes: db-stl-devel | |
302 | %endif | |
303 | ||
304 | %description stl-devel | |
305 | Development files for db-stl library. | |
306 | ||
307 | %description stl-devel -l pl.UTF-8 | |
308 | Pliki programistyczne biblioteki db-stl. | |
309 | ||
310 | %package sqlite3 | |
311 | Summary: Sqlite3 API for Berkeley Database library | |
312 | Summary(pl.UTF-8): API Sqlite3 dla biblioteki Berkeley Database | |
313 | Group: Libraries | |
5c49a411 | 314 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
315 | %if %{with default_db} |
316 | Provides: db-sqlite3 = %{version}-%{release} | |
317 | %endif | |
318 | ||
319 | %description sqlite3 | |
320 | Sqlite3 API for Berkeley database library. | |
321 | ||
322 | %description sqlite3 -l pl.UTF-8 | |
323 | API Sqlite3 dla biblioteki Berkeley Database. | |
324 | ||
325 | %package sqlite3-devel | |
326 | Summary: Development files for db-sqlite3 library | |
327 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-sqlite3 | |
328 | Group: Development/Libraries | |
329 | Requires: %{name}-sqlite3 = %{version}-%{release} | |
330 | %if %{with default_db} | |
331 | Provides: db-sqlite3-devel = %{version}-%{release} | |
332 | Obsoletes: db-sqlite3-devel | |
333 | %endif | |
334 | ||
335 | %description sqlite3-devel | |
336 | Development files for db-sqlite3 library. | |
337 | ||
338 | %description sqlite3-devel -l pl.UTF-8 | |
339 | Pliki programistyczne biblioteki db-sqlite3. | |
340 | ||
341 | %package utils | |
342 | Summary: Command line tools for managing Berkeley DB databases | |
343 | Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń | |
344 | Group: Applications/Databases | |
345 | Requires: %{name} = %{version}-%{release} | |
346 | Requires: %{name}-sql = %{version}-%{release} | |
347 | %if %{with default_db} | |
348 | Provides: db-utils = %{version}-%{release} | |
349 | Obsoletes: db-utils | |
350 | Obsoletes: db3-utils | |
351 | Obsoletes: db4-utils | |
352 | %endif | |
353 | ||
354 | %description utils | |
355 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
356 | provides embedded database support for both traditional and | |
357 | client/server applications. Berkeley DB includes B+tree, Extended | |
358 | Linear Hashing, Fixed and Variable-length record access methods, | |
359 | transactions, locking, logging, shared memory caching and database | |
360 | recovery. DB supports C, C++, Java and Perl APIs. | |
361 | ||
362 | This package contains command line tools for managing Berkeley DB | |
363 | databases. | |
364 | ||
365 | %description utils -l pl.UTF-8 | |
366 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
367 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
368 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
369 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
370 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
371 | dla C, C++, Javy i Perla. | |
372 | ||
373 | Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii | |
374 | poleceń. | |
375 | ||
376 | %prep | |
377 | %setup -q -n db-%{ver} | |
a1f9929c JB |
378 | %patch0 -p1 |
379 | %patch1 -p1 | |
bd7d9534 JB |
380 | |
381 | %build | |
382 | cp -f /usr/share/automake/config.sub dist | |
2b3797e4 | 383 | cp -f /usr/share/automake/config.sub lang/sql/sqlite |
bd7d9534 JB |
384 | |
385 | JAVACFLAGS="-source 1.5 -target 1.5" | |
386 | export JAVACFLAGS | |
387 | ||
388 | %if %{with static_libs} | |
389 | cp -a build_unix build_unix.static | |
390 | ||
391 | cd build_unix.static | |
392 | ||
393 | CC="%{__cc}" | |
394 | CXX="%{__cxx}" | |
395 | CFLAGS="%{rpmcflags}" | |
396 | CXXFLAGS="%{rpmcflags} -fno-implicit-templates" | |
397 | LDFLAGS="%{rpmcflags} %{rpmldflags}" | |
398 | export CC CXX CFLAGS CXXFLAGS LDFLAGS | |
399 | ||
400 | ../dist/%configure \ | |
401 | --disable-shared \ | |
402 | --enable-static \ | |
403 | --enable-compat185 \ | |
404 | --enable-cxx \ | |
405 | --enable-dbm \ | |
406 | --enable-build_dbm \ | |
407 | --enable-posixmutexes | |
408 | ||
409 | # (temporarily?) disabled because of compilation errors: | |
410 | # --enable-dump185 \ | |
411 | ||
412 | %{__make} library_build | |
413 | cd .. | |
414 | %endif | |
415 | ||
416 | cd build_unix | |
417 | ||
418 | ../dist/%configure \ | |
419 | --prefix=%{_prefix} \ | |
420 | --libdir=%{_libdir} \ | |
421 | --enable-shared \ | |
422 | --disable-static \ | |
423 | --enable-compat185 \ | |
424 | --enable-cxx \ | |
425 | --enable-dbm \ | |
426 | --enable-build_dbm \ | |
427 | --enable-posixmutexes \ | |
428 | --enable-sql \ | |
fb06833a | 429 | %{?with_sqlite3:--enable-sql_compat} \ |
bd7d9534 JB |
430 | --enable-sql_codegen \ |
431 | --enable-stl \ | |
432 | %{?with_java:--enable-java} \ | |
433 | %{?with_tcl:--enable-tcl --with-tcl=/usr/lib} | |
434 | ||
435 | %{__make} library_build \ | |
436 | TCFLAGS='-I$(builddir) -I%{_includedir}' \ | |
437 | LIBSO_LIBS="\$(LIBS)" \ | |
438 | LIBTSO_LIBS="\$(LIBS) -ltcl" | |
439 | ||
440 | %install | |
441 | rm -rf $RPM_BUILD_ROOT | |
442 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}} | |
443 | %if %{with java} | |
444 | install -d $RPM_BUILD_ROOT%{_javadir} | |
445 | %endif | |
446 | ||
447 | %if %{with static_libs} | |
448 | %{__make} -C build_unix.static library_install \ | |
449 | DESTDIR=$RPM_BUILD_ROOT \ | |
450 | docdir=%{_docdir}/db-%{version}-docs \ | |
451 | includedir=%{_includedir} | |
452 | %endif | |
453 | ||
454 | %{__make} -C build_unix library_install \ | |
455 | DESTDIR=$RPM_BUILD_ROOT \ | |
456 | LIB_INSTALL_FILE_LIST="" \ | |
457 | docdir=%{_docdir}/db-%{version}-docs \ | |
458 | includedir=%{_includedir} | |
459 | ||
20c6fae2 | 460 | %if %{with rpm_db} |
bd7d9534 JB |
461 | install -d $RPM_BUILD_ROOT/%{_lib} |
462 | mv $RPM_BUILD_ROOT%{_libdir}/libdb-%{libver}.so $RPM_BUILD_ROOT/%{_lib} | |
20c6fae2 | 463 | ln -sf /%{_lib}/libdb-%{libver}.so $RPM_BUILD_ROOT%{_libdir}/libdb-%{libver}.so |
46971b00 JR |
464 | mv $RPM_BUILD_ROOT%{_libdir}/libdb_sql-%{libver}.so $RPM_BUILD_ROOT/%{_lib} |
465 | ln -sf /%{_lib}/libdb_sql-%{libver}.so $RPM_BUILD_ROOT%{_libdir}/libdb_sql-%{libver}.so | |
bd7d9534 JB |
466 | %endif |
467 | ||
468 | cd $RPM_BUILD_ROOT%{_libdir} | |
469 | %if %{with static_libs} | |
470 | mv -f libdb.a libdb-%{libver}.a | |
471 | mv -f libdb_cxx.a libdb_cxx-%{libver}.a | |
472 | %endif | |
473 | %if %{with java} | |
474 | mv -f $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}/db-%{libver}.jar | |
475 | %endif | |
476 | %if %{with default_db} | |
20c6fae2 JR |
477 | ln -sf libdb-%{libver}.so libdb.so |
478 | ln -sf libdb-%{libver}.so libndbm.so | |
bd7d9534 JB |
479 | ln -sf libdb-%{libver}.la libdb.la |
480 | ln -sf libdb-%{libver}.la libndbm.la | |
481 | ln -sf libdb_cxx-%{libver}.so libdb_cxx.so | |
482 | ln -sf libdb_cxx-%{libver}.la libdb_cxx.la | |
483 | %if %{with java} | |
484 | ln -sf libdb_java-%{libver}.la libdb_java.la | |
485 | ln -sf db-%{libver}.jar $RPM_BUILD_ROOT%{_javadir}/db.jar | |
486 | %endif | |
487 | %if %{with tcl} | |
488 | ln -sf libdb_tcl-%{libver}.so libdb_tcl.so | |
489 | ln -sf libdb_tcl-%{libver}.la libdb_tcl.la | |
490 | %endif | |
491 | %if %{with static_libs} | |
492 | ln -sf libdb-%{libver}.a libdb.a | |
493 | ln -sf libdb-%{libver}.a libndbm.a | |
494 | ln -sf libdb_cxx-%{libver}.a libdb_cxx.a | |
495 | %endif | |
20c6fae2 JR |
496 | %else |
497 | %{__rm} libdb.so | |
498 | %{__rm} libdb_cxx.so | |
499 | %{__rm} libdb_sql.so | |
500 | %{__rm} libdb_stl.so | |
501 | %{__rm} libdb-%{major}.so | |
502 | %{__rm} libdb_cxx-%{major}.so | |
503 | %{__rm} libdb_sql-%{major}.so | |
504 | %{__rm} libdb_stl-%{major}.so | |
505 | %if %{with java} | |
506 | %{__rm} libdb_java.so | |
507 | %{__rm} libdb_java-%{major}.so | |
508 | %endif | |
509 | %if %{with tcl} | |
510 | %{__rm} libdb_tcl.so | |
511 | %{__rm} libdb_tcl-%{major}.so | |
512 | %endif | |
bd7d9534 JB |
513 | %endif |
514 | ||
515 | sed -i "s/old_library=''/old_library='libdb-%{libver}.a'/" libdb-%{libver}.la | |
516 | sed -i "s/old_library=''/old_library='libdb_cxx-%{libver}.a'/" libdb_cxx-%{libver}.la | |
517 | ||
518 | cd - | |
519 | ||
520 | cd $RPM_BUILD_ROOT%{_bindir} | |
521 | mv dbsql dbsql-%{libver} | |
522 | %{?with_default_db:ln -sf dbsql-%{libver} dbsql} | |
523 | for F in db_*; do | |
524 | Fver=$(echo $F|sed 's/db_/db%{libver}_/') | |
525 | mv $F $Fver | |
526 | %{?with_default_db:ln -sf $Fver $F} | |
527 | done | |
528 | cd - | |
529 | ||
530 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version} | |
531 | cp -a examples/c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version} | |
532 | ||
533 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version} | |
534 | cp -a examples/cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version} | |
535 | ||
536 | %if %{with java} | |
537 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version} | |
538 | cp -a examples/java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version} | |
539 | %endif | |
540 | ||
541 | # in %doc | |
542 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/{index.html,license/license_db.html} | |
543 | ||
544 | # don't have csharp subpackages yet | |
545 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/csharp | |
546 | ||
547 | %clean | |
548 | rm -rf $RPM_BUILD_ROOT | |
549 | ||
550 | %post -p /sbin/ldconfig | |
551 | %postun -p /sbin/ldconfig | |
552 | ||
553 | %post tcl -p /sbin/ldconfig | |
554 | %postun tcl -p /sbin/ldconfig | |
555 | ||
556 | %post cxx -p /sbin/ldconfig | |
557 | %postun cxx -p /sbin/ldconfig | |
558 | ||
559 | %post sql -p /sbin/ldconfig | |
560 | %postun sql -p /sbin/ldconfig | |
561 | ||
562 | %post stl -p /sbin/ldconfig | |
563 | %postun stl -p /sbin/ldconfig | |
564 | ||
565 | %files | |
566 | %defattr(644,root,root,755) | |
567 | %doc LICENSE README docs/index.html docs/license | |
20c6fae2 | 568 | %if %{with rpm_db} |
bd7d9534 JB |
569 | %attr(755,root,root) /%{_lib}/libdb-%{libver}.so |
570 | %else | |
571 | %attr(755,root,root) %{_libdir}/libdb-%{libver}.so | |
572 | %endif | |
573 | ||
574 | %files devel | |
575 | %defattr(644,root,root,755) | |
576 | %attr(755,root,root) %{_bindir}/db%{libver}_sql_codegen | |
577 | %{_libdir}/libdb-%{libver}.la | |
20c6fae2 JR |
578 | %if %{with rpm_db} |
579 | %attr(755,root,root) %{_libdir}/libdb-%{libver}.so | |
580 | %endif | |
bd7d9534 JB |
581 | %if %{with default_db} |
582 | %attr(755,root,root) %{_bindir}/db_sql_codegen | |
bd7d9534 JB |
583 | %attr(755,root,root) %{_libdir}/libdb-%{major}.so |
584 | %attr(755,root,root) %{_libdir}/libdb.so | |
585 | %attr(755,root,root) %{_libdir}/libndbm.so | |
586 | %{_libdir}/libdb.la | |
587 | %{_libdir}/libndbm.la | |
588 | %else | |
589 | %dir %{_includedir} | |
590 | %endif | |
591 | %{_includedir}/db.h | |
592 | %{_includedir}/db_185.h | |
593 | %dir %{_docdir}/db-%{version}-docs | |
594 | %dir %{_docdir}/db-%{version}-docs/api_reference | |
595 | %{_docdir}/db-%{version}-docs/api_reference/C | |
596 | %{_docdir}/db-%{version}-docs/articles | |
597 | %dir %{_docdir}/db-%{version}-docs/gsg | |
598 | %{_docdir}/db-%{version}-docs/gsg/C | |
599 | %dir %{_docdir}/db-%{version}-docs/gsg_txn | |
600 | %{_docdir}/db-%{version}-docs/gsg_txn/C | |
601 | %dir %{_docdir}/db-%{version}-docs/gsg_db_rep | |
602 | %{_docdir}/db-%{version}-docs/gsg_db_rep/C | |
603 | %{_docdir}/db-%{version}-docs/installation | |
604 | %{_docdir}/db-%{version}-docs/porting | |
605 | %{_docdir}/db-%{version}-docs/programmer_reference | |
606 | %{_docdir}/db-%{version}-docs/upgrading | |
607 | %{_examplesdir}/db-%{version} | |
608 | ||
609 | %if %{with static_libs} | |
610 | %files static | |
611 | %defattr(644,root,root,755) | |
612 | %{_libdir}/libdb-%{libver}.a | |
613 | %if %{with default_db} | |
614 | %{_libdir}/libdb.a | |
615 | %{_libdir}/libndbm.a | |
616 | %endif | |
617 | %endif | |
618 | ||
619 | %files cxx | |
620 | %defattr(644,root,root,755) | |
621 | %attr(755,root,root) %{_libdir}/libdb_cxx-%{libver}.so | |
622 | ||
623 | %files cxx-devel | |
624 | %defattr(644,root,root,755) | |
625 | %{_libdir}/libdb_cxx-%{libver}.la | |
626 | %if %{with default_db} | |
627 | %attr(755,root,root) %{_libdir}/libdb_cxx-%{major}.so | |
628 | %attr(755,root,root) %{_libdir}/libdb_cxx.so | |
629 | %{_libdir}/libdb_cxx.la | |
630 | %endif | |
631 | %{_includedir}/db_cxx.h | |
632 | %{_docdir}/db-%{version}-docs/api_reference/CXX | |
633 | %{_docdir}/db-%{version}-docs/api_reference/STL | |
634 | %{_docdir}/db-%{version}-docs/gsg/CXX | |
635 | %{_docdir}/db-%{version}-docs/gsg_txn/CXX | |
636 | %{_docdir}/db-%{version}-docs/gsg_db_rep/CXX | |
637 | %{_examplesdir}/db-cxx-%{version} | |
638 | ||
639 | %if %{with static_libs} | |
640 | %files cxx-static | |
641 | %defattr(644,root,root,755) | |
642 | %{_libdir}/libdb_cxx-%{libver}.a | |
643 | %if %{with default_db} | |
644 | %{_libdir}/libdb_cxx.a | |
645 | %endif | |
646 | %endif | |
647 | ||
648 | %if %{with java} | |
649 | %files java | |
650 | %defattr(644,root,root,755) | |
651 | %attr(755,root,root) %{_libdir}/libdb_java-%{libver}.so | |
652 | %attr(755,root,root) %{_libdir}/libdb_java-%{libver}_g.so | |
653 | %{_javadir}/db-%{libver}.jar | |
654 | %if %{with default_db} | |
655 | %{_javadir}/db.jar | |
656 | %endif | |
657 | ||
658 | %files java-devel | |
659 | %defattr(644,root,root,755) | |
660 | %{_libdir}/libdb_java-%{libver}.la | |
661 | %if %{with default_db} | |
662 | %attr(755,root,root) %{_libdir}/libdb_java.so | |
663 | %attr(755,root,root) %{_libdir}/libdb_java-%{major}.so | |
664 | %{_libdir}/libdb_java.la | |
665 | %endif | |
666 | %{_docdir}/db-%{version}-docs/collections | |
667 | %{_docdir}/db-%{version}-docs/gsg/JAVA | |
668 | %{_docdir}/db-%{version}-docs/gsg_txn/JAVA | |
669 | %{_docdir}/db-%{version}-docs/gsg_db_rep/JAVA | |
670 | %{_docdir}/db-%{version}-docs/java | |
671 | %{_examplesdir}/db-java-%{version} | |
672 | %endif | |
673 | ||
674 | %if %{with tcl} | |
675 | %files tcl | |
676 | %defattr(644,root,root,755) | |
677 | %attr(755,root,root) %{_libdir}/libdb_tcl-%{libver}.so | |
678 | ||
679 | %files tcl-devel | |
680 | %defattr(644,root,root,755) | |
681 | %{_libdir}/libdb_tcl-%{libver}.la | |
682 | %if %{with default_db} | |
683 | %attr(755,root,root) %{_libdir}/libdb_tcl.so | |
684 | %attr(755,root,root) %{_libdir}/libdb_tcl-%{major}.so | |
685 | %{_libdir}/libdb_tcl.la | |
686 | %endif | |
687 | %{_docdir}/db-%{version}-docs/api_reference/TCL | |
688 | %endif | |
689 | ||
690 | %files sql | |
691 | %defattr(644,root,root,755) | |
46971b00 JR |
692 | %if %{with rpm_db} |
693 | %attr(755,root,root) /%{_lib}/libdb_sql-%{libver}.so | |
694 | %else | |
bd7d9534 | 695 | %attr(755,root,root) %{_libdir}/libdb_sql-%{libver}.so |
46971b00 | 696 | %endif |
bd7d9534 JB |
697 | |
698 | %files sql-devel | |
699 | %defattr(644,root,root,755) | |
700 | %{_libdir}/libdb_sql-%{libver}.la | |
46971b00 JR |
701 | %if %{with rpm_db} |
702 | %attr(755,root,root) %{_libdir}/libdb_sql-%{libver}.so | |
703 | %endif | |
bd7d9534 JB |
704 | %if %{with default_db} |
705 | %attr(755,root,root) %{_libdir}/libdb_sql.so | |
706 | %attr(755,root,root) %{_libdir}/libdb_sql-%{major}.so | |
707 | %endif | |
708 | %{_includedir}/dbsql.h | |
709 | %{_docdir}/db-%{version}-docs/bdb-sql | |
710 | ||
711 | %files stl | |
712 | %defattr(644,root,root,755) | |
713 | %attr(755,root,root) %{_libdir}/libdb_stl-%{libver}.so | |
714 | ||
715 | %files stl-devel | |
716 | %defattr(644,root,root,755) | |
717 | %{_libdir}/libdb_stl-%{libver}.la | |
718 | %if %{with default_db} | |
719 | %attr(755,root,root) %{_libdir}/libdb_stl.so | |
720 | %attr(755,root,root) %{_libdir}/libdb_stl-%{major}.so | |
721 | %endif | |
722 | %{_includedir}/dbstl_base_iterator.h | |
723 | %{_includedir}/dbstl_common.h | |
724 | %{_includedir}/dbstl_container.h | |
725 | %{_includedir}/dbstl_dbc.h | |
726 | %{_includedir}/dbstl_dbt.h | |
727 | %{_includedir}/dbstl_element_ref.h | |
728 | %{_includedir}/dbstl_exception.h | |
729 | %{_includedir}/dbstl_inner_utility.h | |
730 | %{_includedir}/dbstl_map.h | |
731 | %{_includedir}/dbstl_resource_manager.h | |
732 | %{_includedir}/dbstl_set.h | |
733 | %{_includedir}/dbstl_utility.h | |
734 | %{_includedir}/dbstl_vector.h | |
735 | ||
fb06833a | 736 | %if %{with sqlite3} |
bd7d9534 JB |
737 | %files sqlite3 |
738 | %defattr(644,root,root,755) | |
739 | %attr(755,root,root) %{_bindir}/sqlite3 | |
740 | %attr(755,root,root) %{_libdir}/libsqlite3.so | |
741 | ||
742 | %files sqlite3-devel | |
743 | %defattr(644,root,root,755) | |
744 | %{_libdir}/libsqlite3.la | |
745 | %{_includedir}/sqlite3.h | |
fb06833a | 746 | %endif |
bd7d9534 JB |
747 | |
748 | %files utils | |
749 | %defattr(644,root,root,755) | |
750 | %attr(755,root,root) %{_bindir}/db%{libver}_archive | |
751 | %attr(755,root,root) %{_bindir}/db%{libver}_checkpoint | |
752 | %attr(755,root,root) %{_bindir}/db%{libver}_deadlock | |
753 | %attr(755,root,root) %{_bindir}/db%{libver}_dump | |
754 | %attr(755,root,root) %{_bindir}/db%{libver}_hotbackup | |
755 | %attr(755,root,root) %{_bindir}/db%{libver}_load | |
756 | %attr(755,root,root) %{_bindir}/db%{libver}_log_verify | |
757 | %attr(755,root,root) %{_bindir}/db%{libver}_printlog | |
758 | %attr(755,root,root) %{_bindir}/db%{libver}_recover | |
759 | %attr(755,root,root) %{_bindir}/db%{libver}_replicate | |
760 | %attr(755,root,root) %{_bindir}/db%{libver}_stat | |
761 | %attr(755,root,root) %{_bindir}/db%{libver}_tuner | |
762 | %attr(755,root,root) %{_bindir}/db%{libver}_upgrade | |
763 | %attr(755,root,root) %{_bindir}/db%{libver}_verify | |
764 | %attr(755,root,root) %{_bindir}/dbsql-%{libver} | |
765 | %if %{with default_db} | |
766 | %attr(755,root,root) %{_bindir}/db_archive | |
767 | %attr(755,root,root) %{_bindir}/db_checkpoint | |
768 | %attr(755,root,root) %{_bindir}/db_deadlock | |
769 | %attr(755,root,root) %{_bindir}/db_dump | |
770 | %attr(755,root,root) %{_bindir}/db_hotbackup | |
771 | %attr(755,root,root) %{_bindir}/db_load | |
772 | %attr(755,root,root) %{_bindir}/db_log_verify | |
773 | %attr(755,root,root) %{_bindir}/db_printlog | |
774 | %attr(755,root,root) %{_bindir}/db_recover | |
775 | %attr(755,root,root) %{_bindir}/db_replicate | |
776 | %attr(755,root,root) %{_bindir}/db_stat | |
777 | %attr(755,root,root) %{_bindir}/db_tuner | |
778 | %attr(755,root,root) %{_bindir}/db_upgrade | |
779 | %attr(755,root,root) %{_bindir}/db_verify | |
780 | %attr(755,root,root) %{_bindir}/dbsql | |
781 | %endif |