packages: db5.0/db5.0.spec - added default_db bcond (now off by default) - ...

qboosh qboosh at pld-linux.org
Sun Dec 11 18:04:35 CET 2011


Author: qboosh                       Date: Sun Dec 11 17:04:35 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added default_db bcond (now off by default)
- use versioned db.jar, provide symlink only with default_db

---- Files affected:
packages/db5.0:
   db5.0.spec (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: packages/db5.0/db5.0.spec
diff -u packages/db5.0/db5.0.spec:1.9 packages/db5.0/db5.0.spec:1.10
--- packages/db5.0/db5.0.spec:1.9	Sun Dec 11 16:00:48 2011
+++ packages/db5.0/db5.0.spec	Sun Dec 11 18:04:29 2011
@@ -4,6 +4,7 @@
 %bcond_without	java		# don't build Java bindings
 %bcond_without	tcl		# don't build Tcl bindings
 %bcond_without	static_libs	# don't build static libraries
+%bcond_with	default_db	# use this db as default system db
 
 %include	/usr/lib/rpm/macros.java
 
@@ -33,11 +34,17 @@
 BuildRequires:	sed >= 4.0
 %{?with_tcl:BuildRequires:	tcl-devel >= 8.4.0}
 Requires:	uname(release) >= 2.6.0
-Provides:	db = %{libver}
+%if %{with default_db}
 Provides:	db = %{version}-%{release}
+Provides:	db = %{libver}
 Obsoletes:	db4
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%if %{without default_db}
+%define		_includedir	%{_prefix}/include/db%{libver}
+%endif
+
 %description
 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
 provides embedded database support for both traditional and
@@ -55,10 +62,12 @@
 Summary(pl.UTF-8):	Pliki nagłówkowe do biblioteki Berkeley Database
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-devel = %{version}-%{release}
 Obsoletes:	db-devel
 Obsoletes:	db3-devel
 Obsoletes:	db4-devel
+%endif
 
 %description devel
 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
@@ -87,10 +96,12 @@
 Summary(pl.UTF-8):	Statyczne biblioteki Berkeley Database
 Group:		Development/Libraries
 Requires:	%{name}-devel = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-static = %{version}-%{release}
 Obsoletes:	db-static
 Obsoletes:	db3-static
 Obsoletes:	db4-static
+%endif
 
 %description static
 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
@@ -118,8 +129,10 @@
 Summary:	Berkeley database library for C++
 Summary(pl.UTF-8):	Biblioteka baz danych Berkeley dla C++
 Group:		Libraries
+%if %{with default_db}
 Provides:	db-cxx = %{version}-%{release}
 Obsoletes:	db4-cxx
+%endif
 
 %description cxx
 Berkeley database library for C++.
@@ -133,8 +146,10 @@
 Group:		Development/Libraries
 Requires:	%{name}-cxx = %{version}-%{release}
 Requires:	%{name}-devel = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-cxx-devel = %{version}-%{release}
 Obsoletes:	db-cxx-devel
+%endif
 Conflicts:	db-devel < 4.1.25-3
 
 %description cxx-devel
@@ -148,8 +163,10 @@
 Summary(pl.UTF-8):	Statyczna wersja biblioteki db-cxx
 Group:		Development/Libraries
 Requires:	%{name}-cxx-devel = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-cxx-static = %{version}-%{release}
 Obsoletes:	db-cxx-static
+%endif
 Conflicts:	db-static < 4.2.50-1
 
 %description cxx-static
@@ -163,9 +180,10 @@
 Summary(pl.UTF-8):	Biblioteka baz danych Berkeley dla Javy
 Group:		Libraries
 Requires:	jpackage-utils
+%if %{with default_db}
 Provides:	db-java = %{version}-%{release}
-# db.jar conflicts
 Obsoletes:	db-java
+%endif
 
 %description java
 Berkeley database library for Java.
@@ -178,8 +196,10 @@
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki db-java
 Group:		Development/Languages/Java
 Requires:	%{name}-java = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-java-devel = %{version}-%{release}
 Obsoletes:	db-java-devel
+%endif
 Conflicts:	db-devel < 4.1.25-3
 
 %description java-devel
@@ -193,8 +213,10 @@
 Summary(pl.UTF-8):	Biblioteka baz danych Berkeley dla Tcl
 Group:		Development/Languages/Tcl
 Requires:	tcl
+%if %{with default_db}
 Provides:	db-tcl = %{version}-%{release}
 Obsoletes:	db4-tcl
+%endif
 
 %description tcl
 Berkeley database library for Tcl.
@@ -207,8 +229,10 @@
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki db-tcl
 Group:		Development/Languages/Tcl
 Requires:	%{name}-tcl = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-tcl-devel = %{version}-%{release}
 Obsoletes:	db-tcl-devel
+%endif
 Conflicts:	db-devel < 4.1.25-3
 
 %description tcl-devel
@@ -221,7 +245,9 @@
 Summary:	SQL layer for Berkeley database library
 Summary(pl.UTF-8):	Wartstwa SQL dla biblioteki baz danych Berkeley
 Group:		Libraries
+%if %{with default_bd}
 Provides:	db-sql = %{version}-%{release}
+%endif
 
 %description sql
 SQL layer for Berkeley database library.
@@ -234,7 +260,10 @@
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki db-sql
 Group:		Development/Libraries
 Requires:	%{name}-sql = %{version}-%{release}
+%if %{with default_bd}
 Provides:	db-sql-devel = %{version}-%{release}
+Obsoletes:	db-sql-devel
+%endif
 
 %description sql-devel
 Development files for db-sql library.
@@ -246,7 +275,9 @@
 Summary:	STL API for Berkeley Database library
 Summary(pl.UTF-8):	API STL dla biblioteki Berkeley Database
 Group:		Libraries
+%if %{with default_db}
 Provides:	db-stl = %{version}-%{release}
+%endif
 
 %description stl
 STL API for Berkeley database library.
@@ -259,7 +290,10 @@
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki db-stl
 Group:		Development/Libraries
 Requires:	%{name}-stl = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-stl-devel = %{version}-%{release}
+Obsoletes:	db-srl-devel
+%endif
 
 %description stl-devel
 Development files for db-stl library.
@@ -271,7 +305,9 @@
 Summary:	Sqlite3 API for Berkeley Database library
 Summary(pl.UTF-8):	API Sqlite3 dla biblioteki Berkeley Database
 Group:		Libraries
+%if %{with default_db}
 Provides:	db-sqlite3 = %{version}-%{release}
+%endif
 
 %description sqlite3
 Sqlite3 API for Berkeley database library.
@@ -284,7 +320,10 @@
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki db-sqlite3
 Group:		Development/Libraries
 Requires:	%{name}-sqlite3 = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-sqlite3-devel = %{version}-%{release}
+Obsoletes:	db-sqlite3-devel
+%endif
 
 %description sqlite3-devel
 Development files for db-sqlite3 library.
@@ -298,10 +337,12 @@
 Group:		Applications/Databases
 Requires:	%{name} = %{version}-%{release}
 Requires:	%{name}-sql = %{version}-%{release}
+%if %{with default_db}
 Provides:	db-utils = %{version}-%{release}
 Obsoletes:	db-utils
 Obsoletes:	db3-utils
 Obsoletes:	db4-utils
+%endif
 
 %description utils
 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
@@ -390,7 +431,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir},/%{_lib}}
+install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
 %if %{with java}
 install -d $RPM_BUILD_ROOT%{_javadir}
 %endif
