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