X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=db5.3.spec;h=56055b3731fe5ba28bebe3ae605e55a9a4929c28;hb=70a5b309d4266cd57ec74c3c6e07ee96ae005d6c;hp=c15a86c316c1c25ade31c6fb4e31905207f32df5;hpb=1ac2c874e7ff9fd9a63dab007dba7959863e698d;p=packages%2Fdb5.3.git diff --git a/db5.3.spec b/db5.3.spec index c15a86c..56055b3 100644 --- a/db5.3.spec +++ b/db5.3.spec @@ -5,23 +5,26 @@ %bcond_without static_libs # don't build static libraries %bcond_with sqlite3 # build Sqlite3 API libraries %bcond_without default_db # don't use this db as default system db [Th uses DB 5.3] - -%include /usr/lib/rpm/macros.java +%bcond_without rpm_db # install library to rootfs for /bin/rpm %define major 5 %define libver %{major}.3 -%define ver %{libver}.21 +%define ver %{libver}.28 %define patchlevel 0 Summary: Berkeley DB database library for C Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB Name: db5.3 Version: %{ver}.%{patchlevel} -Release: 1 +Release: 7 License: BSD-like (see LICENSE) Group: Libraries #Source0Download: http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz -# Source0-md5: 3fda0b004acdaa6fa350bfc41a3b95ca +# Source0-md5: b99454564d5b4479750567031d66fe24 +Patch0: %{name}-link.patch +Patch1: %{name}-sql-features.patch +Patch2: db-5.3.28-cwd-db_config.patch +Patch3: %{name}-atomic_compare_exchange.patch URL: http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html BuildRequires: automake %if %{with java} @@ -244,7 +247,7 @@ Pliki programistyczne biblioteki db-tcl. Summary: SQL layer for Berkeley database library Summary(pl.UTF-8): Wartstwa SQL dla biblioteki baz danych Berkeley Group: Libraries -%if %{with default_bd} +%if %{with default_db} Provides: db-sql = %{version}-%{release} %endif @@ -259,7 +262,7 @@ Summary: Development files for db-sql library Summary(pl.UTF-8): Pliki programistyczne biblioteki db-sql Group: Development/Libraries Requires: %{name}-sql = %{version}-%{release} -%if %{with default_bd} +%if %{with default_db} Provides: db-sql-devel = %{version}-%{release} Obsoletes: db-sql-devel %endif @@ -367,9 +370,14 @@ poleceń. %prep %setup -q -n db-%{ver} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build cp -f /usr/share/automake/config.sub dist +cp -f /usr/share/automake/config.sub lang/sql/sqlite JAVACFLAGS="-source 1.5 -target 1.5" export JAVACFLAGS @@ -446,9 +454,10 @@ install -d $RPM_BUILD_ROOT%{_javadir} docdir=%{_docdir}/db-%{version}-docs \ includedir=%{_includedir} -%if %{with default_db} +%if %{with rpm_db} install -d $RPM_BUILD_ROOT/%{_lib} mv $RPM_BUILD_ROOT%{_libdir}/libdb-%{libver}.so $RPM_BUILD_ROOT/%{_lib} +ln -sf /%{_lib}/libdb-%{libver}.so $RPM_BUILD_ROOT%{_libdir}/libdb-%{libver}.so %endif cd $RPM_BUILD_ROOT%{_libdir} @@ -460,9 +469,8 @@ mv -f libdb_cxx.a libdb_cxx-%{libver}.a mv -f $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}/db-%{libver}.jar %endif %if %{with default_db} -ln -sf /%{_lib}/libdb-%{libver}.so libdb.so -ln -sf /%{_lib}/libdb-%{libver}.so libdb-%{libver}.so -ln -sf /%{_lib}/libdb-%{libver}.so libndbm.so +ln -sf libdb-%{libver}.so libdb.so +ln -sf libdb-%{libver}.so libndbm.so ln -sf libdb-%{libver}.la libdb.la ln -sf libdb-%{libver}.la libndbm.la ln -sf libdb_cxx-%{libver}.so libdb_cxx.so @@ -480,6 +488,23 @@ ln -sf libdb-%{libver}.a libdb.a ln -sf libdb-%{libver}.a libndbm.a ln -sf libdb_cxx-%{libver}.a libdb_cxx.a %endif +%else +%{__rm} libdb.so +%{__rm} libdb_cxx.so +%{__rm} libdb_sql.so +%{__rm} libdb_stl.so +%{__rm} libdb-%{major}.so +%{__rm} libdb_cxx-%{major}.so +%{__rm} libdb_sql-%{major}.so +%{__rm} libdb_stl-%{major}.so +%if %{with java} +%{__rm} libdb_java.so +%{__rm} libdb_java-%{major}.so +%endif +%if %{with tcl} +%{__rm} libdb_tcl.so +%{__rm} libdb_tcl-%{major}.so +%endif %endif sed -i "s/old_library=''/old_library='libdb-%{libver}.a'/" libdb-%{libver}.la @@ -535,7 +560,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc LICENSE README docs/index.html docs/license -%if %{with default_db} +%if %{with rpm_db} %attr(755,root,root) /%{_lib}/libdb-%{libver}.so %else %attr(755,root,root) %{_libdir}/libdb-%{libver}.so @@ -545,9 +570,11 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/db%{libver}_sql_codegen %{_libdir}/libdb-%{libver}.la +%if %{with rpm_db} +%attr(755,root,root) %{_libdir}/libdb-%{libver}.so +%endif %if %{with default_db} %attr(755,root,root) %{_bindir}/db_sql_codegen -%attr(755,root,root) %{_libdir}/libdb-%{libver}.so %attr(755,root,root) %{_libdir}/libdb-%{major}.so %attr(755,root,root) %{_libdir}/libdb.so %attr(755,root,root) %{_libdir}/libndbm.so