]>
Commit | Line | Data |
---|---|---|
9ff799b6 JB |
1 | # |
2 | # Conditional build: | |
6a2508d3 JB |
3 | %bcond_without java # don't build Java library |
4 | %bcond_without tcl # don't build Tcl bindings | |
31754b2d | 5 | %bcond_with pmutex # use process-shared POSIX mutexes (not available with linuxthreads) |
6a2508d3 | 6 | %bcond_without nptl # don't use process-shared POSIX mutexes (NPTL provides full interface) |
9ff799b6 | 7 | %bcond_without static_libs # don't build static libraries |
ef894a9c | 8 | %bcond_with default_db # use this db as default system db |
9ff799b6 | 9 | # |
6a2508d3 JB |
10 | %define ver 4.4.20 |
11 | %define patchlevel 4 | |
9ff799b6 JB |
12 | %{?with_nptl:%define with_pmutex 1} |
13 | Summary: Berkeley DB database library for C | |
8c809823 | 14 | Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB |
9ff799b6 | 15 | Name: db4.4 |
6a2508d3 JB |
16 | Version: %{ver}.%{patchlevel} |
17 | Release: 1 | |
9ff799b6 JB |
18 | Epoch: 0 |
19 | License: Sleepycat public license (GPL-like, see LICENSE) | |
20 | Group: Libraries | |
6a2508d3 JB |
21 | #Source0Download: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html |
22 | Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz | |
b4853f60 | 23 | # Source0-md5: d84dff288a19186b136b0daf7067ade3 |
6a2508d3 JB |
24 | %patchset_source -f http://download.oracle.com/berkeley-db/patches/db/%{ver}/patch.%{ver}.%g 1 %{patchlevel} |
25 | URL: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html | |
9ff799b6 JB |
26 | BuildRequires: autoconf |
27 | BuildRequires: automake | |
28 | BuildRequires: ed | |
29 | %{?with_java:BuildRequires: jdk} | |
9ff799b6 | 30 | BuildRequires: libstdc++-devel |
6a2508d3 | 31 | BuildRequires: libtool >= 2:2.2 |
9ff799b6 JB |
32 | BuildRequires: sed >= 4.0 |
33 | %{?with_tcl:BuildRequires: tcl-devel >= 8.4.0} | |
ef894a9c | 34 | %if %{with default_db} |
9ff799b6 JB |
35 | Provides: db = %{version}-%{release} |
36 | Obsoletes: db4 | |
ef894a9c | 37 | %endif |
9ff799b6 JB |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
ef894a9c | 40 | %if %{without default_db} |
446fbf53 | 41 | %define _includedir %{_prefix}/include/db4.4 |
ef894a9c JB |
42 | %endif |
43 | ||
9ff799b6 JB |
44 | %description |
45 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
46 | provides embedded database support for both traditional and | |
47 | client/server applications. Berkeley DB is used by many applications, | |
48 | including Python and Perl, so this should be installed on all systems. | |
49 | ||
93b54114 JR |
50 | %description -l pl.UTF-8 |
51 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
52 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
53 | klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w | |
9ff799b6 JB |
54 | Pythonie i Perlu. |
55 | ||
56 | %package devel | |
57 | Summary: Header files for Berkeley database library | |
8c809823 | 58 | Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database |
9ff799b6 JB |
59 | Group: Development/Libraries |
60 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
ef894a9c | 61 | %if %{with default_db} |
9ff799b6 | 62 | Provides: db-devel = %{version}-%{release} |
31754b2d | 63 | Obsoletes: db-devel |
9ff799b6 JB |
64 | Obsoletes: db3-devel |
65 | Obsoletes: db4-devel | |
ef894a9c | 66 | %endif |
9ff799b6 JB |
67 | |
68 | %description devel | |
69 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
70 | provides embedded database support for both traditional and | |
71 | client/server applications. Berkeley DB includes B+tree, Extended | |
72 | Linear Hashing, Fixed and Variable-length record access methods, | |
73 | transactions, locking, logging, shared memory caching and database | |
74 | recovery. DB supports C, C++, Java and Perl APIs. | |
75 | ||
76 | This package contains the header files, libraries, and documentation | |
77 | for building programs which use Berkeley DB. | |
78 | ||
93b54114 JR |
79 | %description devel -l pl.UTF-8 |
80 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
81 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
82 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
83 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
84 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
9ff799b6 JB |
85 | dla C, C++, Javy i Perla. |
86 | ||
93b54114 JR |
87 | Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania |
88 | programów używających Berkeley DB. | |
9ff799b6 JB |
89 | |
90 | %package static | |
91 | Summary: Static libraries for Berkeley database library | |
8c809823 | 92 | Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database |
9ff799b6 JB |
93 | Group: Development/Libraries |
94 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
ef894a9c | 95 | %if %{with default_db} |
9ff799b6 | 96 | Provides: db-static = %{version}-%{release} |
31754b2d | 97 | Obsoletes: db-static |
9ff799b6 JB |
98 | Obsoletes: db3-static |
99 | Obsoletes: db4-static | |
ef894a9c | 100 | %endif |
9ff799b6 JB |
101 | |
102 | %description static | |
103 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
104 | provides embedded database support for both traditional and | |
105 | client/server applications. Berkeley DB includes B+tree, Extended | |
106 | Linear Hashing, Fixed and Variable-length record access methods, | |
107 | transactions, locking, logging, shared memory caching and database | |
108 | recovery. DB supports C, C++, Java and Perl APIs. | |
109 | ||
110 | This package contains the static libraries for building programs which | |
111 | use Berkeley DB. | |
112 | ||
93b54114 JR |
113 | %description static -l pl.UTF-8 |
114 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
115 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
116 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
117 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
118 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
9ff799b6 JB |
119 | dla C, C++, Javy i Perla. |
120 | ||
93b54114 JR |
121 | Ten pakiet zawiera statyczne biblioteki do budowania programów |
122 | używających Berkeley DB. | |
9ff799b6 JB |
123 | |
124 | %package cxx | |
125 | Summary: Berkeley database library for C++ | |
8c809823 | 126 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++ |
9ff799b6 | 127 | Group: Libraries |
ef894a9c | 128 | %if %{with default_db} |
9ff799b6 JB |
129 | Provides: db-cxx = %{version}-%{release} |
130 | Obsoletes: db4-cxx | |
ef894a9c | 131 | %endif |
9ff799b6 JB |
132 | |
133 | %description cxx | |
134 | Berkeley database library for C++. | |
135 | ||
93b54114 | 136 | %description cxx -l pl.UTF-8 |
9ff799b6 JB |
137 | Biblioteka baz danych Berkeley dla C++. |
138 | ||
139 | %package cxx-devel | |
140 | Summary: Header files for db-cxx library | |
8c809823 | 141 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx |
9ff799b6 JB |
142 | Group: Development/Libraries |
143 | Requires: %{name}-cxx = %{epoch}:%{version}-%{release} | |
144 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
ef894a9c | 145 | %if %{with default_db} |
9ff799b6 | 146 | Provides: db-cxx-devel = %{version}-%{release} |
31754b2d | 147 | Obsoletes: db-cxx-devel |
ef894a9c | 148 | %endif |
9ff799b6 JB |
149 | Conflicts: db-devel < 4.1.25-3 |
150 | ||
151 | %description cxx-devel | |
152 | Header files for db-cxx library. | |
153 | ||
93b54114 JR |
154 | %description cxx-devel -l pl.UTF-8 |
155 | Pliki nagłówkowe biblioteki db-cxx. | |
9ff799b6 JB |
156 | |
157 | %package cxx-static | |
158 | Summary: Static version of db-cxx library | |
8c809823 | 159 | Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx |
9ff799b6 JB |
160 | Group: Development/Libraries |
161 | Requires: %{name}-cxx-devel = %{epoch}:%{version}-%{release} | |
ef894a9c | 162 | %if %{with default_db} |
9ff799b6 | 163 | Provides: db-cxx-static = %{version}-%{release} |
31754b2d | 164 | Obsoletes: db-cxx-static |
ef894a9c | 165 | %endif |
9ff799b6 JB |
166 | Conflicts: db-static < 4.2.50-1 |
167 | ||
168 | %description cxx-static | |
169 | Static version of db-cxx library. | |
170 | ||
93b54114 | 171 | %description cxx-static -l pl.UTF-8 |
9ff799b6 JB |
172 | Statyczna wersja biblioteki db-cxx. |
173 | ||
174 | %package java | |
175 | Summary: Berkeley database library for Java | |
8c809823 | 176 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy |
9ff799b6 | 177 | Group: Libraries |
6670a5ed | 178 | Requires: jpackage-utils |
ef894a9c | 179 | %if %{with default_db} |
9ff799b6 | 180 | Provides: db-java = %{version}-%{release} |
31754b2d | 181 | Obsoletes: db-java |
ef894a9c | 182 | %endif |
9ff799b6 JB |
183 | |
184 | %description java | |
185 | Berkeley database library for Java. | |
186 | ||
93b54114 | 187 | %description java -l pl.UTF-8 |
9ff799b6 JB |
188 | Biblioteka baz danych Berkeley dla Javy. |
189 | ||
190 | %package java-devel | |
191 | Summary: Development files for db-java library | |
8c809823 | 192 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java |
9ff799b6 JB |
193 | Group: Development/Languages/Java |
194 | Requires: %{name}-java = %{epoch}:%{version}-%{release} | |
ef894a9c | 195 | %if %{with default_db} |
9ff799b6 | 196 | Provides: db-java-devel = %{version}-%{release} |
31754b2d | 197 | Obsoletes: db-java-devel |
ef894a9c | 198 | %endif |
9ff799b6 JB |
199 | Conflicts: db-devel < 4.1.25-3 |
200 | ||
201 | %description java-devel | |
202 | Development files for db-java library. | |
203 | ||
93b54114 | 204 | %description java-devel -l pl.UTF-8 |
9ff799b6 JB |
205 | Pliki programistyczne biblioteki db-java. |
206 | ||
207 | %package tcl | |
208 | Summary: Berkeley database library for Tcl | |
8c809823 | 209 | Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl |
9ff799b6 JB |
210 | Group: Development/Languages/Tcl |
211 | Requires: tcl | |
ef894a9c | 212 | %if %{with default_db} |
9ff799b6 JB |
213 | Provides: db-tcl = %{version}-%{release} |
214 | Obsoletes: db4-tcl | |
ef894a9c | 215 | %endif |
9ff799b6 JB |
216 | |
217 | %description tcl | |
218 | Berkeley database library for Tcl. | |
219 | ||
93b54114 | 220 | %description tcl -l pl.UTF-8 |
9ff799b6 JB |
221 | Biblioteka baz danych Berkeley dla Tcl. |
222 | ||
223 | %package tcl-devel | |
224 | Summary: Development files for db-tcl library | |
8c809823 | 225 | Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl |
9ff799b6 JB |
226 | Group: Development/Languages/Tcl |
227 | Requires: %{name}-tcl = %{epoch}:%{version}-%{release} | |
ef894a9c | 228 | %if %{with default_db} |
9ff799b6 | 229 | Provides: db-tcl-devel = %{version}-%{release} |
31754b2d | 230 | Obsoletes: db-tcl-devel |
ef894a9c | 231 | %endif |
9ff799b6 JB |
232 | Conflicts: db-devel < 4.1.25-3 |
233 | ||
234 | %description tcl-devel | |
235 | Development files for db-tcl library. | |
236 | ||
93b54114 | 237 | %description tcl-devel -l pl.UTF-8 |
9ff799b6 JB |
238 | Pliki programistyczne biblioteki db-tcl. |
239 | ||
240 | %package utils | |
241 | Summary: Command line tools for managing Berkeley DB databases | |
8c809823 | 242 | Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń |
9ff799b6 JB |
243 | Group: Applications/Databases |
244 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
ef894a9c | 245 | %if %{with default_db} |
9ff799b6 | 246 | Provides: db-utils = %{version}-%{release} |
b22094af | 247 | Obsoletes: db-utils |
398a4479 | 248 | Obsoletes: db3-utils |
b22094af | 249 | Obsoletes: db4-utils |
ef894a9c | 250 | %endif |
9ff799b6 JB |
251 | |
252 | %description utils | |
253 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that | |
254 | provides embedded database support for both traditional and | |
255 | client/server applications. Berkeley DB includes B+tree, Extended | |
256 | Linear Hashing, Fixed and Variable-length record access methods, | |
257 | transactions, locking, logging, shared memory caching and database | |
258 | recovery. DB supports C, C++, Java and Perl APIs. | |
259 | ||
260 | This package contains command line tools for managing Berkeley DB | |
261 | databases. | |
262 | ||
93b54114 JR |
263 | %description utils -l pl.UTF-8 |
264 | Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych | |
265 | zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i | |
266 | klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i | |
267 | funkcje mieszające ze stałą lub zmienną wielkością rekordu, | |
268 | transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie | |
9ff799b6 JB |
269 | dla C, C++, Javy i Perla. |
270 | ||
93b54114 JR |
271 | Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii |
272 | poleceń. | |
9ff799b6 JB |
273 | |
274 | %prep | |
6a2508d3 JB |
275 | %setup -q -n db-%{ver} |
276 | # official patches | |
277 | %patchset_patch 1 %{patchlevel} | |
9ff799b6 | 278 | |
6a2508d3 | 279 | %if %{without nptl} |
9ff799b6 JB |
280 | sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac |
281 | %endif | |
282 | ||
6a2508d3 JB |
283 | sed -i -e '/AC_PROG_LIBTOOL/aLT_OUTPUT' dist/configure.ac |
284 | ||
9ff799b6 JB |
285 | %build |
286 | cd dist | |
287 | cp -f /usr/share/aclocal/libtool.m4 aclocal/libtool.ac | |
6a2508d3 JB |
288 | cp -f /usr/share/aclocal/ltoptions.m4 aclocal/ltoptions.ac |
289 | cp -f /usr/share/aclocal/ltsugar.m4 aclocal/ltsugar.ac | |
290 | cp -f /usr/share/aclocal/ltversion.m4 aclocal/ltversion.ac | |
291 | cp -f /usr/share/aclocal/lt~obsolete.m4 aclocal/lt~obsolete.ac | |
9ff799b6 | 292 | cp -f /usr/share/automake/config.sub . |
6a2508d3 | 293 | cp -f /usr/share/libtool/config/ltmain.sh . |
9ff799b6 JB |
294 | sh s_config |
295 | cd .. | |
296 | ||
12c8dea6 | 297 | %if %{with static_libs} |
9ff799b6 JB |
298 | cp -a build_unix build_unix.static |
299 | ||
300 | cd build_unix.static | |
301 | ||
302 | CC="%{__cc}" | |
303 | CXX="%{__cxx}" | |
304 | CFLAGS="%{rpmcflags}" | |
305 | CXXFLAGS="%{rpmcflags} -fno-implicit-templates" | |
b22094af | 306 | LDFLAGS="%{rpmcflags} %{rpmldflags}" |
9ff799b6 JB |
307 | export CC CXX CFLAGS CXXFLAGS LDFLAGS |
308 | ||
309 | ../dist/%configure \ | |
9ff799b6 JB |
310 | --disable-shared \ |
311 | --enable-static \ | |
004f9377 JB |
312 | --enable-compat185 \ |
313 | --enable-cxx \ | |
9ff799b6 | 314 | --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \ |
004f9377 | 315 | --enable-rpc |
9ff799b6 JB |
316 | |
317 | # (temporarily?) disabled because of compilation errors: | |
318 | # --enable-dump185 \ | |
319 | ||
320 | %{__make} library_build | |
12c8dea6 | 321 | cd .. |
322 | %endif | |
9ff799b6 | 323 | |
12c8dea6 | 324 | cd build_unix |
9ff799b6 JB |
325 | |
326 | ../dist/%configure \ | |
327 | --prefix=%{_prefix} \ | |
328 | --libdir=%{_libdir} \ | |
004f9377 JB |
329 | --enable-shared \ |
330 | --disable-static \ | |
9ff799b6 | 331 | --enable-compat185 \ |
9ff799b6 | 332 | --enable-cxx \ |
004f9377 JB |
333 | --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \ |
334 | --enable-rpc \ | |
9ff799b6 | 335 | %{?with_java:--enable-java} \ |
004f9377 | 336 | %{?with_tcl:--enable-tcl --with-tcl=/usr/lib} |
9ff799b6 JB |
337 | |
338 | %{__make} library_build \ | |
339 | TCFLAGS='-I$(builddir) -I%{_includedir}' \ | |
340 | LIBSO_LIBS="\$(LIBS)" \ | |
341 | LIBTSO_LIBS="\$(LIBS) -ltcl" | |
342 | ||
343 | %install | |
344 | rm -rf $RPM_BUILD_ROOT | |
ef894a9c | 345 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}} |
9ff799b6 JB |
346 | %if %{with java} |
347 | install -d $RPM_BUILD_ROOT%{_javadir} | |
348 | %endif | |
349 | ||
12c8dea6 | 350 | %if %{with static_libs} |
9ff799b6 | 351 | %{__make} -C build_unix.static library_install \ |
6a2508d3 | 352 | DESTDIR=$RPM_BUILD_ROOT \ |
ef894a9c JB |
353 | docdir=%{_docdir}/db-%{version}-docs \ |
354 | includedir=%{_includedir} | |
12c8dea6 | 355 | %endif |
9ff799b6 JB |
356 | |
357 | %{__make} -C build_unix library_install \ | |
9ff799b6 | 358 | DESTDIR=$RPM_BUILD_ROOT \ |
6a2508d3 | 359 | LIB_INSTALL_FILE_LIST="" \ |
ef894a9c JB |
360 | docdir=%{_docdir}/db-%{version}-docs \ |
361 | includedir=%{_includedir} | |
9ff799b6 | 362 | |
ef894a9c JB |
363 | %if %{with default_db} |
364 | install -d $RPM_BUILD_ROOT/%{_lib} | |
9ff799b6 | 365 | mv $RPM_BUILD_ROOT%{_libdir}/libdb-4.4.so $RPM_BUILD_ROOT/%{_lib} |
ef894a9c | 366 | %endif |
9ff799b6 JB |
367 | |
368 | cd $RPM_BUILD_ROOT%{_libdir} | |
ef894a9c JB |
369 | %if %{with static_libs} |
370 | mv -f libdb.a libdb-4.4.a | |
371 | mv -f libdb_cxx.a libdb_cxx-4.4.a | |
372 | %endif | |
373 | %if %{with java} | |
b22094af | 374 | mv -f $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}/db-4.4.jar |
ef894a9c JB |
375 | %endif |
376 | %if %{with default_db} | |
9ff799b6 JB |
377 | ln -sf /%{_lib}/libdb-4.4.so libdb.so |
378 | ln -sf /%{_lib}/libdb-4.4.so libdb4.so | |
379 | ln -sf /%{_lib}/libdb-4.4.so libdb-4.4.so | |
380 | ln -sf /%{_lib}/libdb-4.4.so libndbm.so | |
381 | ln -sf libdb-4.4.la libdb.la | |
382 | ln -sf libdb-4.4.la libdb4.la | |
383 | ln -sf libdb-4.4.la libndbm.la | |
ef894a9c JB |
384 | ln -sf libdb_cxx-4.4.so libdb_cxx.so |
385 | ln -sf libdb_cxx-4.4.la libdb_cxx.la | |
9ff799b6 JB |
386 | %if %{with java} |
387 | ln -sf libdb_java-4.4.la libdb_java.la | |
b22094af | 388 | ln -sf db-4.4.jar $RPM_BUILD_ROOT%{_javadir}/db.jar |
9ff799b6 JB |
389 | %endif |
390 | %if %{with tcl} | |
391 | ln -sf libdb_tcl-4.4.so libdb_tcl.so | |
392 | ln -sf libdb_tcl-4.4.la libdb_tcl.la | |
393 | %endif | |
9ff799b6 | 394 | %if %{with static_libs} |
9ff799b6 JB |
395 | ln -sf libdb-4.4.a libdb.a |
396 | ln -sf libdb-4.4.a libdb4.a | |
397 | ln -sf libdb-4.4.a libndbm.a | |
9ff799b6 JB |
398 | ln -sf libdb_cxx-4.4.a libdb_cxx.a |
399 | %endif | |
ef894a9c | 400 | %endif |
9ff799b6 JB |
401 | |
402 | sed -i "s/old_library=''/old_library='libdb-4.4.a'/" libdb-4.4.la | |
403 | sed -i "s/old_library=''/old_library='libdb_cxx-4.4.a'/" libdb_cxx-4.4.la | |
404 | ||
b22094af JB |
405 | cd - |
406 | ||
407 | cd $RPM_BUILD_ROOT%{_bindir} | |
408 | mv -f berkeley_db_svc berkeley_db_svc-4.4 | |
409 | %{?with_default_db:ln -sf berkeley_db_svc-4.4 berkeley_db_svc} | |
410 | for F in db_*; do | |
411 | Fver=$(echo $F|sed 's/db_/db4.4_/') | |
412 | mv $F $Fver | |
413 | %{?with_default_db:ln -sf $Fver $F} | |
414 | done | |
9ff799b6 JB |
415 | cd - |
416 | rm -f examples_c*/tags | |
417 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version} | |
418 | cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version} | |
419 | ||
420 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version} | |
421 | cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version} | |
422 | ||
423 | %if %{with java} | |
424 | install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version} | |
425 | cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version} | |
6a2508d3 JB |
426 | %else |
427 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/java | |
9ff799b6 JB |
428 | %endif |
429 | ||
430 | %clean | |
431 | rm -rf $RPM_BUILD_ROOT | |
432 | ||
433 | %post -p /sbin/ldconfig | |
434 | %postun -p /sbin/ldconfig | |
435 | ||
436 | %post tcl -p /sbin/ldconfig | |
437 | %postun tcl -p /sbin/ldconfig | |
438 | ||
439 | %post cxx -p /sbin/ldconfig | |
440 | %postun cxx -p /sbin/ldconfig | |
441 | ||
442 | %files | |
443 | %defattr(644,root,root,755) | |
444 | %doc LICENSE README | |
ef894a9c | 445 | %if %{with default_db} |
9ff799b6 | 446 | %attr(755,root,root) /%{_lib}/libdb-4.4.so |
ef894a9c JB |
447 | %else |
448 | %attr(755,root,root) %{_libdir}/libdb-4.4.so | |
449 | %endif | |
9ff799b6 JB |
450 | %dir %{_docdir}/db-%{version}-docs |
451 | %{_docdir}/db-%{version}-docs/sleepycat | |
452 | %{_docdir}/db-%{version}-docs/index.html | |
453 | ||
454 | %files devel | |
455 | %defattr(644,root,root,755) | |
ef894a9c JB |
456 | %{_libdir}/libdb-4.4.la |
457 | %if %{with default_db} | |
9ff799b6 JB |
458 | %attr(755,root,root) %{_libdir}/libdb-4.4.so |
459 | %attr(755,root,root) %{_libdir}/libdb4.so | |
460 | %attr(755,root,root) %{_libdir}/libdb.so | |
461 | %attr(755,root,root) %{_libdir}/libndbm.so | |
9ff799b6 JB |
462 | %{_libdir}/libdb4.la |
463 | %{_libdir}/libdb.la | |
464 | %{_libdir}/libndbm.la | |
ef894a9c JB |
465 | %else |
466 | %dir %{_includedir} | |
467 | %endif | |
9ff799b6 JB |
468 | %{_includedir}/db.h |
469 | %{_includedir}/db_185.h | |
470 | %{_docdir}/db-%{version}-docs/api_c | |
471 | %dir %{_docdir}/db-%{version}-docs/gsg | |
472 | %{_docdir}/db-%{version}-docs/gsg/C | |
473 | %dir %{_docdir}/db-%{version}-docs/gsg_txn | |
474 | %{_docdir}/db-%{version}-docs/gsg_txn/C | |
475 | %{_docdir}/db-%{version}-docs/images | |
476 | %{_docdir}/db-%{version}-docs/ref | |
477 | %{_examplesdir}/db-%{version} | |
478 | ||
479 | %if %{with static_libs} | |
480 | %files static | |
481 | %defattr(644,root,root,755) | |
482 | %{_libdir}/libdb-4.4.a | |
ef894a9c | 483 | %if %{with default_db} |
9ff799b6 JB |
484 | %{_libdir}/libdb4.a |
485 | %{_libdir}/libdb.a | |
486 | %{_libdir}/libndbm.a | |
487 | %endif | |
ef894a9c | 488 | %endif |
9ff799b6 JB |
489 | |
490 | %files cxx | |
491 | %defattr(644,root,root,755) | |
492 | %attr(755,root,root) %{_libdir}/libdb_cxx-4.4.so | |
493 | ||
494 | %files cxx-devel | |
495 | %defattr(644,root,root,755) | |
9ff799b6 | 496 | %{_libdir}/libdb_cxx-4.4.la |
ef894a9c JB |
497 | %if %{with default_db} |
498 | %attr(755,root,root) %{_libdir}/libdb_cxx.so | |
9ff799b6 | 499 | %{_libdir}/libdb_cxx.la |
ef894a9c | 500 | %endif |
9ff799b6 JB |
501 | %{_includedir}/db_cxx.h |
502 | %{_docdir}/db-%{version}-docs/api_cxx | |
503 | %{_docdir}/db-%{version}-docs/gsg/CXX | |
504 | %{_docdir}/db-%{version}-docs/gsg_txn/CXX | |
505 | %{_examplesdir}/db-cxx-%{version} | |
506 | ||
507 | %if %{with static_libs} | |
508 | %files cxx-static | |
509 | %defattr(644,root,root,755) | |
510 | %{_libdir}/libdb_cxx-4.4.a | |
ef894a9c | 511 | %if %{with default_db} |
9ff799b6 JB |
512 | %{_libdir}/libdb_cxx.a |
513 | %endif | |
ef894a9c | 514 | %endif |
9ff799b6 JB |
515 | |
516 | %if %{with java} | |
517 | %files java | |
518 | %defattr(644,root,root,755) | |
519 | %attr(755,root,root) %{_libdir}/libdb_java-4.4.so | |
b22094af JB |
520 | %{_javadir}/db-4.4.jar |
521 | %if %{with default_db} | |
9ff799b6 | 522 | %{_javadir}/db.jar |
b22094af | 523 | %endif |
9ff799b6 JB |
524 | |
525 | %files java-devel | |
526 | %defattr(644,root,root,755) | |
9ff799b6 | 527 | %{_libdir}/libdb_java-4.4.la |
ef894a9c JB |
528 | %if %{with default_db} |
529 | %attr(755,root,root) %{_libdir}/libdb_java.so | |
9ff799b6 | 530 | %{_libdir}/libdb_java.la |
ef894a9c | 531 | %endif |
9ff799b6 JB |
532 | %{_docdir}/db-%{version}-docs/collections |
533 | %{_docdir}/db-%{version}-docs/gsg/JAVA | |
534 | %{_docdir}/db-%{version}-docs/gsg_txn/JAVA | |
535 | %{_docdir}/db-%{version}-docs/java | |
536 | %{_examplesdir}/db-java-%{version} | |
537 | %endif | |
538 | ||
539 | %if %{with tcl} | |
540 | %files tcl | |
541 | %defattr(644,root,root,755) | |
542 | %attr(755,root,root) %{_libdir}/libdb_tcl-4.4.so | |
543 | ||
544 | %files tcl-devel | |
545 | %defattr(644,root,root,755) | |
9ff799b6 | 546 | %{_libdir}/libdb_tcl-4.4.la |
ef894a9c JB |
547 | %if %{with default_db} |
548 | %attr(755,root,root) %{_libdir}/libdb_tcl.so | |
9ff799b6 | 549 | %{_libdir}/libdb_tcl.la |
ef894a9c | 550 | %endif |
9ff799b6 JB |
551 | %{_docdir}/db-%{version}-docs/api_tcl |
552 | %endif | |
553 | ||
554 | %files utils | |
555 | %defattr(644,root,root,755) | |
b22094af JB |
556 | %attr(755,root,root) %{_bindir}/berkeley_db_svc-4.4 |
557 | %attr(755,root,root) %{_bindir}/db4.4_archive | |
558 | %attr(755,root,root) %{_bindir}/db4.4_checkpoint | |
559 | %attr(755,root,root) %{_bindir}/db4.4_deadlock | |
560 | %attr(755,root,root) %{_bindir}/db4.4_dump | |
561 | #%attr(755,root,root) %{_bindir}/db4.4_dump185 | |
562 | %attr(755,root,root) %{_bindir}/db4.4_hotbackup | |
563 | %attr(755,root,root) %{_bindir}/db4.4_load | |
564 | %attr(755,root,root) %{_bindir}/db4.4_printlog | |
565 | %attr(755,root,root) %{_bindir}/db4.4_recover | |
566 | %attr(755,root,root) %{_bindir}/db4.4_stat | |
567 | %attr(755,root,root) %{_bindir}/db4.4_upgrade | |
568 | %attr(755,root,root) %{_bindir}/db4.4_verify | |
569 | %if %{with default_db} | |
9ff799b6 | 570 | %attr(755,root,root) %{_bindir}/berkeley_db_svc |
b22094af JB |
571 | %attr(755,root,root) %{_bindir}/db_archive |
572 | %attr(755,root,root) %{_bindir}/db_checkpoint | |
573 | %attr(755,root,root) %{_bindir}/db_deadlock | |
574 | %attr(755,root,root) %{_bindir}/db_dump | |
575 | #%attr(755,root,root) %{_bindir}/db_dump185 | |
576 | %attr(755,root,root) %{_bindir}/db_hotbackup | |
577 | %attr(755,root,root) %{_bindir}/db_load | |
578 | %attr(755,root,root) %{_bindir}/db_printlog | |
579 | %attr(755,root,root) %{_bindir}/db_recover | |
580 | %attr(755,root,root) %{_bindir}/db_stat | |
581 | %attr(755,root,root) %{_bindir}/db_upgrade | |
582 | %attr(755,root,root) %{_bindir}/db_verify | |
583 | %endif | |
9ff799b6 | 584 | %{_docdir}/db-%{version}-docs/utility |