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