Accepting request 85451 from devel:libraries:c_c++
- fix arm build - enable C++ bindings - spec cleanup OBS-URL: https://build.opensuse.org/request/show/85451 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libdb-4_8?expand=0&rev=8
This commit is contained in:
commit
8137e8b71c
@ -6,8 +6,8 @@
|
||||
OFS="$IFS" ; IFS=".-" ; version=(`uname -r`) ; IFS="$OIFS"
|
||||
if test ${version[0]} -lt 2 -o ${version[1]} -lt 6 -o ${version[2]} -lt 4 ; then
|
||||
echo "FATAL: kernel too old, need kernel >= 2.6.4 for this package" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
@ -8,4 +8,3 @@ fi
|
||||
|
||||
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
|
||||
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 28 18:46:43 UTC 2011 - adrian@suse.de
|
||||
|
||||
- fix arm build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
|
131
libdb-4_8.spec
131
libdb-4_8.spec
@ -15,32 +15,30 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: libdb-4_8
|
||||
BuildRequires: fdupes
|
||||
%define generic_name db
|
||||
%define docdir %{_defaultdocdir}/%{name}
|
||||
%define source_dir %{_datadir}/%{name}-source
|
||||
Version: 4.8.30
|
||||
Release: 7
|
||||
%define major 4
|
||||
%define minor 8
|
||||
Summary: Berkeley DB Database Library Version 4.8
|
||||
Source: db-%{version}.tar.bz2
|
||||
Url: http://www.sleepycat.com
|
||||
Patch0: db-%{version}.dif
|
||||
|
||||
Name: libdb-4_8
|
||||
Version: %{major}.%{minor}.30
|
||||
Release: 1
|
||||
License: BSD3c(or similar)
|
||||
Summary: Berkeley DB Database Library Version 4.8
|
||||
Url: http://www.sleepycat.com
|
||||
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
|
||||
Prefix: %{_prefix}
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: db-64bit
|
||||
%endif
|
||||
#
|
||||
Provides: db = %{version}
|
||||
|
||||
%description
|
||||
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.
|
||||
|
||||
|
||||
|
||||
%package -n db-utils
|
||||
License: BSD3c(or similar)
|
||||
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
|
||||
databases.
|
||||
|
||||
|
||||
|
||||
%package -n db-doc
|
||||
License: BSD3c(or similar)
|
||||
Summary: Documentation for Berkeley DB
|
||||
@ -79,13 +73,12 @@ database support for applications.
|
||||
|
||||
This package contains the documentation.
|
||||
|
||||
|
||||
|
||||
%package devel
|
||||
License: BSD3c(or similar)
|
||||
Summary: Development Files and Libraries for the Berkeley DB library Version 4.8
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{name} = %{version} glibc-devel
|
||||
Requires: %{name} = %{version}
|
||||
Requires: glibc-devel
|
||||
Provides: db-devel = %{version}
|
||||
|
||||
%description devel
|
||||
@ -94,8 +87,6 @@ database support for applications.
|
||||
|
||||
This package contains the header files and libraries.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{generic_name}-%{version}
|
||||
%patch0
|
||||
@ -105,7 +96,7 @@ tar -jcf %{generic_name}-%{version}.tar.bz2 %{generic_name}-%{version}
|
||||
%build
|
||||
cd dist
|
||||
./s_config
|
||||
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
CC=gcc
|
||||
export CFLAGS CXXFLAGS CC
|
||||
#
|
||||
@ -115,86 +106,76 @@ mkdir ../build_nptl
|
||||
cd ../build_nptl
|
||||
../dist/configure --prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} --enable-compat185 --disable-dump185 \
|
||||
--enable-shared --disable-static --disable-cxx \
|
||||
--with-mutex="POSIX/pthreads/library" \
|
||||
--enable-shared --disable-static --enable-cxx \
|
||||
--with-mutex="POSIX/pthreads/library" \
|
||||
%ifarch %arm
|
||||
%{_target_cpu}-suse-linux-gnueabi
|
||||
%else
|
||||
%{_target_cpu}-suse-linux
|
||||
%endif
|
||||
# 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
|
||||
|
||||
# This seems to be unneeded when build with --disable-cxx
|
||||
## Remove libtool predep_objects and postdep_objects wonkiness
|
||||
#perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
|
||||
#perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
|
||||
#perl -pi -e 's/-shared -nostdlib/-shared/' libtool
|
||||
# Remove libtool predep_objects and postdep_objects wonkiness
|
||||
perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' 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++"
|
||||
|
||||
%install
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_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
|
||||
mkdir -p %{buildroot}%{_includedir}/db4
|
||||
CONFIG_ARGS=$(find . -name "config.log" -exec grep "\$ \.\./dist\/configure" {} \; | sed 's/.*configure\( --.*\)/\1/g')
|
||||
if [ -z "$CONFIG_ARGS" ]
|
||||
then
|
||||
echo "could not find configure arguments ... exiting"
|
||||
exit 42
|
||||
fi
|
||||
#echo $CONFIG_ARGS >> $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source/configure_args.txt
|
||||
#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}
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
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 ..
|
||||
# make ldd happy:
|
||||
chmod 755 $RPM_BUILD_ROOT%{_libdir}/libdb*.so
|
||||
chmod 755 %{buildroot}%{_libdir}/libdb*.so
|
||||
# Fix header file installation
|
||||
mv ${RPM_BUILD_ROOT}%{_includedir}/*.h ${RPM_BUILD_ROOT}%{_includedir}/db4
|
||||
echo "#include <db4/db.h>" > ${RPM_BUILD_ROOT}%{_includedir}/db.h
|
||||
echo "#include <db4/db_185.h>" > ${RPM_BUILD_ROOT}%{_includedir}/db_185.h
|
||||
rm -f ${RPM_BUILD_ROOT}%{_includedir}/db4/db_cxx.h
|
||||
mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/db4
|
||||
echo "#include <db4/db.h>" > %{buildroot}%{_includedir}/db.h
|
||||
echo "#include <db4/db_185.h>" > %{buildroot}%{_includedir}/db_185.h
|
||||
echo "#include <db4/db_cxx.h>" > %{buildroot}%{_includedir}/db_cxx.h
|
||||
# remove dangling tags symlink from examples.
|
||||
rm -f examples_cxx/tags
|
||||
rm -f examples_c/tags
|
||||
# Move documentation to the right directory
|
||||
mkdir -p $RPM_BUILD_ROOT%{docdir}
|
||||
mv $RPM_BUILD_ROOT%{_prefix}/docs/* $RPM_BUILD_ROOT/%{docdir}
|
||||
cp -a examples_c $RPM_BUILD_ROOT/%{docdir}
|
||||
cp -a LICENSE README $RPM_BUILD_ROOT/%{docdir}
|
||||
mkdir -p %{buildroot}%{docdir}
|
||||
mv %{buildroot}%{_prefix}/docs/* %{buildroot}/%{docdir}
|
||||
cp -a examples_cxx examples_c %{buildroot}/%{docdir}
|
||||
cp -a LICENSE README %{buildroot}/%{docdir}
|
||||
#
|
||||
# Remove api documentation for C++, Java and TCL
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/csharp
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/java
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_reference/CXX
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_reference/STL
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_reference/TCL
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/gsg*/CXX
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/gsg*/JAVA
|
||||
mv $RPM_BUILD_ROOT/%{docdir}/collections/tutorial $RPM_BUILD_ROOT/%{docdir}/
|
||||
rm -rf %{buildroot}/%{docdir}/csharp
|
||||
rm -rf %{buildroot}/%{docdir}/java
|
||||
rm -rf %{buildroot}/%{docdir}/api_reference/CXX
|
||||
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
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/tls/*.la
|
||||
%fdupes $RPM_BUILD_ROOT%{_libdir}
|
||||
%fdupes $RPM_BUILD_ROOT%{docdir}
|
||||
rm -rf %{buildroot}%{_libdir}/*.la
|
||||
rm -rf %{buildroot}%{_libdir}/tls/*.la
|
||||
%fdupes %{buildroot}%{_libdir}
|
||||
%fdupes %{buildroot}%{docdir}
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libdb-%{major}.%{minor}.so
|
||||
%{_libdir}/libdb_cxx-%{major}.%{minor}.so
|
||||
|
||||
%files -n db-doc
|
||||
%defattr(-,root,root)
|
||||
@ -206,6 +187,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%doc %{docdir}/articles
|
||||
%doc %{docdir}/api_reference
|
||||
%doc %{docdir}/examples_c
|
||||
%doc %{docdir}/examples_cxx
|
||||
%doc %{docdir}/gsg*
|
||||
%doc %{docdir}/porting
|
||||
%doc %{docdir}/programmer_reference
|
||||
@ -231,14 +213,13 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%dir %{_includedir}/db4
|
||||
%{_includedir}/db.h
|
||||
%{_includedir}/db_185.h
|
||||
%{_includedir}/db_cxx.h
|
||||
%{_includedir}/db4/db.h
|
||||
%{_includedir}/db4/db_185.h
|
||||
%{_includedir}/db4/db_cxx.h
|
||||
%{_libdir}/libdb.so
|
||||
%{_libdir}/libdb-%{major}.so
|
||||
#% files source
|
||||
#% defattr(-,root,root)
|
||||
#% {_defaultdocdir}/% {name}-source
|
||||
#% {source_dir}
|
||||
#
|
||||
%{_libdir}/libdb_cxx.so
|
||||
%{_libdir}/libdb_cxx-%{major}.so
|
||||
|
||||
%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
|
||||
|
||||
|
@ -15,46 +15,40 @@
|
||||
# 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 docdir %{_defaultdocdir}/%{name}
|
||||
%define source_dir %{_datadir}/%{name}-source
|
||||
Version: 4.8.30
|
||||
Release: 3
|
||||
%define major 4
|
||||
%define minor 8
|
||||
Summary: Java Bindings for the Berkeley DB
|
||||
Source: db-%{version}.tar.bz2
|
||||
Url: http://www.sleepycat.com/products/xml.shtml
|
||||
Patch0: db-%{version}.dif
|
||||
|
||||
Name: libdb_java-4_8
|
||||
Version: %{major}.%{minor}.30
|
||||
Release: 1
|
||||
License: BSD3c(or similar)
|
||||
Summary: Java Bindings for the Berkeley DB
|
||||
Url: http://www.sleepycat.com
|
||||
Group: Productivity/Databases/Servers
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Prefix: %{_prefix}
|
||||
Source: db-%{version}.tar.bz2
|
||||
Source9: getpatches
|
||||
Patch0: db-%{version}.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: java-sdk >= 1.5
|
||||
BuildRequires: unzip
|
||||
BuildRequires: update-alternatives
|
||||
Requires: libdb-%{major}_%{minor} = %{version}
|
||||
Provides: db-java = %{version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
These are the Java bindings for the Berkeley DB. They are needed for
|
||||
the Java support of db and dbxml.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Sleepycat
|
||||
|
||||
%package devel
|
||||
License: BSD3c(or similar)
|
||||
Summary: Java Bindings for the Berkeley DB
|
||||
Group: Productivity/Databases/Servers
|
||||
Prefix: %{_prefix}
|
||||
Requires: glibc-devel
|
||||
Requires: %{name} = %{version}
|
||||
Requires: glibc-devel
|
||||
Provides: db-java-devel = %{version}
|
||||
|
||||
%description devel
|
||||
@ -63,12 +57,6 @@ the Java support of db and dbxml.
|
||||
|
||||
These are the development files.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Sleepycat
|
||||
|
||||
%prep
|
||||
%setup -q -n %{generic_name}-%{version}
|
||||
%patch0
|
||||
@ -78,7 +66,7 @@ tar -jcf %{generic_name}-%{version}.tar.bz2 %{generic_name}-%{version}
|
||||
%build
|
||||
cd dist
|
||||
./s_config
|
||||
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
CC=gcc
|
||||
export CFLAGS CXXFLAGS CC
|
||||
#
|
||||
@ -88,87 +76,79 @@ mkdir ../build_nptl
|
||||
cd ../build_nptl
|
||||
../dist/configure --prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} --enable-compat185 --disable-dump185 \
|
||||
--enable-java --enable-shared --disable-static --disable-cxx \
|
||||
--with-mutex="POSIX/pthreads/library" JAVACFLAGS="-source 1.5 -target 1.5"\
|
||||
--enable-shared --disable-static --enable-cxx \
|
||||
--with-mutex="POSIX/pthreads/library" \
|
||||
--enable-java JAVACFLAGS="-source 1.5 -target 1.5" \
|
||||
%ifarch %arm
|
||||
%{_target_cpu}-suse-linux-gnueabi
|
||||
%else
|
||||
%{_target_cpu}-suse-linux
|
||||
%endif
|
||||
# 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
|
||||
# This seems to be unneeded when build with --disable-cxx
|
||||
## Remove libtool predep_objects and postdep_objects wonkiness
|
||||
#perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
|
||||
#perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
|
||||
#perl -pi -e 's/-shared -nostdlib/-shared/' libtool
|
||||
make LIBSO_LIBS='$(LIBS)' LIBXSO_LIBS='$(LIBS)'" -L%{_libdir} -lstdc++"
|
||||
# Remove libtool predep_objects and postdep_objects wonkiness
|
||||
perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' 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++"
|
||||
|
||||
%install
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_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
|
||||
mkdir -p %{buildroot}%{_includedir}/db4
|
||||
CONFIG_ARGS=$(find . -name "config.log" -exec grep "\$ \.\./dist\/configure" {} \; | sed 's/.*configure\( --.*\)/\1/g')
|
||||
if [ -z "$CONFIG_ARGS" ]
|
||||
then
|
||||
echo "could not find configure arguments ... exiting"
|
||||
exit 42
|
||||
fi
|
||||
#echo $CONFIG_ARGS >> $RPM_BUILD_ROOT/% {_defaultdocdir}/% {name}-source/configure_args.txt
|
||||
#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}
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
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 ..
|
||||
# make ldd happy:
|
||||
chmod 755 $RPM_BUILD_ROOT%{_libdir}/libdb*.so
|
||||
chmod 755 %{buildroot}%{_libdir}/libdb*.so
|
||||
# Fix header file installation
|
||||
mv ${RPM_BUILD_ROOT}%{_includedir}/*.h ${RPM_BUILD_ROOT}%{_includedir}/db4
|
||||
echo "#include <db4/db.h>" > ${RPM_BUILD_ROOT}%{_includedir}/db.h
|
||||
echo "#include <db4/db_185.h>" > ${RPM_BUILD_ROOT}%{_includedir}/db_185.h
|
||||
rm -f ${RPM_BUILD_ROOT}%{_includedir}/db4/db_cxx.h
|
||||
mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/db4
|
||||
echo "#include <db4/db.h>" > %{buildroot}%{_includedir}/db.h
|
||||
echo "#include <db4/db_185.h>" > %{buildroot}%{_includedir}/db_185.h
|
||||
echo "#include <db4/db_cxx.h>" > %{buildroot}%{_includedir}/db_cxx.h
|
||||
# remove dangling tags symlink from examples.
|
||||
rm -f examples_cxx/tags
|
||||
rm -f examples_c/tags
|
||||
# Move documentation to the right directory
|
||||
mkdir -p $RPM_BUILD_ROOT%{docdir}
|
||||
mv $RPM_BUILD_ROOT%{_prefix}/docs/* $RPM_BUILD_ROOT/%{docdir}
|
||||
cp -a examples_cxx examples_c $RPM_BUILD_ROOT/%{docdir}
|
||||
cp -a LICENSE README $RPM_BUILD_ROOT/%{docdir}
|
||||
mkdir -p %{buildroot}%{docdir}
|
||||
mv %{buildroot}%{_prefix}/docs/* %{buildroot}/%{docdir}
|
||||
cp -a examples_cxx examples_c %{buildroot}/%{docdir}
|
||||
cp -a LICENSE README %{buildroot}/%{docdir}
|
||||
#
|
||||
# Remove api documentation for Java and TCL
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/java
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_java
|
||||
rm -rf $RPM_BUILD_ROOT/%{docdir}/api_tcl
|
||||
mv $RPM_BUILD_ROOT/%{docdir}/collections/tutorial $RPM_BUILD_ROOT/%{docdir}/
|
||||
# Remove api documentation for C++, Java and TCL
|
||||
rm -rf %{buildroot}/%{docdir}/csharp
|
||||
rm -rf %{buildroot}/%{docdir}/java
|
||||
rm -rf %{buildroot}/%{docdir}/api_reference/CXX
|
||||
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
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/tls/*.la
|
||||
pushd $RPM_BUILD_ROOT
|
||||
for file in `find | grep -v "\(java\|jar\)"`;
|
||||
rm -rf %{buildroot}%{_libdir}/*.la
|
||||
rm -rf %{buildroot}%{_libdir}/tls/*.la
|
||||
pushd %{buildroot}
|
||||
for file in `find | grep -v "\(java\|jar\)"`
|
||||
do
|
||||
rm $file || true;
|
||||
rm $file || true
|
||||
done
|
||||
rm -rf $RPM_BUILD_ROOT/%{_defaultdocdir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_javadir}
|
||||
mv $RPM_BUILD_ROOT/%{_libdir}/*.jar $RPM_BUILD_ROOT/%{_javadir}/db-%{version}.jar
|
||||
ln -sf %{_javadir}/db-%{version}.jar $RPM_BUILD_ROOT/%{_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
|
||||
rm -rf %{buildroot}/%{_defaultdocdir}
|
||||
mkdir -p %{buildroot}/%{_javadir}
|
||||
mv %{buildroot}/%{_libdir}/*.jar %{buildroot}/%{_javadir}/db-%{version}.jar
|
||||
ln -sf %{_javadir}/db-%{version}.jar %{buildroot}/%{_javadir}/db.jar
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
@ -178,7 +158,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/*_g.so
|
||||
%{_libdir}/*-%{major}.so
|
||||
%{_libdir}/libdb_java.so
|
||||
%{_libdir}/libdb_java-%{major}.so
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user