Accepting request 85343 from home:prusnak
- enable C++ bindings - spec cleanup please accept and forward to factory OBS-URL: https://build.opensuse.org/request/show/85343 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=13
This commit is contained in:
parent
37f265529f
commit
a851fcf0ca
@ -8,4 +8,3 @@ fi
|
|||||||
|
|
||||||
wget http://www.oracle.com/technology/products/berkeley-db/db/update/$VERSION/patch.$VERSION.html -r -l1
|
wget http://www.oracle.com/technology/products/berkeley-db/db/update/$VERSION/patch.$VERSION.html -r -l1
|
||||||
for file in `find www.oracle.com/ -name "patch\.*" | grep -v html`; do cp $file .; done
|
for file in `find www.oracle.com/ -name "patch\.*" | grep -v html`; do cp $file .; done
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 27 16:39:10 UTC 2011 - prusnak@opensuse.org
|
||||||
|
|
||||||
|
- enable C++ bindings
|
||||||
|
- spec cleanup
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 16 17:00:33 UTC 2011 - jengelh@medozas.de
|
Fri Sep 16 17:00:33 UTC 2011 - jengelh@medozas.de
|
||||||
|
|
||||||
|
125
libdb-4_8.spec
125
libdb-4_8.spec
@ -15,32 +15,30 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
# norootforbuild
|
|
||||||
|
|
||||||
|
|
||||||
Name: libdb-4_8
|
|
||||||
BuildRequires: fdupes
|
|
||||||
%define generic_name db
|
%define generic_name db
|
||||||
%define docdir %{_defaultdocdir}/%{name}
|
%define docdir %{_defaultdocdir}/%{name}
|
||||||
%define source_dir %{_datadir}/%{name}-source
|
|
||||||
Version: 4.8.30
|
|
||||||
Release: 7
|
|
||||||
%define major 4
|
%define major 4
|
||||||
%define minor 8
|
%define minor 8
|
||||||
Summary: Berkeley DB Database Library Version 4.8
|
|
||||||
Source: db-%{version}.tar.bz2
|
Name: libdb-4_8
|
||||||
Url: http://www.sleepycat.com
|
Version: %{major}.%{minor}.30
|
||||||
Patch0: db-%{version}.dif
|
Release: 1
|
||||||
License: BSD3c(or similar)
|
License: BSD3c(or similar)
|
||||||
|
Summary: Berkeley DB Database Library Version 4.8
|
||||||
|
Url: http://www.sleepycat.com
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
Source: db-%{version}.tar.bz2
|
||||||
|
Source9: getpatches
|
||||||
|
Patch0: db-%{version}.patch
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
Provides: db = %{version}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Prefix: %{_prefix}
|
|
||||||
# bug437293
|
# bug437293
|
||||||
%ifarch ppc64
|
%ifarch ppc64
|
||||||
Obsoletes: db-64bit
|
Obsoletes: db-64bit
|
||||||
%endif
|
%endif
|
||||||
#
|
|
||||||
Provides: db = %{version}
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Berkeley DB Database is a programmatic toolkit that provides
|
The Berkeley DB Database is a programmatic toolkit that provides
|
||||||
@ -48,8 +46,6 @@ database support for applications.
|
|||||||
|
|
||||||
This package contains the necessary runtime libraries.
|
This package contains the necessary runtime libraries.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package -n db-utils
|
%package -n db-utils
|
||||||
License: BSD3c(or similar)
|
License: BSD3c(or similar)
|
||||||
Summary: Command Line tools for Managing Berkeley DB Databases
|
Summary: Command Line tools for Managing Berkeley DB Databases
|
||||||
@ -62,8 +58,6 @@ database support for applications.
|
|||||||
This package contains the command line tools for managing Berkeley DB
|
This package contains the command line tools for managing Berkeley DB
|
||||||
databases.
|
databases.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package -n db-doc
|
%package -n db-doc
|
||||||
License: BSD3c(or similar)
|
License: BSD3c(or similar)
|
||||||
Summary: Documentation for Berkeley DB
|
Summary: Documentation for Berkeley DB
|
||||||
@ -79,13 +73,12 @@ database support for applications.
|
|||||||
|
|
||||||
This package contains the documentation.
|
This package contains the documentation.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
License: BSD3c(or similar)
|
License: BSD3c(or similar)
|
||||||
Summary: Development Files and Libraries for the Berkeley DB library Version 4.8
|
Summary: Development Files and Libraries for the Berkeley DB library Version 4.8
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{name} = %{version} glibc-devel
|
Requires: %{name} = %{version}
|
||||||
|
Requires: glibc-devel
|
||||||
Provides: db-devel = %{version}
|
Provides: db-devel = %{version}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
@ -94,8 +87,6 @@ database support for applications.
|
|||||||
|
|
||||||
This package contains the header files and libraries.
|
This package contains the header files and libraries.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{generic_name}-%{version}
|
%setup -q -n %{generic_name}-%{version}
|
||||||
%patch0
|
%patch0
|
||||||
@ -105,7 +96,7 @@ tar -jcf %{generic_name}-%{version}.tar.bz2 %{generic_name}-%{version}
|
|||||||
%build
|
%build
|
||||||
cd dist
|
cd dist
|
||||||
./s_config
|
./s_config
|
||||||
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
CC=gcc
|
CC=gcc
|
||||||
export CFLAGS CXXFLAGS CC
|
export CFLAGS CXXFLAGS CC
|
||||||
#
|
#
|
||||||
@ -115,86 +106,72 @@ mkdir ../build_nptl
|
|||||||
cd ../build_nptl
|
cd ../build_nptl
|
||||||
../dist/configure --prefix=%{_prefix} \
|
../dist/configure --prefix=%{_prefix} \
|
||||||
--libdir=%{_libdir} --enable-compat185 --disable-dump185 \
|
--libdir=%{_libdir} --enable-compat185 --disable-dump185 \
|
||||||
--enable-shared --disable-static --disable-cxx \
|
--enable-shared --disable-static --enable-cxx \
|
||||||
--with-mutex="POSIX/pthreads/library" \
|
--with-mutex="POSIX/pthreads/library" \
|
||||||
%{_target_cpu}-suse-linux
|
%{_target_cpu}-suse-linux
|
||||||
# Make sure O_DIRECT is really disabled (build host could have old kernel)
|
# Make sure O_DIRECT is really disabled (build host could have old kernel)
|
||||||
perl -pi -e 's/#define HAVE_O_DIRECT 1/#undef HAVE_O_DIRECT/' db_config.h
|
perl -pi -e 's/#define HAVE_O_DIRECT 1/#undef HAVE_O_DIRECT/' db_config.h
|
||||||
|
# Remove libtool predep_objects and postdep_objects wonkiness
|
||||||
# This seems to be unneeded when build with --disable-cxx
|
perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
|
||||||
## Remove libtool predep_objects and postdep_objects wonkiness
|
perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
|
||||||
#perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
|
perl -pi -e 's/-shared -nostdlib/-shared/' libtool
|
||||||
#perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
|
|
||||||
#perl -pi -e 's/-shared -nostdlib/-shared/' libtool
|
|
||||||
|
|
||||||
make %{?_smp_mflags} LIBSO_LIBS='$(LIBS)' LIBXSO_LIBS='$(LIBS)'" -L%{_libdir} -lstdc++"
|
make %{?_smp_mflags} LIBSO_LIBS='$(LIBS)' LIBXSO_LIBS='$(LIBS)'" -L%{_libdir} -lstdc++"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/db4
|
mkdir -p %{buildroot}%{_includedir}/db4
|
||||||
#mkdir -p ${RPM_BUILD_ROOT}% {source_dir}/
|
|
||||||
#
|
|
||||||
#cp % {_builddir}/% {generic_name}-% {version}.tar.bz2 ${RPM_BUILD_ROOT}% {source_dir}/
|
|
||||||
#mkdir -p $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source
|
|
||||||
#cat >>$RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source/README<<EOF
|
|
||||||
#The patches in this directory were applied to the sources.
|
|
||||||
#The sources were installed to:
|
|
||||||
#% {source_dir}/% {generic_name}-% {version}.tar.bz2
|
|
||||||
#EOF
|
|
||||||
CONFIG_ARGS=$(find . -name "config.log" -exec grep "\$ \.\./dist\/configure" {} \; | sed 's/.*configure\( --.*\)/\1/g')
|
CONFIG_ARGS=$(find . -name "config.log" -exec grep "\$ \.\./dist\/configure" {} \; | sed 's/.*configure\( --.*\)/\1/g')
|
||||||
if [ -z "$CONFIG_ARGS" ]
|
if [ -z "$CONFIG_ARGS" ]
|
||||||
then
|
then
|
||||||
echo "could not find configure arguments ... exiting"
|
echo "could not find configure arguments ... exiting"
|
||||||
exit 42
|
exit 42
|
||||||
fi
|
fi
|
||||||
#echo $CONFIG_ARGS >> $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source/configure_args.txt
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
#cp % {_sourcedir}/*patch* $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source || true
|
|
||||||
#cp % {_sourcedir}/*.dif* $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source || true
|
|
||||||
#
|
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}
|
|
||||||
cd build_nptl
|
cd build_nptl
|
||||||
make prefix=${RPM_BUILD_ROOT}%{_prefix} libdir=${RPM_BUILD_ROOT}%{_libdir} strip=true install
|
make prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} strip=true install
|
||||||
cd ..
|
cd ..
|
||||||
# make ldd happy:
|
# make ldd happy:
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_libdir}/libdb*.so
|
chmod 755 %{buildroot}%{_libdir}/libdb*.so
|
||||||
# Fix header file installation
|
# Fix header file installation
|
||||||
mv ${RPM_BUILD_ROOT}%{_includedir}/*.h ${RPM_BUILD_ROOT}%{_includedir}/db4
|
mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/db4
|
||||||
echo "#include <db4/db.h>" > ${RPM_BUILD_ROOT}%{_includedir}/db.h
|
echo "#include <db4/db.h>" > %{buildroot}%{_includedir}/db.h
|
||||||
echo "#include <db4/db_185.h>" > ${RPM_BUILD_ROOT}%{_includedir}/db_185.h
|
echo "#include <db4/db_185.h>" > %{buildroot}%{_includedir}/db_185.h
|
||||||
rm -f ${RPM_BUILD_ROOT}%{_includedir}/db4/db_cxx.h
|
echo "#include <db4/db_cxx.h>" > %{buildroot}%{_includedir}/db_cxx.h
|
||||||
# remove dangling tags symlink from examples.
|
# remove dangling tags symlink from examples.
|
||||||
rm -f examples_cxx/tags
|
rm -f examples_cxx/tags
|
||||||
rm -f examples_c/tags
|
rm -f examples_c/tags
|
||||||
# Move documentation to the right directory
|
# Move documentation to the right directory
|
||||||
mkdir -p $RPM_BUILD_ROOT%{docdir}
|
mkdir -p %{buildroot}%{docdir}
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/docs/* $RPM_BUILD_ROOT/%{docdir}
|
mv %{buildroot}%{_prefix}/docs/* %{buildroot}/%{docdir}
|
||||||
cp -a examples_c $RPM_BUILD_ROOT/%{docdir}
|
cp -a examples_cxx examples_c %{buildroot}/%{docdir}
|
||||||
cp -a LICENSE README $RPM_BUILD_ROOT/%{docdir}
|
cp -a LICENSE README %{buildroot}/%{docdir}
|
||||||
#
|
#
|
||||||
# Remove api documentation for C++, Java and TCL
|
# Remove api documentation for C++, Java and TCL
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/csharp
|
rm -rf %{buildroot}/%{docdir}/csharp
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/java
|
rm -rf %{buildroot}/%{docdir}/java
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_reference/CXX
|
rm -rf %{buildroot}/%{docdir}/api_reference/CXX
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_reference/STL
|
rm -rf %{buildroot}/%{docdir}/api_reference/STL
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_reference/TCL
|
rm -rf %{buildroot}/%{docdir}/api_reference/TCL
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/gsg*/CXX
|
rm -rf %{buildroot}/%{docdir}/gsg*/CXX
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/gsg*/JAVA
|
rm -rf %{buildroot}/%{docdir}/gsg*/JAVA
|
||||||
mv $RPM_BUILD_ROOT/%{docdir}/collections/tutorial $RPM_BUILD_ROOT/%{docdir}/
|
mv %{buildroot}/%{docdir}/collections/tutorial %{buildroot}/%{docdir}/
|
||||||
# Remove crappy *.la files
|
# Remove crappy *.la files
|
||||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
|
rm -rf %{buildroot}%{_libdir}/*.la
|
||||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/tls/*.la
|
rm -rf %{buildroot}%{_libdir}/tls/*.la
|
||||||
%fdupes $RPM_BUILD_ROOT%{_libdir}
|
%fdupes %{buildroot}%{_libdir}
|
||||||
%fdupes $RPM_BUILD_ROOT%{docdir}
|
%fdupes %{buildroot}%{docdir}
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/libdb-%{major}.%{minor}.so
|
%{_libdir}/libdb-%{major}.%{minor}.so
|
||||||
|
%{_libdir}/libdb_cxx-%{major}.%{minor}.so
|
||||||
|
|
||||||
%files -n db-doc
|
%files -n db-doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -206,6 +183,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%doc %{docdir}/articles
|
%doc %{docdir}/articles
|
||||||
%doc %{docdir}/api_reference
|
%doc %{docdir}/api_reference
|
||||||
%doc %{docdir}/examples_c
|
%doc %{docdir}/examples_c
|
||||||
|
%doc %{docdir}/examples_cxx
|
||||||
%doc %{docdir}/gsg*
|
%doc %{docdir}/gsg*
|
||||||
%doc %{docdir}/porting
|
%doc %{docdir}/porting
|
||||||
%doc %{docdir}/programmer_reference
|
%doc %{docdir}/programmer_reference
|
||||||
@ -231,14 +209,13 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%dir %{_includedir}/db4
|
%dir %{_includedir}/db4
|
||||||
%{_includedir}/db.h
|
%{_includedir}/db.h
|
||||||
%{_includedir}/db_185.h
|
%{_includedir}/db_185.h
|
||||||
|
%{_includedir}/db_cxx.h
|
||||||
%{_includedir}/db4/db.h
|
%{_includedir}/db4/db.h
|
||||||
%{_includedir}/db4/db_185.h
|
%{_includedir}/db4/db_185.h
|
||||||
|
%{_includedir}/db4/db_cxx.h
|
||||||
%{_libdir}/libdb.so
|
%{_libdir}/libdb.so
|
||||||
%{_libdir}/libdb-%{major}.so
|
%{_libdir}/libdb-%{major}.so
|
||||||
#% files source
|
%{_libdir}/libdb_cxx.so
|
||||||
#% defattr(-,root,root)
|
%{_libdir}/libdb_cxx-%{major}.so
|
||||||
#% {_defaultdocdir}/% {name}-source
|
|
||||||
#% {source_dir}
|
|
||||||
#
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 27 16:39:58 UTC 2011 - prusnak@opensuse.org
|
||||||
|
|
||||||
|
- spec cleanup
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Aug 13 03:50:05 UTC 2011 - crrodriguez@opensuse.org
|
Sat Aug 13 03:50:05 UTC 2011 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -15,46 +15,40 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
# norootforbuild
|
|
||||||
|
|
||||||
|
|
||||||
Name: libdb_java-4_8
|
|
||||||
BuildRequires: java-sdk >= 1.5 unzip update-alternatives
|
|
||||||
%define generic_name db
|
%define generic_name db
|
||||||
%define docdir %{_defaultdocdir}/%{name}
|
%define docdir %{_defaultdocdir}/%{name}
|
||||||
%define source_dir %{_datadir}/%{name}-source
|
|
||||||
Version: 4.8.30
|
|
||||||
Release: 3
|
|
||||||
%define major 4
|
%define major 4
|
||||||
%define minor 8
|
%define minor 8
|
||||||
Summary: Java Bindings for the Berkeley DB
|
|
||||||
Source: db-%{version}.tar.bz2
|
Name: libdb_java-4_8
|
||||||
Url: http://www.sleepycat.com/products/xml.shtml
|
Version: %{major}.%{minor}.30
|
||||||
Patch0: db-%{version}.dif
|
Release: 1
|
||||||
License: BSD3c(or similar)
|
License: BSD3c(or similar)
|
||||||
|
Summary: Java Bindings for the Berkeley DB
|
||||||
|
Url: http://www.sleepycat.com
|
||||||
Group: Productivity/Databases/Servers
|
Group: Productivity/Databases/Servers
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
Source: db-%{version}.tar.bz2
|
||||||
Prefix: %{_prefix}
|
Source9: getpatches
|
||||||
|
Patch0: db-%{version}.patch
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: java-sdk >= 1.5
|
||||||
|
BuildRequires: unzip
|
||||||
|
BuildRequires: update-alternatives
|
||||||
Requires: libdb-%{major}_%{minor} = %{version}
|
Requires: libdb-%{major}_%{minor} = %{version}
|
||||||
Provides: db-java = %{version}
|
Provides: db-java = %{version}
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
These are the Java bindings for the Berkeley DB. They are needed for
|
These are the Java bindings for the Berkeley DB. They are needed for
|
||||||
the Java support of db and dbxml.
|
the Java support of db and dbxml.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
|
||||||
--------
|
|
||||||
Sleepycat
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
License: BSD3c(or similar)
|
License: BSD3c(or similar)
|
||||||
Summary: Java Bindings for the Berkeley DB
|
Summary: Java Bindings for the Berkeley DB
|
||||||
Group: Productivity/Databases/Servers
|
Group: Productivity/Databases/Servers
|
||||||
Prefix: %{_prefix}
|
|
||||||
Requires: glibc-devel
|
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
Requires: glibc-devel
|
||||||
Provides: db-java-devel = %{version}
|
Provides: db-java-devel = %{version}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
@ -63,12 +57,6 @@ the Java support of db and dbxml.
|
|||||||
|
|
||||||
These are the development files.
|
These are the development files.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
|
||||||
--------
|
|
||||||
Sleepycat
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{generic_name}-%{version}
|
%setup -q -n %{generic_name}-%{version}
|
||||||
%patch0
|
%patch0
|
||||||
@ -78,7 +66,7 @@ tar -jcf %{generic_name}-%{version}.tar.bz2 %{generic_name}-%{version}
|
|||||||
%build
|
%build
|
||||||
cd dist
|
cd dist
|
||||||
./s_config
|
./s_config
|
||||||
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
CC=gcc
|
CC=gcc
|
||||||
export CFLAGS CXXFLAGS CC
|
export CFLAGS CXXFLAGS CC
|
||||||
#
|
#
|
||||||
@ -88,87 +76,75 @@ mkdir ../build_nptl
|
|||||||
cd ../build_nptl
|
cd ../build_nptl
|
||||||
../dist/configure --prefix=%{_prefix} \
|
../dist/configure --prefix=%{_prefix} \
|
||||||
--libdir=%{_libdir} --enable-compat185 --disable-dump185 \
|
--libdir=%{_libdir} --enable-compat185 --disable-dump185 \
|
||||||
--enable-java --enable-shared --disable-static --disable-cxx \
|
--enable-shared --disable-static --enable-cxx \
|
||||||
--with-mutex="POSIX/pthreads/library" JAVACFLAGS="-source 1.5 -target 1.5"\
|
--with-mutex="POSIX/pthreads/library" \
|
||||||
|
--enable-java JAVACFLAGS="-source 1.5 -target 1.5" \
|
||||||
%{_target_cpu}-suse-linux
|
%{_target_cpu}-suse-linux
|
||||||
# Make sure O_DIRECT is really disabled (build host could have old kernel)
|
# Make sure O_DIRECT is really disabled (build host could have old kernel)
|
||||||
perl -pi -e 's/#define HAVE_O_DIRECT 1/#undef HAVE_O_DIRECT/' db_config.h
|
perl -pi -e 's/#define HAVE_O_DIRECT 1/#undef HAVE_O_DIRECT/' db_config.h
|
||||||
# This seems to be unneeded when build with --disable-cxx
|
# Remove libtool predep_objects and postdep_objects wonkiness
|
||||||
## Remove libtool predep_objects and postdep_objects wonkiness
|
perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
|
||||||
#perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
|
perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
|
||||||
#perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
|
perl -pi -e 's/-shared -nostdlib/-shared/' libtool
|
||||||
#perl -pi -e 's/-shared -nostdlib/-shared/' libtool
|
|
||||||
make LIBSO_LIBS='$(LIBS)' LIBXSO_LIBS='$(LIBS)'" -L%{_libdir} -lstdc++"
|
make %{?_smp_mflags} LIBSO_LIBS='$(LIBS)' LIBXSO_LIBS='$(LIBS)'" -L%{_libdir} -lstdc++"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/db4
|
mkdir -p %{buildroot}%{_includedir}/db4
|
||||||
#mkdir -p ${RPM_BUILD_ROOT}% {source_dir}/
|
|
||||||
#
|
|
||||||
#cp % {_builddir}/% {generic_name}-% {version}.tar.bz2 ${RPM_BUILD_ROOT}% {source_dir}/
|
|
||||||
#mkdir -p $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source
|
|
||||||
#cat >>$RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source/README<<EOF
|
|
||||||
#The patches in this directory were applied to the sources.
|
|
||||||
#The sources were installed to:
|
|
||||||
#% {source_dir}/% {generic_name}-% {version}.tar.bz2
|
|
||||||
#EOF
|
|
||||||
CONFIG_ARGS=$(find . -name "config.log" -exec grep "\$ \.\./dist\/configure" {} \; | sed 's/.*configure\( --.*\)/\1/g')
|
CONFIG_ARGS=$(find . -name "config.log" -exec grep "\$ \.\./dist\/configure" {} \; | sed 's/.*configure\( --.*\)/\1/g')
|
||||||
if [ -z "$CONFIG_ARGS" ]
|
if [ -z "$CONFIG_ARGS" ]
|
||||||
then
|
then
|
||||||
echo "could not find configure arguments ... exiting"
|
echo "could not find configure arguments ... exiting"
|
||||||
exit 42
|
exit 42
|
||||||
fi
|
fi
|
||||||
#echo $CONFIG_ARGS >> $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source/configure_args.txt
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
#cp % {_sourcedir}/*patch* $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source || true
|
|
||||||
#cp % {_sourcedir}/*.dif* $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source || true
|
|
||||||
#
|
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}
|
|
||||||
cd build_nptl
|
cd build_nptl
|
||||||
make prefix=${RPM_BUILD_ROOT}%{_prefix} libdir=${RPM_BUILD_ROOT}%{_libdir} strip=true install
|
make prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} strip=true install
|
||||||
cd ..
|
cd ..
|
||||||
# make ldd happy:
|
# make ldd happy:
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_libdir}/libdb*.so
|
chmod 755 %{buildroot}%{_libdir}/libdb*.so
|
||||||
# Fix header file installation
|
# Fix header file installation
|
||||||
mv ${RPM_BUILD_ROOT}%{_includedir}/*.h ${RPM_BUILD_ROOT}%{_includedir}/db4
|
mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/db4
|
||||||
echo "#include <db4/db.h>" > ${RPM_BUILD_ROOT}%{_includedir}/db.h
|
echo "#include <db4/db.h>" > %{buildroot}%{_includedir}/db.h
|
||||||
echo "#include <db4/db_185.h>" > ${RPM_BUILD_ROOT}%{_includedir}/db_185.h
|
echo "#include <db4/db_185.h>" > %{buildroot}%{_includedir}/db_185.h
|
||||||
rm -f ${RPM_BUILD_ROOT}%{_includedir}/db4/db_cxx.h
|
echo "#include <db4/db_cxx.h>" > %{buildroot}%{_includedir}/db_cxx.h
|
||||||
# remove dangling tags symlink from examples.
|
# remove dangling tags symlink from examples.
|
||||||
rm -f examples_cxx/tags
|
rm -f examples_cxx/tags
|
||||||
rm -f examples_c/tags
|
rm -f examples_c/tags
|
||||||
# Move documentation to the right directory
|
# Move documentation to the right directory
|
||||||
mkdir -p $RPM_BUILD_ROOT%{docdir}
|
mkdir -p %{buildroot}%{docdir}
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/docs/* $RPM_BUILD_ROOT/%{docdir}
|
mv %{buildroot}%{_prefix}/docs/* %{buildroot}/%{docdir}
|
||||||
cp -a examples_cxx examples_c $RPM_BUILD_ROOT/%{docdir}
|
cp -a examples_cxx examples_c %{buildroot}/%{docdir}
|
||||||
cp -a LICENSE README $RPM_BUILD_ROOT/%{docdir}
|
cp -a LICENSE README %{buildroot}/%{docdir}
|
||||||
#
|
#
|
||||||
# Remove api documentation for Java and TCL
|
# Remove api documentation for C++, Java and TCL
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/java
|
rm -rf %{buildroot}/%{docdir}/csharp
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_java
|
rm -rf %{buildroot}/%{docdir}/java
|
||||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_tcl
|
rm -rf %{buildroot}/%{docdir}/api_reference/CXX
|
||||||
mv $RPM_BUILD_ROOT/%{docdir}/collections/tutorial $RPM_BUILD_ROOT/%{docdir}/
|
rm -rf %{buildroot}/%{docdir}/api_reference/STL
|
||||||
|
rm -rf %{buildroot}/%{docdir}/api_reference/TCL
|
||||||
|
rm -rf %{buildroot}/%{docdir}/gsg*/CXX
|
||||||
|
rm -rf %{buildroot}/%{docdir}/gsg*/JAVA
|
||||||
|
mv %{buildroot}/%{docdir}/collections/tutorial %{buildroot}/%{docdir}/
|
||||||
# Remove crappy *.la files
|
# Remove crappy *.la files
|
||||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
|
rm -rf %{buildroot}%{_libdir}/*.la
|
||||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/tls/*.la
|
rm -rf %{buildroot}%{_libdir}/tls/*.la
|
||||||
pushd $RPM_BUILD_ROOT
|
pushd %{buildroot}
|
||||||
for file in `find | grep -v "\(java\|jar\)"`;
|
for file in `find | grep -v "\(java\|jar\)"`
|
||||||
do
|
do
|
||||||
rm $file || true;
|
rm $file || true
|
||||||
done
|
done
|
||||||
rm -rf $RPM_BUILD_ROOT/%{_defaultdocdir}
|
rm -rf %{buildroot}/%{_defaultdocdir}
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_javadir}
|
mkdir -p %{buildroot}/%{_javadir}
|
||||||
mv $RPM_BUILD_ROOT/%{_libdir}/*.jar $RPM_BUILD_ROOT/%{_javadir}/db-%{version}.jar
|
mv %{buildroot}/%{_libdir}/*.jar %{buildroot}/%{_javadir}/db-%{version}.jar
|
||||||
ln -sf %{_javadir}/db-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/db.jar
|
ln -sf %{_javadir}/db-%{version}.jar %{buildroot}/%{_javadir}/db.jar
|
||||||
find . -type d -exec rmdir {} \; || true
|
|
||||||
find . -type d -exec rmdir {} \; || true
|
|
||||||
find . -type d -exec rmdir {} \; || true
|
|
||||||
find . -type d -exec rmdir {} \; || true
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -178,7 +154,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/*_g.so
|
%{_libdir}/*_g.so
|
||||||
%{_libdir}/*-%{major}.so
|
|
||||||
%{_libdir}/libdb_java.so
|
%{_libdir}/libdb_java.so
|
||||||
|
%{_libdir}/libdb_java-%{major}.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user