Browse Source

2014-12-17 Ryoichi INAGAKI <ryo1@toki.waseda.jp>

	* libdb: created compat32-*
	


git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9159 ec354946-7b23-47d6-9f5a-488ba84defc7
inagaki 8 years ago
parent
commit
d159314cd3
1 changed files with 95 additions and 21 deletions
  1. 95 21
      lib/libd/libdb/libdb-vl.spec

+ 95 - 21
lib/libd/libdb/libdb-vl.spec

@@ -1,3 +1,5 @@
+%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
+
 %define __soversion_major 5
 %define __soversion %{__soversion_major}.3
 
@@ -7,7 +9,7 @@ Summary: The Berkeley DB database library for C
 Summary(ja): C 言語用 Berkeley DB データベースライブラリ
 Name: libdb
 Version: 5.3.28
-Release: 7%{?_dist_release}
+Release: 8%{?_dist_release}
 Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
 Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
 # For mt19937db.c
@@ -211,6 +213,57 @@ client/server applications. This package contains the libraries
 for building programs which use the Berkeley DB in Java.
 %endif
 
+# compat32
+%package -n compat32-%{name}
+Summary: The Berkeley DB database library for C
+Summary(ja): C 言語用 Berkeley DB データベースライブラリ
+Group: System Environment/Libraries
+Requires: libdb = %{version}-%{release}
+
+%description -n compat32-%{name}
+The Berkeley Database (Berkeley DB) is a programmatic toolkit that
+provides embedded database support for both traditional and
+client/server applications. The Berkeley DB includes B+tree, Extended
+Linear Hashing, Fixed and Variable-length record access methods,
+transactions, locking, logging, shared memory caching, and database
+recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
+used by many applications, including Python and Perl, so this should
+be installed on all systems.
+
+%package -n compat32-%{name}-cxx
+Summary: The Berkeley DB database library for C++
+Summary(ja): C++ 言語用 Berkeley DB データベースライブラリ
+Group: System Environment/Libraries
+Requires: %{name}-cxx = %{version}-%{release}
+Requires: compat32-%{name} = %{version}-%{release}
+
+%description -n compat32-%{name}-cxx
+The Berkeley Database (Berkeley DB) is a programmatic toolkit that
+provides embedded database support for both traditional and
+client/server applications. The Berkeley DB includes B+tree, Extended
+Linear Hashing, Fixed and Variable-length record access methods,
+transactions, locking, logging, shared memory caching, and database
+recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
+used by many applications, including Python and Perl, so this should
+be installed on all systems.
+
+%package -n compat32-%{name}-devel
+Summary: C development files for the Berkeley DB library
+Summary(ja): Berkeley DB ライブラリの C 言語用開発ファイル
+Group: Development/Libraries
+Requires: compat32-%{name} = %{version}-%{release}
+Requires: %{name}-devel    = %{version}-%{release}
+Obsoletes: compat32-db4-devel
+Provides: compat32-db4-devel
+
+%description -n compat32-%{name}-devel
+The Berkeley Database (Berkeley DB) is a programmatic toolkit that
+provides embedded database support for both traditional and
+client/server applications. This package contains the header files,
+libraries, and documentation for building programs which use the
+Berkeley DB.
+
+
 %prep
 %setup -q -n db-%{version} -a 1
 cp %{SOURCE2} .
@@ -339,36 +392,38 @@ mv examples docs
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
-%post
-/sbin/ldconfig
+%post -p /sbin/ldconfig
 
-%postun
-/sbin/ldconfig
+%postun -p /sbin/ldconfig
 
-%post cxx
-/sbin/ldconfig
+%post cxx -p /sbin/ldconfig
 
-%postun cxx
-/sbin/ldconfig
+%postun cxx -p /sbin/ldconfig
 
-%post sql
-/sbin/ldconfig
+%post sql -p /sbin/ldconfig
 
-%postun sql
-/sbin/ldconfig
+%postun sql -p /sbin/ldconfig
 
-%post tcl
-/sbin/ldconfig
+%post tcl -p /sbin/ldconfig
 
-%postun tcl
-/sbin/ldconfig
+%postun tcl -p /sbin/ldconfig
 
 %if %{with java}
-%post java
-/sbin/ldconfig
+%post java -p /sbin/ldconfig
 
-%postun java
-/sbin/ldconfig
+%postun java -p /sbin/ldconfig
+
+%endif
+
+
+%if %{build_compat32}
+%post -n compat32-%{name} -p /sbin/ldconfig
+
+%postun -n compat32-%{name} -p /sbin/ldconfig
+
+%post -n compat32-%{name}-cxx -p /sbin/ldconfig
+
+%postun -n compat32-%{name}-cxx -p /sbin/ldconfig
 
 %endif
 
@@ -459,7 +514,26 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_libdir}/libdb_java.so
 %endif
 
+%if %{build_compat32}
+%files -n compat32-%{name}
+%defattr(-,root,root)
+%{_libdir}/libdb-%{__soversion}.so
+%{_libdir}/libdb-%{__soversion_major}.so
+
+%files -n compat32-%{name}-cxx
+%defattr(-,root,root)
+%{_libdir}/libdb_cxx-%{__soversion}.so
+%{_libdir}/libdb_cxx-%{__soversion_major}.so
+
+%files -n compat32-%{name}-devel
+%defattr(-,root,root)
+%{_libdir}/libdb.so
+%endif
+
 %changelog
+* Tue Dec 16 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.3.28-8
+- added compat32 subpackages
+
 * Sat Nov  1 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.3.28-7
 - updated Summary and Group