@@ -398,39 +439,51 @@
 %if %{with static_libs}
 %{__make} -C build_unix.static library_install \
 	DESTDIR=$RPM_BUILD_ROOT \
-	docdir=%{_docdir}/db-%{version}-docs
+	docdir=%{_docdir}/db-%{version}-docs \
+	includedir=%{_includedir}
 %endif
 
 %{__make} -C build_unix library_install \
 	DESTDIR=$RPM_BUILD_ROOT \
 	LIB_INSTALL_FILE_LIST="" \
-	docdir=%{_docdir}/db-%{version}-docs
+	docdir=%{_docdir}/db-%{version}-docs \
+	includedir=%{_includedir}
 
+%if %{with default_db}
+install -d $RPM_BUILD_ROOT/%{_lib}
 mv $RPM_BUILD_ROOT%{_libdir}/libdb-%{libver}.so $RPM_BUILD_ROOT/%{_lib}
+%endif
 
 cd $RPM_BUILD_ROOT%{_libdir}
+%if %{with static_libs}
+mv -f libdb.a libdb-%{libver}.a
+mv -f libdb_cxx.a libdb_cxx-%{libver}.a
+%endif
+%if %{with java}
+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}.la libdb.la
 ln -sf libdb-%{libver}.la libndbm.la
