commit 7837bdca051e2f4895dd17c65e912ea968b30373
Author: Jan RÄ™korajski <[email protected]>
Date:   Fri Jan 18 12:33:36 2013 +0100

    - added rpm_db bcond to install library in root fs and cleanup systemdb 
bcond
    
    The only reason to install BDB to root fs is rpm.
    Therefore system db (as in libdb.so) does not need to be installed
    to root fs.

 db5.3.spec | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)
---
diff --git a/db5.3.spec b/db5.3.spec
index c15a86c..c04f920 100644
--- a/db5.3.spec
+++ b/db5.3.spec
@@ -5,8 +5,9 @@
 %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]
+%bcond_with    rpm_db          # install library to rootfs for /bin/rpm
 
-%include       /usr/lib/rpm/macros.java
+%{load:/usr/lib/rpm/macros.d/java}
 
 %define                major           5
 %define                libver          %{major}.3
@@ -16,7 +17,7 @@ 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:       2
 License:       BSD-like (see LICENSE)
 Group:         Libraries
 #Source0Download: 
http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html
@@ -446,9 +447,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 +462,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 +481,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 +553,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 +563,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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/db5.3.git/commitdiff/7837bdca051e2f4895dd17c65e912ea968b30373

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to