]>
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 |
20c6fae2 | 8 | %bcond_without rpm_db # install library to rootfs for /bin/rpm |
bd7d9534 JB |
9 | |
10 | %include /usr/lib/rpm/macros.java | |
11 | ||
12 | %define major 5 | |
13 | %define libver %{major}.2 | |
a1f9929c | 14 | %define ver %{libver}.42 |
bd7d9534 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: db5.2 | |
19 | Version: %{ver}.%{patchlevel} | |
5c49a411 | 20 | Release: 2 |
bd7d9534 JB |
21 | License: BSD-like (see LICENSE) |
22 | Group: Libraries | |
093fdf4a | 23 | #Source0Download: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html |
bd7d9534 | 24 | Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz |
a1f9929c JB |
25 | # Source0-md5: 28c39545efbeb926d1efef0bf33135b9 |
26 | Patch0: %{name}-link.patch | |
27 | Patch1: %{name}-sql-features.patch | |
bd7d9534 JB |
28 | URL: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html |
29 | BuildRequires: automake | |
30 | %if %{with java} | |
31 | BuildRequires: jdk | |
32 | BuildRequires: rpm-javaprov | |
33 | %endif | |
34 | BuildRequires: libstdc++-devel | |
35 | BuildRequires: rpmbuild(macros) >= 1.426 | |
36 | BuildRequires: sed >= 4.0 | |
37 | %{?with_tcl:BuildRequires: tcl-devel >= 8.4.0} | |
38 | Requires: uname(release) >= 2.6.0 | |
39 | %if %{with default_db} | |
40 | Provides: db = %{version}-%{release} | |
41 | Provides: db = %{libver} | |
42 | Obsoletes: db4 | |
43 | %endif | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %if %{without default_db} | |
47 | %define _includedir %{_prefix}/include/db%{libver} | |
48 | %endif | |
49 | ||
50 | %description | |
51 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
52 | provides embedded database support for both traditional and | |
53 | client/server applications. Berkeley DB is used by many applications, | |
54 | including Python and Perl, so this should be installed on all systems. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
58 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
59 | klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w | |
60 | Pythonie i Perlu. | |
61 | ||
62 | %package devel | |
63 | Summary: Header files for Berkeley database library | |
64 | Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database | |
65 | Group: Development/Libraries | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | %if %{with default_db} | |
68 | Provides: db-devel = %{version}-%{release} | |
69 | Obsoletes: db-devel | |
70 | Obsoletes: db3-devel | |
71 | Obsoletes: db4-devel | |
72 | %endif | |
73 | ||
74 | %description devel | |
75 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
76 | provides embedded database support for both traditional and | |
77 | client/server applications. Berkeley DB includes B+tree, Extended | |
78 | Linear Hashing, Fixed and Variable-length record access methods, | |
79 | transactions, locking, logging, shared memory caching and database | |
80 | recovery. DB supports C, C++, Java and Perl APIs. | |
81 | ||
82 | This package contains the header files, libraries, and documentation | |
83 | for building programs which use Berkeley DB. | |
84 | ||
85 | %description devel -l pl.UTF-8 | |
86 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
87 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
88 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
89 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
90 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
91 | dla C, C++, Javy i Perla. | |
92 | ||
93 | Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania | |
94 | programów używających Berkeley DB. | |
95 | ||
96 | %package static | |
97 | Summary: Static libraries for Berkeley database library | |
98 | Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database | |
99 | Group: Development/Libraries | |
100 | Requires: %{name}-devel = %{version}-%{release} | |
101 | %if %{with default_db} | |
102 | Provides: db-static = %{version}-%{release} | |
103 | Obsoletes: db-static | |
104 | Obsoletes: db3-static | |
105 | Obsoletes: db4-static | |
106 | %endif | |
107 | ||
108 | %description static | |
109 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
110 | provides embedded database support for both traditional and | |
111 | client/server applications. Berkeley DB includes B+tree, Extended | |
112 | Linear Hashing, Fixed and Variable-length record access methods, | |
113 | transactions, locking, logging, shared memory caching and database | |
114 | recovery. DB supports C, C++, Java and Perl APIs. | |
115 | ||
116 | This package contains the static libraries for building programs which | |
117 | use Berkeley DB. | |
118 | ||
119 | %description static -l pl.UTF-8 | |
120 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
121 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
122 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
123 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
124 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
125 | dla C, C++, Javy i Perla. | |
126 | ||
127 | Ten pakiet zawiera statyczne biblioteki do budowania programów | |
128 | używających Berkeley DB. | |
129 | ||
130 | %package cxx | |
131 | Summary: Berkeley database library for C++ | |
132 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++ | |
133 | Group: Libraries | |
5c49a411 | 134 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
135 | %if %{with default_db} |
136 | Provides: db-cxx = %{version}-%{release} | |
137 | Obsoletes: db4-cxx | |
138 | %endif | |
139 | ||
140 | %description cxx | |
141 | Berkeley database library for C++. | |
142 | ||
143 | %description cxx -l pl.UTF-8 | |
144 | Biblioteka baz danych Berkeley dla C++. | |
145 | ||
146 | %package cxx-devel | |
147 | Summary: Header files for db-cxx library | |
148 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx | |
149 | Group: Development/Libraries | |
150 | Requires: %{name}-cxx = %{version}-%{release} | |
151 | Requires: %{name}-devel = %{version}-%{release} | |
152 | %if %{with default_db} | |
153 | Provides: db-cxx-devel = %{version}-%{release} | |
154 | Obsoletes: db-cxx-devel | |
155 | %endif | |
156 | Conflicts: db-devel < 4.1.25-3 | |
157 | ||
158 | %description cxx-devel | |
159 | Header files for db-cxx library. | |
160 | ||
161 | %description cxx-devel -l pl.UTF-8 | |
162 | Pliki nagłówkowe biblioteki db-cxx. | |
163 | ||
164 | %package cxx-static | |
165 | Summary: Static version of db-cxx library | |
166 | Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx | |
167 | Group: Development/Libraries | |
168 | Requires: %{name}-cxx-devel = %{version}-%{release} | |
169 | %if %{with default_db} | |
170 | Provides: db-cxx-static = %{version}-%{release} | |
171 | Obsoletes: db-cxx-static | |
172 | %endif | |
173 | Conflicts: db-static < 4.2.50-1 | |
174 | ||
175 | %description cxx-static | |
176 | Static version of db-cxx library. | |
177 | ||
178 | %description cxx-static -l pl.UTF-8 | |
179 | Statyczna wersja biblioteki db-cxx. | |
180 | ||
181 | %package java | |
182 | Summary: Berkeley database library for Java | |
183 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy | |
184 | Group: Libraries | |
5c49a411 | 185 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
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 | |
5c49a411 | 219 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
220 | Requires: tcl |
221 | %if %{with default_db} | |
222 | Provides: db-tcl = %{version}-%{release} | |
223 | Obsoletes: db4-tcl | |
224 | %endif | |
225 | ||
226 | %description tcl | |
227 | Berkeley database library for Tcl. | |
228 | ||
229 | %description tcl -l pl.UTF-8 | |
230 | Biblioteka baz danych Berkeley dla Tcl. | |
231 | ||
232 | %package tcl-devel | |
233 | Summary: Development files for db-tcl library | |
234 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl | |
235 | Group: Development/Languages/Tcl | |
236 | Requires: %{name}-tcl = %{version}-%{release} | |
237 | %if %{with default_db} | |
238 | Provides: db-tcl-devel = %{version}-%{release} | |
239 | Obsoletes: db-tcl-devel | |
240 | %endif | |
241 | Conflicts: db-devel < 4.1.25-3 | |
242 | ||
243 | %description tcl-devel | |
244 | Development files for db-tcl library. | |
245 | ||
246 | %description tcl-devel -l pl.UTF-8 | |
247 | Pliki programistyczne biblioteki db-tcl. | |
248 | ||
249 | %package sql | |
250 | Summary: SQL layer for Berkeley database library | |
251 | Summary(pl.UTF-8): Wartstwa SQL dla biblioteki baz danych Berkeley | |
252 | Group: Libraries | |
5c49a411 | 253 | Requires: %{name} = %{version}-%{release} |
04aafde2 | 254 | %if %{with default_db} |
bd7d9534 JB |
255 | Provides: db-sql = %{version}-%{release} |
256 | %endif | |
257 | ||
258 | %description sql | |
259 | SQL layer for Berkeley database library. | |
260 | ||
261 | %description sql -l pl.UTF-8 | |
262 | Warstwa SQL dla biblioteki baz danych Berkeley. | |
263 | ||
264 | %package sql-devel | |
265 | Summary: Development files for db-sql library | |
266 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-sql | |
267 | Group: Development/Libraries | |
268 | Requires: %{name}-sql = %{version}-%{release} | |
04aafde2 | 269 | %if %{with default_db} |
bd7d9534 JB |
270 | Provides: db-sql-devel = %{version}-%{release} |
271 | Obsoletes: db-sql-devel | |
272 | %endif | |
273 | ||
274 | %description sql-devel | |
275 | Development files for db-sql library. | |
276 | ||
277 | %description sql-devel -l pl.UTF-8 | |
278 | Pliki programistyczne biblioteki db-sql. | |
279 | ||
280 | %package stl | |
281 | Summary: STL API for Berkeley Database library | |
282 | Summary(pl.UTF-8): API STL dla biblioteki Berkeley Database | |
283 | Group: Libraries | |
5c49a411 | 284 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
285 | %if %{with default_db} |
286 | Provides: db-stl = %{version}-%{release} | |
287 | %endif | |
288 | ||
289 | %description stl | |
290 | STL API for Berkeley database library. | |
291 | ||
292 | %description stl -l pl.UTF-8 | |
293 | API STL dla biblioteki Berkeley Database. | |
294 | ||
295 | %package stl-devel | |
296 | Summary: Development files for db-stl library | |
297 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-stl | |
298 | Group: Development/Libraries | |
299 | Requires: %{name}-stl = %{version}-%{release} | |
300 | %if %{with default_db} | |
301 | Provides: db-stl-devel = %{version}-%{release} | |
302 | Obsoletes: db-stl-devel | |
303 | %endif | |
304 | ||
305 | %description stl-devel | |
306 | Development files for db-stl library. | |
307 | ||
308 | %description stl-devel -l pl.UTF-8 | |
309 | Pliki programistyczne biblioteki db-stl. | |
310 | ||
311 | %package sqlite3 | |
312 | Summary: Sqlite3 API for Berkeley Database library | |
313 | Summary(pl.UTF-8): API Sqlite3 dla biblioteki Berkeley Database | |
314 | Group: Libraries | |
5c49a411 | 315 | Requires: %{name} = %{version}-%{release} |
bd7d9534 JB |
316 | %if %{with default_db} |
317 | Provides: db-sqlite3 = %{version}-%{release} | |
318 | %endif | |
319 | ||
320 | %description sqlite3 | |
321 | Sqlite3 API for Berkeley database library. | |
322 | ||
323 | %description sqlite3 -l pl.UTF-8 | |
324 | API Sqlite3 dla biblioteki Berkeley Database. | |
325 | ||
326 | %package sqlite3-devel | |
327 | Summary: Development files for db-sqlite3 library | |
328 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-sqlite3 | |
329 | Group: Development/Libraries | |
330 | Requires: %{name}-sqlite3 = %{version}-%{release} | |
331 | %if %{with default_db} | |
332 | Provides: db-sqlite3-devel = %{version}-%{release} | |
333 | Obsoletes: db-sqlite3-devel | |
334 | %endif | |
335 | ||
336 | %description sqlite3-devel | |
337 | Development files for db-sqlite3 library. | |
338 | ||
339 | %description sqlite3-devel -l pl.UTF-8 | |
340 | Pliki programistyczne biblioteki db-sqlite3. | |
341 | ||
342 | %package utils | |
343 | Summary: Command line tools for managing Berkeley DB databases | |
344 | Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń | |
345 | Group: Applications/Databases | |
346 | Requires: %{name} = %{version}-%{release} | |
347 | Requires: %{name}-sql = %{version}-%{release} | |
348 | %if %{with default_db} | |
349 | Provides: db-utils = %{version}-%{release} | |
350 | Obsoletes: db-utils | |
351 | Obsoletes: db3-utils | |
352 | Obsoletes: db4-utils | |
353 | %endif | |
354 | ||
355 | %description utils | |
356 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
357 | provides embedded database support for both traditional and | |
358 | client/server applications. Berkeley DB includes B+tree, Extended | |
359 | Linear Hashing, Fixed and Variable-length record access methods, | |
360 | transactions, locking, logging, shared memory caching and database | |
361 | recovery. DB supports C, C++, Java and Perl APIs. | |
362 | ||
363 | This package contains command line tools for managing Berkeley DB | |
364 | databases. | |
365 | ||
366 | %description utils -l pl.UTF-8 | |
367 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
368 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
369 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
370 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
371 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
372 | dla C, C++, Javy i Perla. | |
373 | ||
374 | Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii | |
375 | poleceń. | |
376 | ||
377 | %prep | |
378 | %setup -q -n db-%{ver} | |
a1f9929c JB |
379 | %patch0 -p1 |
380 | %patch1 -p1 | |
bd7d9534 JB |
381 | |
382 | %build | |
383 | cp -f /usr/share/automake/config.sub dist | |
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 |