+ln -sf libdb_cxx-%{libver}.so libdb_cxx.so
+ln -sf libdb_cxx-%{libver}.la libdb_cxx.la
 %if %{with java}
 ln -sf libdb_java-%{libver}.la libdb_java.la
-mv -f $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir}
+ln -sf db-%{libver}.jar $RPM_BUILD_ROOT%{_libdir}/db.jar
 %endif
 %if %{with tcl}
 ln -sf libdb_tcl-%{libver}.so libdb_tcl.so
 ln -sf libdb_tcl-%{libver}.la libdb_tcl.la
 %endif
-ln -sf libdb_cxx-%{libver}.la libdb_cxx.la
 %if %{with static_libs}
-mv -f libdb.a libdb-%{libver}.a
 ln -sf libdb-%{libver}.a libdb.a
 ln -sf libdb-%{libver}.a libndbm.a
-mv -f libdb_cxx.a libdb_cxx-%{libver}.a
 ln -sf libdb_cxx-%{libver}.a libdb_cxx.a
 %endif
-ln -sf libdb_cxx-%{libver}.so libdb_cxx.so
+%endif
 
 sed -i "s/old_library=''/old_library='libdb-%{libver}.a'/" libdb-%{libver}.la
 sed -i "s/old_library=''/old_library='libdb_cxx-%{libver}.a'/" libdb_cxx-%{libver}.la
@@ -438,9 +491,12 @@
 cd -
 
 cd $RPM_BUILD_ROOT%{_bindir}
-mv dbsql{,-%{libver}}
+mv dbsql dbsql-%{libver}
+%{?with_default_db:ln -sf dbsql-%{libver} dbsql}
 for F in db_*; do
-  mv $F $(echo $F|sed 's/db_/db%{libver}_/')
+  Fver=$(echo $F|sed 's/db_/db%{libver}_/')
+  mv $F $Fver
+  %{?with_default_db:ln -sf $Fver $F}
 done
 cd -
 
@@ -486,18 +542,27 @@
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README docs/index.html docs/license
+%if %{with default_db}
 %attr(755,root,root) /%{_lib}/libdb-%{libver}.so
+%else
+%attr(755,root,root) %{_libdir}/libdb-%{libver}.so
+%endif
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/db%{libver}_sql_codegen
+%{_libdir}/libdb-%{libver}.la
+%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
-%{_libdir}/libdb-%{libver}.la
 %{_libdir}/libdb.la
 %{_libdir}/libndbm.la
+%else
+%dir %{_includedir}
+%endif
 %{_includedir}/db.h
 %{_includedir}/db_185.h
 %dir %{_docdir}/db-%{version}-docs
@@ -519,9 +584,11 @@
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libdb-%{libver}.a
+%if %{with default_db}
 %{_libdir}/libdb.a
 %{_libdir}/libndbm.a
 %endif
+%endif
 
 %files cxx
 %defattr(644,root,root,755)
@@ -529,10 +596,12 @@
 
 %files cxx-devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libdb_cxx.so
-%attr(755,root,root) %{_libdir}/libdb_cxx-%{major}.so
 %{_libdir}/libdb_cxx-%{libver}.la
+%if %{with default_db}
+%attr(755,root,root) %{_libdir}/libdb_cxx-%{major}.so
+%attr(755,root,root) %{_libdir}/libdb_cxx.so
 %{_libdir}/libdb_cxx.la
+%endif
 %{_includedir}/db_cxx.h
 %{_docdir}/db-%{version}-docs/api_reference/CXX
 %{_docdir}/db-%{version}-docs/api_reference/STL
@@ -545,22 +614,29 @@
 %files cxx-static
 %defattr(644,root,root,755)
 %{_libdir}/libdb_cxx-%{libver}.a
