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