]> git.pld-linux.org Git - packages/db4.2.git/blame - db4.2.spec
- merge update to 4.2.52.5 from db@AC-branch
[packages/db4.2.git] / db4.2.spec
CommitLineData
3057fd07
JB
1#
2# Conditional build:
31bf70d6 3%bcond_with java # build db-java
db060305 4%bcond_without tcl # don't build Tcl bindings
b78c0e49 5%bcond_with pmutex # use POSIX mutexes (only process-private with linuxthreads)
b6466438 6%bcond_with nptl # use process-shared POSIX mutexes (NPTL provides full interface)
dff4a1a9 7#
b8672fed
ER
8%define ver 4.2.52
9%define patchlevel 5
10#
962ba2c7 11%{?with_nptl:%define with_pmutex 1}
6a84e094 12Summary: Berkeley DB database library for C
a8aad600 13Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB
6ce2d14d 14Name: db4.2
b8672fed 15Version: %{ver}.%{patchlevel}
6ce2d14d 16Release: 1
6a84e094 17License: Sleepycat public license (GPL-like, see LICENSE)
034387f5 18Group: Libraries
ab1ed248 19# alternative site (sometimes working): http://www.berkeleydb.com/
b8672fed
ER
20#Source0Download: http://www.sleepycat.com/download/
21Source0: http://www.sleepycat.com/update/snapshot/db-%{ver}.tar.gz
6a84e094 22# Source0-md5: cbc77517c9278cdb47613ce8cb55779f
b8672fed 23%patchset_source -f http://www.oracle.com/technology/products/berkeley-db/db/update/%{ver}/patch.%{ver}.%g 1 %{patchlevel}
6ce2d14d 24Patch0: db-so-suffix.patch
b8672fed
ER
25Patch1: %{name}-amd64-fastmutex.patch
26URL: http://www.oracle.com/technology/software/products/berkeley-db/db/index.html
7be21e95 27BuildRequires: autoconf
4a6a9611 28BuildRequires: automake
7be21e95 29BuildRequires: ed
255ecccb 30%{?with_java:BuildRequires: jdk}
39273fda 31BuildRequires: libstdc++-devel
5aa1e73a 32BuildRequires: libtool
b8672fed 33BuildRequires: rpmbuild(macros) >= 1.426
30e195ec 34BuildRequires: sed >= 4.0
ba0ade0b 35%{?with_tcl:BuildRequires: tcl-devel >= 8.4.0}
6d6f95e3 36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
034387f5 37
fef65e28
JB
38%define _includedir %{_prefix}/include/db4.2
39
034387f5
MM
40%description
41The Berkeley Database (Berkeley DB) is a programmatic toolkit that
42provides embedded database support for both traditional and
43client/server applications. Berkeley DB is used by many applications,
44including Python and Perl, so this should be installed on all systems.
45
d99588f0
JR
46%description -l pl.UTF-8
47Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
48zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
49klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w
034387f5
MM
50Pythonie i Perlu.
51
9a762ac3 52%package devel
53Summary: Header files for Berkeley database library
a8aad600 54Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database
9a762ac3 55Group: Development/Libraries
6d6f95e3 56Requires: %{name} = %{epoch}:%{version}-%{release}
034387f5 57
9a762ac3 58%description devel
034387f5
MM
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
9a762ac3 66This package contains the header files, libraries, and documentation
67for building programs which use Berkeley DB.
034387f5 68
d99588f0
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
034387f5
MM
75dla C, C++, Javy i Perla.
76
d99588f0
JR
77Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania
78programów używających Berkeley DB.
034387f5 79
9a762ac3 80%package static
81Summary: Static libraries for Berkeley database library
a8aad600 82Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database
9a762ac3 83Group: Development/Libraries
6d6f95e3 84Requires: %{name}-devel = %{epoch}:%{version}-%{release}
034387f5 85
9a762ac3 86%description static
87The Berkeley Database (Berkeley DB) is a programmatic toolkit that
88provides embedded database support for both traditional and
89client/server applications. Berkeley DB includes B+tree, Extended
90Linear Hashing, Fixed and Variable-length record access methods,
91transactions, locking, logging, shared memory caching and database
92recovery. DB supports C, C++, Java and Perl APIs.
034387f5 93
9a762ac3 94This package contains the static libraries for building programs which
95use Berkeley DB.
96
d99588f0
JR
97%description static -l pl.UTF-8
98Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
99zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
100klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
101funkcje mieszające ze stałą lub zmienną wielkością rekordu,
102transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
9a762ac3 103dla C, C++, Javy i Perla.
104
d99588f0
JR
105Ten pakiet zawiera statyczne biblioteki do budowania programów
106używających Berkeley DB.
034387f5
MM
107
108%package cxx
109Summary: Berkeley database library for C++
a8aad600 110Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
034387f5
MM
111Group: Libraries
112
113%description cxx
114Berkeley database library for C++.
115
d99588f0 116%description cxx -l pl.UTF-8
034387f5
MM
117Biblioteka baz danych Berkeley dla C++.
118
9a762ac3 119%package cxx-devel
13f761d0 120Summary: Header files for db-cxx library
a8aad600 121Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx
13f761d0 122Group: Development/Libraries
6d6f95e3
JB
123Requires: %{name}-cxx = %{epoch}:%{version}-%{release}
124Requires: %{name}-devel = %{epoch}:%{version}-%{release}
9a6266c1 125Conflicts: db-devel < 4.1.25-3
9a762ac3 126
127%description cxx-devel
13f761d0 128Header files for db-cxx library.
9a762ac3 129
d99588f0
JR
130%description cxx-devel -l pl.UTF-8
131Pliki nagłówkowe biblioteki db-cxx.
13f761d0
JB
132
133%package cxx-static
134Summary: Static version of db-cxx library
a8aad600 135Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx
13f761d0 136Group: Development/Libraries
6d6f95e3 137Requires: %{name}-cxx-devel = %{epoch}:%{version}-%{release}
13f761d0
JB
138Conflicts: db-static < 4.2.50-1
139
140%description cxx-static
141Static version of db-cxx library.
142
d99588f0 143%description cxx-static -l pl.UTF-8
13f761d0 144Statyczna wersja biblioteki db-cxx.
9a762ac3 145
034387f5
MM
146%package java
147Summary: Berkeley database library for Java
a8aad600 148Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
034387f5 149Group: Libraries
b2d82b31 150Requires: jpackage-utils
034387f5
MM
151
152%description java
153Berkeley database library for Java.
154
d99588f0 155%description java -l pl.UTF-8
b0636d8f 156Biblioteka baz danych Berkeley dla Javy.
034387f5 157
3b6565e7 158%package java-devel
0a68fb05 159Summary: Development files for db-java library
a8aad600 160Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java
0a68fb05 161Group: Development/Languages/Java
6d6f95e3 162Requires: %{name}-java = %{epoch}:%{version}-%{release}
0a68fb05 163Conflicts: db-devel < 4.1.25-3
3b6565e7
AM
164
165%description java-devel
166Development files for db-java library.
167
d99588f0 168%description java-devel -l pl.UTF-8
3b6565e7
AM
169Pliki programistyczne biblioteki db-java.
170
9a762ac3 171%package tcl
db060305 172Summary: Berkeley database library for Tcl
a8aad600 173Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
9a762ac3 174Group: Development/Languages/Tcl
034387f5 175
9a762ac3 176%description tcl
db060305 177Berkeley database library for Tcl.
034387f5 178
d99588f0 179%description tcl -l pl.UTF-8
db060305 180Biblioteka baz danych Berkeley dla Tcl.
034387f5 181
9a762ac3 182%package tcl-devel
13f761d0 183Summary: Development files for db-tcl library
a8aad600 184Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl
9a762ac3 185Group: Development/Languages/Tcl
6d6f95e3 186Requires: %{name}-tcl = %{epoch}:%{version}-%{release}
9a6266c1 187Conflicts: db-devel < 4.1.25-3
034387f5 188
9a762ac3 189%description tcl-devel
13f761d0 190Development files for db-tcl library.
034387f5 191
d99588f0 192%description tcl-devel -l pl.UTF-8
13f761d0 193Pliki programistyczne biblioteki db-tcl.
034387f5 194
9a762ac3 195%package utils
196Summary: Command line tools for managing Berkeley DB databases
a8aad600 197Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń
9a762ac3 198Group: Applications/Databases
6d6f95e3 199Requires: %{name} = %{epoch}:%{version}-%{release}
9a762ac3 200
201%description utils
034387f5
MM
202The Berkeley Database (Berkeley DB) is a programmatic toolkit that
203provides embedded database support for both traditional and
204client/server applications. Berkeley DB includes B+tree, Extended
205Linear Hashing, Fixed and Variable-length record access methods,
206transactions, locking, logging, shared memory caching and database
207recovery. DB supports C, C++, Java and Perl APIs.
208
9a762ac3 209This package contains command line tools for managing Berkeley DB
210databases.
034387f5 211
d99588f0
JR
212%description utils -l pl.UTF-8
213Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
214zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
215klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
216funkcje mieszające ze stałą lub zmienną wielkością rekordu,
217transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
034387f5
MM
218dla C, C++, Javy i Perla.
219
d99588f0
JR
220Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii
221poleceń.
034387f5
MM
222
223%prep
b8672fed
ER
224%setup -q -n db-%{ver}
225
226# official patches
227%patchset_patch 1 %{patchlevel}
228
3b6565e7 229%patch0 -p1
b8672fed 230%patch1 -p1
034387f5 231
b8672fed 232%if %{without nptl}
b6466438
JB
233sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac
234%endif
235
034387f5 236%build
5626bd8a 237cd dist
e5f04b5b 238cp -f /usr/share/aclocal/libtool.m4 aclocal/libtool.ac
239cp -f /usr/share/automake/config.sub .
240cp -f /usr/share/libtool/ltmain.sh .
5626bd8a 241sh s_config
242cd ..
243
034387f5
MM
244cp -a build_unix build_unix.static
245
246cd build_unix.static
247
b0636d8f
JB
248CC="%{__cc}"
249CXX="%{__cxx}"
13f761d0 250CFLAGS="%{rpmcflags}"
041330fe 251CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
b78c0e49 252LDFLAGS="%{rpmldflags}"
030a9442 253export CC CXX CFLAGS CXXFLAGS LDFLAGS
b0636d8f 254
ec4ae9e3 255../dist/%configure \
034387f5
MM
256 --enable-compat185 \
257 --disable-shared \
258 --enable-static \
259 --enable-rpc \
b78c0e49 260 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
034387f5
MM
261 --enable-cxx
262
263# (temporarily?) disabled because of compilation errors:
264# --enable-dump185 \
265
266%{__make} library_build
267
268cd ../build_unix
269
ec4ae9e3 270../dist/%configure \
034387f5 271 --prefix=%{_prefix} \
28933d3f 272 --libdir=%{_libdir} \
034387f5 273 --enable-compat185 \
034387f5 274 --enable-rpc \
b78c0e49 275 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
034387f5 276 --enable-cxx \
ba0ade0b 277 %{?with_tcl:--enable-tcl} \
23518a7a 278 %{?with_tcl:--with-tcl=/usr/lib} \
ba0ade0b
AF
279 %{?with_java:--enable-java} \
280 --disable-static \
5aa1e73a 281 --enable-shared
034387f5 282
9a6266c1 283%{__make} library_build \
b78c0e49
JB
284 TCFLAGS='-I$(builddir) -I%{_includedir}' \
285 LIBSO_LIBS="\$(LIBS)" \
286 LIBTSO_LIBS="\$(LIBS) -ltcl"
034387f5
MM
287
288%install
289rm -rf $RPM_BUILD_ROOT
6af3d3fc 290install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
37ec9b22 291%if %{with java}
33d9c786 292install -d $RPM_BUILD_ROOT%{_javadir}
37ec9b22 293%endif
034387f5 294
13f761d0 295%{__make} -C build_unix.static library_install \
fef65e28 296 DESTDIR=$RPM_BUILD_ROOT \
6ce2d14d 297 docdir=%{_docdir}/db-%{version}-docs \
fef65e28 298 includedir=%{_includedir}
034387f5 299
13f761d0 300%{__make} -C build_unix library_install \
57e2a32d 301 DESTDIR=$RPM_BUILD_ROOT \
fef65e28
JB
302 LIB_INSTALL_FILE_LIST="" \
303 docdir=%{_docdir}/db-%{version}-docs \
304 includedir=%{_includedir}
034387f5 305
6d6f95e3
JB
306cd $RPM_BUILD_ROOT%{_libdir}
307mv -f libdb.a libdb-4.2.a
308mv -f libdb_cxx.a libdb_cxx-4.2.a
309cd -
310
6ce2d14d
AM
311sed -i "s/old_library=''/old_library='libdb-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb-4.2.la
312sed -i "s/old_library=''/old_library='libdb_cxx-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb_cxx-4.2.la
313
57e2a32d 314rm -f examples_c*/tags
6ce2d14d
AM
315install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
316cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
57e2a32d 317
6ce2d14d
AM
318install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
319cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
57e2a32d
JB
320
321%if %{with java}
6ce2d14d
AM
322install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
323cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
d1234346 324mv $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}
b8672fed
ER
325%else
326rm -rf $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/java
57e2a32d 327%endif
034387f5
MM
328
329%clean
330rm -rf $RPM_BUILD_ROOT
331
0a68fb05 332%post -p /sbin/ldconfig
333%postun -p /sbin/ldconfig
034387f5
MM
334
335%post tcl -p /sbin/ldconfig
336%postun tcl -p /sbin/ldconfig
337
338%post cxx -p /sbin/ldconfig
339%postun cxx -p /sbin/ldconfig
340
341%files
342%defattr(644,root,root,755)
343%doc LICENSE README
03b8e79c 344%attr(755,root,root) %{_libdir}/libdb-4.2.so
6ce2d14d
AM
345%dir %{_docdir}/db-%{version}-docs
346%{_docdir}/db-%{version}-docs/sleepycat
347%{_docdir}/db-%{version}-docs/index.html
034387f5 348
9a762ac3 349%files devel
034387f5 350%defattr(644,root,root,755)
acc13e3c 351%{_libdir}/libdb-4.2.la
fef65e28 352%dir %{_includedir}
13f761d0
JB
353%{_includedir}/db.h
354%{_includedir}/db_185.h
6ce2d14d
AM
355%{_docdir}/db-%{version}-docs/api_c
356%{_docdir}/db-%{version}-docs/images
357%{_docdir}/db-%{version}-docs/ref
358%{_examplesdir}/db-%{version}
9a762ac3 359
360%files static
361%defattr(644,root,root,755)
13f761d0 362%{_libdir}/libdb-4.2.a
034387f5
MM
363
364%files cxx
365%defattr(644,root,root,755)
03b8e79c 366%attr(755,root,root) %{_libdir}/libdb_cxx-4.2.so
034387f5 367
9a762ac3 368%files cxx-devel
369%defattr(644,root,root,755)
9a762ac3 370%{_includedir}/db_cxx.h
acc13e3c 371%{_libdir}/libdb_cxx-4.2.la
6ce2d14d
AM
372%{_docdir}/db-%{version}-docs/api_cxx
373%{_examplesdir}/db-cxx-%{version}
9a762ac3 374
13f761d0
JB
375%files cxx-static
376%defattr(644,root,root,755)
377%{_libdir}/libdb_cxx-4.2.a
13f761d0
JB
378
379%if %{with java}
034387f5
MM
380%files java
381%defattr(644,root,root,755)
6d6f95e3 382%attr(755,root,root) %{_libdir}/libdb_java-4.2.so
33d9c786 383%{_javadir}/db.jar
3b6565e7
AM
384
385%files java-devel
386%defattr(644,root,root,755)
387%{_libdir}/libdb_java-4.2.la
6ce2d14d
AM
388%{_docdir}/db-%{version}-docs/java
389%{_examplesdir}/db-java-%{version}
034387f5
MM
390%endif
391
ba0ade0b 392%if %{with tcl}
034387f5
MM
393%files tcl
394%defattr(644,root,root,755)
13f761d0 395%attr(755,root,root) %{_libdir}/libdb_tcl-4.2.so
034387f5 396
9a762ac3 397%files tcl-devel
034387f5 398%defattr(644,root,root,755)
acc13e3c 399%{_libdir}/libdb_tcl-4.2.la
6ce2d14d 400%{_docdir}/db-%{version}-docs/api_tcl
ba0ade0b 401%endif
034387f5 402
9a762ac3 403%files utils
034387f5 404%defattr(644,root,root,755)
9a762ac3 405%attr(755,root,root) %{_bindir}/berkeley_db_svc
406%attr(755,root,root) %{_bindir}/db*_archive
407%attr(755,root,root) %{_bindir}/db*_checkpoint
408%attr(755,root,root) %{_bindir}/db*_deadlock
409%attr(755,root,root) %{_bindir}/db*_dump
410#%attr(755,root,root) %{_bindir}/db*_dump185
411%attr(755,root,root) %{_bindir}/db*_load
412%attr(755,root,root) %{_bindir}/db*_printlog
413%attr(755,root,root) %{_bindir}/db*_recover
414%attr(755,root,root) %{_bindir}/db*_stat
415%attr(755,root,root) %{_bindir}/db*_upgrade
416%attr(755,root,root) %{_bindir}/db*_verify
6ce2d14d 417%{_docdir}/db-%{version}-docs/utility
This page took 0.145062 seconds and 4 git commands to generate.