[mongo-cxx-driver] Initial import (#1147921).
Marek Skalický
mskalick at fedoraproject.org
Wed Oct 8 06:28:08 UTC 2014
commit 5b8b270c97764aebf889cb7512c0362c2490826f
Author: Marek Skalický <mskalick at redhat.com>
Date: Wed Oct 8 08:24:19 2014 +0200
Initial import (#1147921).
.gitignore | 1 +
mongo-cxx-driver.spec | 105 +++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 107 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..458a64e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/legacy-1.0.0-rc0.tar.gz
diff --git a/mongo-cxx-driver.spec b/mongo-cxx-driver.spec
new file mode 100644
index 0000000..1bf7685
--- /dev/null
+++ b/mongo-cxx-driver.spec
@@ -0,0 +1,105 @@
+# for better compatibility with SCL spec file
+%global pkg_name mongo-cxx-driver
+
+Name: mongo-cxx-driver
+Version: 1.0.0
+Release: 0.1.rc0%{?dist}
+Summary: A legacy C++ Driver for MongoDB
+Group: Development/Libraries
+License: ASL 2.0
+URL: https://github.com/mongodb/mongo-cxx-driver/wiki
+Source0: https://github.com/mongodb/%{pkg_name}/archive/legacy-%{version}-rc0.tar.gz
+
+# FIXME revise requires (pthread, ssl, llvm (for sanitizer), gcov (gnu
+# compiler tools test coverage), mongodb headers
+BuildRequires: boost-devel >= 1.49
+BuildRequires: openssl-devel
+BuildRequires: scons
+
+# Mongodb must run on a little-endian CPU (see bug #630898)
+ExcludeArch: ppc ppc64 %{sparc} s390 s390x
+
+Provides: libmongodb = 2.6.0-%{release}
+Obsoletes: libmongodb <= 2.4.9-8
+
+%description
+This package provides the shared library for the MongoDB legacy C++ Driver.
+
+%package -n %{pkg_name}-devel
+Summary: MongoDB header files
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+Provides: libmongodb-devel = 2.6.0-%{release}
+Obsoletes: libmongodb-devel <= 2.4.9-8
+
+%description -n %{pkg_name}-devel
+This package provides the header files for MongoDB legacy C++ driver.
+
+%prep
+# -n the name of the directory to cd after unpacking
+%setup -q -n %{name}-legacy-%{version}-rc0
+
+# CRLF -> LF
+sed -i 's/\r//' README.md
+
+# FIXME put lib dir in correct place
+# https://jira.mongodb.org/browse/SERVER-10049
+# mongoclient
+# install-mongoclient
+# check-install-mongoclient
+# clientTests
+# smokeClient
+sed -i -e "s@\$INSTALL_DIR/lib@\$INSTALL_DIR/%{_lib}@g" src/SConscript.client
+
+# versioned client library
+(pre='EnsureSConsVersion(2, 3, 0)'
+post='sharedLibEnv.AppendUnique(SHLIBVERSION="%{version}")'
+sed -i -r \
+ -e "s|([[:space:]]*)(sharedLibEnv *= *libEnv.Clone.*)|\1$pre\n\1\2\n\1$post|" \
+ -e "s|(sharedLibEnv.)Install *\(|\1InstallVersionedLib(|" \
+ src/SConscript.client)
+
+# use optflags
+(opt=$(echo "%{optflags}" | sed -r -e 's| |","|g' )
+sed -i -r -e "s|(if nix:)|\1\n\n env.Append( CCFLAGS=[\"$opt\"] )\n\n|" SConstruct)
+
+
+%build
+# see 'scons -h' for options
+scons all \
+ %{?_smp_mflags} \
+ --sharedclient \
+ --cpppath=%{_includedir}/ \
+ --libpath=%{_libdir}/ \
+ --ssl
+
+%install
+# NOTE: If install flags are not the same as in %%build,
+# it will be built twice!
+scons install-mongoclient \
+ %{?_smp_mflags} \
+ --sharedclient \
+ --prefix=%{buildroot}%{_prefix}/ \
+ --cpppath=%{_includedir}/ \
+ --libpath=%{_libdir}/ \
+ --ssl
+
+# There is no option to build without static library
+rm -f %{buildroot}%{_libdir}/libmongoclient.a
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc README.md APACHE-2.0.txt
+%{_libdir}/libmongoclient.so.*
+
+%files -n %{pkg_name}-devel
+%{_includedir}/*
+%{_libdir}/libmongoclient.so
+
+%changelog
+* Tue Sep 30 2014 Marek Skalický <mskalick at redhat.com> - 1.0.0-0.1.rc0
+- initial port
diff --git a/sources b/sources
index e69de29..fec0c29 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+cdef1141dbf1b5a1b46eed37cd1be734 legacy-1.0.0-rc0.tar.gz
More information about the scm-commits
mailing list