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