+%if %{with default_db}
 %{_libdir}/libdb_cxx.a
 %endif
+%endif
 
 %if %{with java}
 %files java
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libdb_java-%{libver}.so
 %attr(755,root,root) %{_libdir}/libdb_java-%{libver}_g.so
+%{_javadir}/db-%{libver}.jar
+%if %{with default_db}
 %{_javadir}/db.jar
+%endif
 
 %files java-devel
 %defattr(644,root,root,755)
+%{_libdir}/libdb_java-%{libver}.la
+%if %{with default_db}
 %attr(755,root,root) %{_libdir}/libdb_java.so
 %attr(755,root,root) %{_libdir}/libdb_java-%{major}.so
-%{_libdir}/libdb_java-%{libver}.la
 %{_libdir}/libdb_java.la
+%endif
 %{_docdir}/db-%{version}-docs/collections
 %{_docdir}/db-%{version}-docs/gsg/JAVA
 %{_docdir}/db-%{version}-docs/gsg_txn/JAVA
@@ -576,10 +652,12 @@
 
 %files tcl-devel
 %defattr(644,root,root,755)
+%{_libdir}/libdb_tcl-%{libver}.la
+%if %{with default_db}
 %attr(755,root,root) %{_libdir}/libdb_tcl.so
 %attr(755,root,root) %{_libdir}/libdb_tcl-%{major}.so
-%{_libdir}/libdb_tcl-%{libver}.la
 %{_libdir}/libdb_tcl.la
+%endif
 %{_docdir}/db-%{version}-docs/api_reference/TCL
 %endif
 
@@ -589,9 +667,11 @@
 
 %files sql-devel
 %defattr(644,root,root,755)
+%{_libdir}/libdb_sql-%{libver}.la
+%if %{with default_db}
 %attr(755,root,root) %{_libdir}/libdb_sql.so
 %attr(755,root,root) %{_libdir}/libdb_sql-%{major}.so
-%{_libdir}/libdb_sql-%{libver}.la
+%endif
 %{_includedir}/dbsql.h
 %{_docdir}/db-%{version}-docs/bdb-sql
 
@@ -601,9 +681,11 @@
 
 %files stl-devel
 %defattr(644,root,root,755)
+%{_libdir}/libdb_stl-%{libver}.la
+%if %{with default_db}
 %attr(755,root,root) %{_libdir}/libdb_stl.so
 %attr(755,root,root) %{_libdir}/libdb_stl-%{major}.so
-%{_libdir}/libdb_stl-%{libver}.la
+%endif
 %{_includedir}/dbstl_base_iterator.h
 %{_includedir}/dbstl_common.h
 %{_includedir}/dbstl_container.h
@@ -643,6 +725,21 @@
 %attr(755,root,root) %{_bindir}/db%{libver}_upgrade
 %attr(755,root,root) %{_bindir}/db%{libver}_verify
 %attr(755,root,root) %{_bindir}/dbsql-%{libver}
+%if %{with default_db}
+%attr(755,root,root) %{_bindir}/db_archive
+%attr(755,root,root) %{_bindir}/db_checkpoint
+%attr(755,root,root) %{_bindir}/db_deadlock
+%attr(755,root,root) %{_bindir}/db_dump
+%attr(755,root,root) %{_bindir}/db_hotbackup
+%attr(755,root,root) %{_bindir}/db_load
+%attr(755,root,root) %{_bindir}/db_log_verify
+%attr(755,root,root) %{_bindir}/db_printlog
+%attr(755,root,root) %{_bindir}/db_recover
+%attr(755,root,root) %{_bindir}/db_stat
+%attr(755,root,root) %{_bindir}/db_upgrade
+%attr(755,root,root) %{_bindir}/db_verify
+%attr(755,root,root) %{_bindir}/dbsql
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -650,6 +747,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.10  2011/12/11 17:04:29  qboosh
+- added default_db bcond (now off by default)
+- use versioned db.jar, provide symlink only with default_db
+
 Revision 1.9  2011/12/11 15:00:48  qboosh
 - new URLs, updated to 5.0.32
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/db5.0/db5.0.spec?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list