- use Obsoletes by virtual db-* packages (i.e. the "primary" db version)
[packages/db4.8.git] / db4.8.spec
CommitLineData
69840a4d
AM
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
6
7%if "%{pld_release}" == "ti"
8%bcond_without java_sun # build with gcj
9%else
10%bcond_with java_sun # build with java-sun
11%endif
12
13%include /usr/lib/rpm/macros.java
14
15%define libver 4.8
16%define ver %{libver}.24
17%define patchlevel 1
18Summary: Berkeley DB database library for C
19Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB
20Name: db4.8
21Version: %{ver}.%{patchlevel}
22Release: 1
23Epoch: 0
24License: GPL-like (see LICENSE)
25Group: Libraries
26Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz
27# Source0-md5: 147afdecf438ff99ade105a5272db158
28# %%patchset_source -f http://www.oracle.com/technology/products/berkeley-db/db/update/%{ver}/patch.%{ver}.%g 1 %{patchlevel}
29URL: http://www.oracle.com/technology/products/berkeley-db/index.html
30BuildRequires: automake
31BuildRequires: ed
32%if %{with java}
33%{!?with_java_sun:BuildRequires: java-gcj-compat-devel}
34%{?with_java_sun:BuildRequires: java-sun}
35BuildRequires: rpm >= 4.4.9-56
36BuildRequires: rpm-javaprov
37%endif
38BuildRequires: libstdc++-devel
39BuildRequires: rpmbuild(macros) >= 1.426
40BuildRequires: sed >= 4.0
41%{?with_tcl:BuildRequires: tcl-devel >= 8.4.0}
42Requires: uname(release) >= 2.6.0
43Provides: db = %{version}-%{release}
44Provides: db = %{libver}
45Obsoletes: db4
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49The Berkeley Database (Berkeley DB) is a programmatic toolkit that
50provides embedded database support for both traditional and
51client/server applications. Berkeley DB is used by many applications,
52including Python and Perl, so this should be installed on all systems.
53
54%description -l pl.UTF-8
55Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
56zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
57klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w
58Pythonie i Perlu.
59
60%package devel
61Summary: Header files for Berkeley database library
62Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database
63Group: Development/Libraries
64Requires: %{name} = %{epoch}:%{version}-%{release}
65Provides: db-devel = %{version}-%{release}
a4de0ca7 66Obsoletes: db-devel
69840a4d
AM
67Obsoletes: db3-devel
68Obsoletes: db4-devel
69840a4d
AM
69
70%description devel
71The Berkeley Database (Berkeley DB) is a programmatic toolkit that
72provides embedded database support for both traditional and
73client/server applications. Berkeley DB includes B+tree, Extended
74Linear Hashing, Fixed and Variable-length record access methods,
75transactions, locking, logging, shared memory caching and database
76recovery. DB supports C, C++, Java and Perl APIs.
77
78This package contains the header files, libraries, and documentation
79for building programs which use Berkeley DB.
80
81%description devel -l pl.UTF-8
82Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
83zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
84klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
85funkcje mieszające ze stałą lub zmienną wielkością rekordu,
86transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
87dla C, C++, Javy i Perla.
88
89Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania
90programów używających Berkeley DB.
91
92%package static
93Summary: Static libraries for Berkeley database library
94Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database
95Group: Development/Libraries
96Requires: %{name}-devel = %{epoch}:%{version}-%{release}
97Provides: db-static = %{version}-%{release}
a4de0ca7 98Obsoletes: db-static
69840a4d
AM
99Obsoletes: db3-static
100Obsoletes: db4-static
69840a4d
AM
101
102%description static
103The Berkeley Database (Berkeley DB) is a programmatic toolkit that
104provides embedded database support for both traditional and
105client/server applications. Berkeley DB includes B+tree, Extended
106Linear Hashing, Fixed and Variable-length record access methods,
107transactions, locking, logging, shared memory caching and database
108recovery. DB supports C, C++, Java and Perl APIs.
109
110This package contains the static libraries for building programs which
111use Berkeley DB.
112
113%description static -l pl.UTF-8
114Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
115zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
116klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
117funkcje mieszające ze stałą lub zmienną wielkością rekordu,
118transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
119dla C, C++, Javy i Perla.
120
121Ten pakiet zawiera statyczne biblioteki do budowania programów
122używających Berkeley DB.
123
124%package cxx
125Summary: Berkeley database library for C++
126Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
127Group: Libraries
128Provides: db-cxx = %{version}-%{release}
129Obsoletes: db4-cxx
130
131%description cxx
132Berkeley database library for C++.
133
134%description cxx -l pl.UTF-8
135Biblioteka baz danych Berkeley dla C++.
136
137%package cxx-devel
138Summary: Header files for db-cxx library
139Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx
140Group: Development/Libraries
141Requires: %{name}-cxx = %{epoch}:%{version}-%{release}
142Requires: %{name}-devel = %{epoch}:%{version}-%{release}
143Provides: db-cxx-devel = %{version}-%{release}
a4de0ca7 144Obsoletes: db-cxx-devel
69840a4d
AM
145Conflicts: db-devel < 4.1.25-3
146
147%description cxx-devel
148Header files for db-cxx library.
149
150%description cxx-devel -l pl.UTF-8
151Pliki nagłówkowe biblioteki db-cxx.
152
153%package cxx-static
154Summary: Static version of db-cxx library
155Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx
156Group: Development/Libraries
157Requires: %{name}-cxx-devel = %{epoch}:%{version}-%{release}
158Provides: db-cxx-static = %{version}-%{release}
a4de0ca7 159Obsoletes: db-cxx-static
69840a4d
AM
160Conflicts: db-static < 4.2.50-1
161
162%description cxx-static
163Static version of db-cxx library.
164
165%description cxx-static -l pl.UTF-8
166Statyczna wersja biblioteki db-cxx.
167
168%package java
169Summary: Berkeley database library for Java
170Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
171Group: Libraries
172Requires: jpackage-utils
173Provides: db-java = %{version}-%{release}
a4de0ca7
JB
174# db.jar conflicts
175Obsoletes: db-java
69840a4d
AM
176
177%description java
178Berkeley database library for Java.
179
180%description java -l pl.UTF-8
181Biblioteka baz danych Berkeley dla Javy.
182
183%package java-devel
184Summary: Development files for db-java library
185Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java
186Group: Development/Languages/Java
187Requires: %{name}-java = %{epoch}:%{version}-%{release}
188Provides: db-java-devel = %{version}-%{release}
a4de0ca7 189Obsoletes: db-java-devel
69840a4d
AM
190Conflicts: db-devel < 4.1.25-3
191
192%description java-devel
193Development files for db-java library.
194
195%description java-devel -l pl.UTF-8
196Pliki programistyczne biblioteki db-java.
197
198%package tcl
199Summary: Berkeley database library for Tcl
200Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
201Group: Development/Languages/Tcl
202Requires: tcl
203Provides: db-tcl = %{version}-%{release}
204Obsoletes: db4-tcl
205
206%description tcl
207Berkeley database library for Tcl.
208
209%description tcl -l pl.UTF-8
210Biblioteka baz danych Berkeley dla Tcl.
211
212%package tcl-devel
213Summary: Development files for db-tcl library
214Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl
215Group: Development/Languages/Tcl
216Requires: %{name}-tcl = %{epoch}:%{version}-%{release}
217Provides: db-tcl-devel = %{version}-%{release}
a4de0ca7 218Obsoletes: db-tcl-devel
69840a4d
AM
219Conflicts: db-devel < 4.1.25-3
220
221%description tcl-devel
222Development files for db-tcl library.
223
224%description tcl-devel -l pl.UTF-8
225Pliki programistyczne biblioteki db-tcl.
226
227%package utils
228Summary: Command line tools for managing Berkeley DB databases
229Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń
230Group: Applications/Databases
231Requires: %{name} = %{epoch}:%{version}-%{release}
232Provides: db-utils = %{version}-%{release}
a4de0ca7 233Obsoletes: db-utils
69840a4d
AM
234Obsoletes: db3-utils
235Obsoletes: db4-utils
236
237%description utils
238The Berkeley Database (Berkeley DB) is a programmatic toolkit that
239provides embedded database support for both traditional and
240client/server applications. Berkeley DB includes B+tree, Extended
241Linear Hashing, Fixed and Variable-length record access methods,
242transactions, locking, logging, shared memory caching and database
243recovery. DB supports C, C++, Java and Perl APIs.
244
245This package contains command line tools for managing Berkeley DB
246databases.
247
248%description utils -l pl.UTF-8
249Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
250zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
251klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
252funkcje mieszające ze stałą lub zmienną wielkością rekordu,
253transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
254dla C, C++, Javy i Perla.
255
256Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii
257poleceń.
258
259%prep
260%setup -q -n db-%{ver}
261
262# official patches
263#%%patchset_patch 1 %{patchlevel}
264
265%build
266cp -f /usr/share/automake/config.sub dist
267
268JAVACFLAGS="-source 1.5 -target 1.5"
269export JAVACFLAGS
270
271%if %{with static_libs}
272cp -a build_unix build_unix.static
273
274cd build_unix.static
275
276CC="%{__cc}"
277CXX="%{__cxx}"
278CFLAGS="%{rpmcflags}"
279CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
280LDFLAGS="%{rpmcflags} %{rpmldflags}"
281
282export CC CXX CFLAGS CXXFLAGS LDFLAGS
283
284../dist/%configure \
285 --enable-compat185 \
286 --disable-shared \
287 --enable-static \
288 --enable-posixmutexes \
289 --enable-cxx
290
291# (temporarily?) disabled because of compilation errors:
292# --enable-dump185 \
293
294%{__make} library_build
295cd ..
296%endif
297
298cd build_unix
299
300../dist/%configure \
301 --prefix=%{_prefix} \
302 --libdir=%{_libdir} \
303 --enable-compat185 \
304 --enable-posixmutexes \
305 --enable-cxx \
306 %{?with_tcl:--enable-tcl} \
307 %{?with_tcl:--with-tcl=/usr/lib} \
308 %{?with_java:--enable-java} \
309 --disable-static \
310 --enable-shared
311
312%{__make} library_build \
313 TCFLAGS='-I$(builddir) -I%{_includedir}' \
314 LIBSO_LIBS="\$(LIBS)" \
315 LIBTSO_LIBS="\$(LIBS) -ltcl"
316
317%install
318rm -rf $RPM_BUILD_ROOT
319install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir},/%{_lib}}
320%if %{with java}
321install -d $RPM_BUILD_ROOT%{_javadir}
322%endif
323
324%if %{with static_libs}
325%{__make} -C build_unix.static library_install \
326 docdir=%{_docdir}/db-%{version}-docs \
327 DESTDIR=$RPM_BUILD_ROOT
328%endif
329
330%{__make} -C build_unix library_install \
331 docdir=%{_docdir}/db-%{version}-docs \
332 DESTDIR=$RPM_BUILD_ROOT \
333 LIB_INSTALL_FILE_LIST=""
334
335mv $RPM_BUILD_ROOT%{_libdir}/libdb-%{libver}.so $RPM_BUILD_ROOT/%{_lib}
336
337cd $RPM_BUILD_ROOT%{_libdir}
338ln -sf /%{_lib}/libdb-%{libver}.so libdb.so
339ln -sf /%{_lib}/libdb-%{libver}.so libdb4.so
340ln -sf /%{_lib}/libdb-%{libver}.so libdb-%{libver}.so
341ln -sf /%{_lib}/libdb-%{libver}.so libndbm.so
342ln -sf libdb-%{libver}.la libdb.la
343ln -sf libdb-%{libver}.la libdb4.la
344ln -sf libdb-%{libver}.la libndbm.la
345%if %{with java}
346ln -sf libdb_java-%{libver}.la libdb_java.la
347mv -f $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir}
348%endif
349%if %{with tcl}
350ln -sf libdb_tcl-%{libver}.so libdb_tcl.so
351ln -sf libdb_tcl-%{libver}.la libdb_tcl.la
352%endif
353ln -sf libdb_cxx-%{libver}.la libdb_cxx.la
354%if %{with static_libs}
355mv -f libdb.a libdb-%{libver}.a
356ln -sf libdb-%{libver}.a libdb.a
357ln -sf libdb-%{libver}.a libdb4.a
358ln -sf libdb-%{libver}.a libndbm.a
359mv -f libdb_cxx.a libdb_cxx-%{libver}.a
360ln -sf libdb_cxx-%{libver}.a libdb_cxx.a
361%endif
362ln -sf libdb_cxx-%{libver}.so libdb_cxx.so
363
364sed -i "s/old_library=''/old_library='libdb-%{libver}.a'/" libdb-%{libver}.la
365sed -i "s/old_library=''/old_library='libdb_cxx-%{libver}.a'/" libdb_cxx-%{libver}.la
366
367cd -
368rm -f examples_c*/tags
369install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
370cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
371
372install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
373cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
374
375%if %{with java}
376install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
377cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
378%endif
379
380# in %doc
381rm -f $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/{index.html,license/license_db.html}
382
383# don't have csharp subpackages yet
384rm -rf $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/csharp
385
386%clean
387rm -rf $RPM_BUILD_ROOT
388
389%post -p /sbin/ldconfig
390%postun -p /sbin/ldconfig
391
392%post tcl -p /sbin/ldconfig
393%postun tcl -p /sbin/ldconfig
394
395%post cxx -p /sbin/ldconfig
396%postun cxx -p /sbin/ldconfig
397
398%files
399%defattr(644,root,root,755)
400%doc LICENSE README docs/index.html docs/license
401%attr(755,root,root) /%{_lib}/libdb-%{libver}.so
402
403%files devel
404%defattr(644,root,root,755)
405%attr(755,root,root) %{_libdir}/libdb-%{libver}.so
406%attr(755,root,root) %{_libdir}/libdb4.so
407%attr(755,root,root) %{_libdir}/libdb.so
408%attr(755,root,root) %{_libdir}/libndbm.so
409%{_libdir}/libdb-%{libver}.la
410%{_libdir}/libdb4.la
411%{_libdir}/libdb.la
412%{_libdir}/libndbm.la
413%{_includedir}/db.h
414%{_includedir}/db_185.h
415%dir %{_docdir}/db-%{version}-docs
416%dir %{_docdir}/db-%{version}-docs/api_reference
417%{_docdir}/db-%{version}-docs/api_reference/C
418%{_docdir}/db-%{version}-docs/articles
419%dir %{_docdir}/db-%{version}-docs/gsg
420%{_docdir}/db-%{version}-docs/gsg/C
421%dir %{_docdir}/db-%{version}-docs/gsg_txn
422%{_docdir}/db-%{version}-docs/gsg_txn/C
423%dir %{_docdir}/db-%{version}-docs/gsg_db_rep
424%{_docdir}/db-%{version}-docs/gsg_db_rep/C
425%{_docdir}/db-%{version}-docs/porting
426%{_docdir}/db-%{version}-docs/programmer_reference
427%{_examplesdir}/db-%{version}
428
429%if %{with static_libs}
430%files static
431%defattr(644,root,root,755)
432%{_libdir}/libdb-%{libver}.a
433%{_libdir}/libdb4.a
434%{_libdir}/libdb.a
435%{_libdir}/libndbm.a
436%endif
437
438%files cxx
439%defattr(644,root,root,755)
440%attr(755,root,root) %{_libdir}/libdb_cxx-%{libver}.so
441
442%files cxx-devel
443%defattr(644,root,root,755)
444%attr(755,root,root) %{_libdir}/libdb_cxx.so
445%{_libdir}/libdb_cxx-%{libver}.la
446%{_libdir}/libdb_cxx.la
447%{_includedir}/db_cxx.h
448%{_docdir}/db-%{version}-docs/api_reference/CXX
449%{_docdir}/db-%{version}-docs/api_reference/STL
450%{_docdir}/db-%{version}-docs/gsg/CXX
451%{_docdir}/db-%{version}-docs/gsg_txn/CXX
452%{_docdir}/db-%{version}-docs/gsg_db_rep/CXX
453%{_examplesdir}/db-cxx-%{version}
454
455%if %{with static_libs}
456%files cxx-static
457%defattr(644,root,root,755)
458%{_libdir}/libdb_cxx-%{libver}.a
459%{_libdir}/libdb_cxx.a
460%endif
461
462%if %{with java}
463%files java
464%defattr(644,root,root,755)
465%attr(755,root,root) %{_libdir}/libdb_java-%{libver}.so
466%{_javadir}/db.jar
467
468%files java-devel
469%defattr(644,root,root,755)
470%attr(755,root,root) %{_libdir}/libdb_java.so
471%{_libdir}/libdb_java-%{libver}.la
472%{_libdir}/libdb_java.la
473%{_docdir}/db-%{version}-docs/collections
474%{_docdir}/db-%{version}-docs/gsg/JAVA
475%{_docdir}/db-%{version}-docs/gsg_txn/JAVA
476%{_docdir}/db-%{version}-docs/gsg_db_rep/JAVA
477%{_docdir}/db-%{version}-docs/java
478%{_examplesdir}/db-java-%{version}
479%endif
480
481%if %{with tcl}
482%files tcl
483%defattr(644,root,root,755)
484%attr(755,root,root) %{_libdir}/libdb_tcl-%{libver}.so
485
486%files tcl-devel
487%defattr(644,root,root,755)
488%attr(755,root,root) %{_libdir}/libdb_tcl.so
489%{_libdir}/libdb_tcl-%{libver}.la
490%{_libdir}/libdb_tcl.la
491%{_docdir}/db-%{version}-docs/api_reference/TCL
492%endif
493
494%files utils
495%defattr(644,root,root,755)
496%attr(755,root,root) %{_bindir}/db*_archive
497%attr(755,root,root) %{_bindir}/db*_checkpoint
498%attr(755,root,root) %{_bindir}/db*_deadlock
499%attr(755,root,root) %{_bindir}/db*_dump
500%attr(755,root,root) %{_bindir}/db*_hotbackup
501%attr(755,root,root) %{_bindir}/db*_load
502%attr(755,root,root) %{_bindir}/db*_printlog
503%attr(755,root,root) %{_bindir}/db*_recover
504%attr(755,root,root) %{_bindir}/db*_sql
505%attr(755,root,root) %{_bindir}/db*_stat
506%attr(755,root,root) %{_bindir}/db*_upgrade
507%attr(755,root,root) %{_bindir}/db*_verify
This page took 0.127952 seconds and 4 git commands to generate.