--- /dev/null
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f8285b8..2ec56ad 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -30,8 +30,8 @@ else (WIN32)
+ set(LEVELDB_PLATFORM_NAME LEVELDB_PLATFORM_POSIX)
+ endif (WIN32)
+
+-option(LEVELDB_BUILD_TESTS "Build LevelDB's unit tests" ON)
+-option(LEVELDB_BUILD_BENCHMARKS "Build LevelDB's benchmarks" ON)
++option(LEVELDB_BUILD_TESTS "Build LevelDB's unit tests" OFF)
++option(LEVELDB_BUILD_BENCHMARKS "Build LevelDB's benchmarks" OFF)
+ option(LEVELDB_INSTALL "Install LevelDB's header and library" ON)
+
+ include(CheckIncludeFile)
+@@ -296,7 +296,7 @@ if(LEVELDB_BUILD_TESTS)
+ set(build_gmock ON)
+
+ # This project is tested using GoogleTest.
+- add_subdirectory("third_party/googletest")
++# add_subdirectory("third_party/googletest")
+
+ # This project uses Google benchmark for benchmarking.
+ set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
--- /dev/null
+Name: leveldb
+Summary: A fast key-value storage library
+Version: 1.23
+Release: 1
+Group: System/Libraries
+License: BSD-2.0
+Source0: %{name}-%{version}.tar.gz
+Source1: leveldb.pc
+Source1001: leveldb.manifest
+Source1002: disable_gtest_benchmarks.patch
+
+BuildRequires: cmake
+
+%description
+LevelDB is a fast key-value storage library written at Google
+that provides an ordered mapping from string keys to string values.
+
+
+%package -n libleveldb
+Summary: A fast key-value storage library
+Group: System/Libraries
+
+%description -n libleveldb
+LevelDB is a fast key-value storage library written at Google
+that provides an ordered mapping from string keys to string values.
+
+
+%package devel
+Summary: A fast key-value storage library - Development
+Group: Development/Libraries
+Requires: libleveldb
+
+%description devel
+LevelDB is a fast key-value storage library written at Google
+that provides an ordered mapping from string keys to string values.
+
+Development Files.
+
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE1002}
+
+%build
+# LTO doesn't work with --as-needed
+export CFLAGS=$(echo $CFLAGS | sed -e '/-flto/s/as-needed/no-as-needed/')
+export CXXFLAGS=$(echo $CXXFLAGS | sed -e '/-flto/s/as-needed/no-as-needed/')
+
+mkdir build
+pushd build
+cmake -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=%{buildroot}%{_rootprefix} \
+ -DBUILD_SHARED_LIBS=True ..
+cmake --build .
+popd
+
+%install
+pushd build
+%{__make} install
+popd
+rm -rf %{buildroot}%{_libdir}/cmake
+install -D -m 644 %{SOURCE1} %{buildroot}/%{_libdir}/pkgconfig/leveldb.pc
+
+%post -p /sbin/ldconfig -n libleveldb
+
+%postun -p /sbin/ldconfig -n libleveldb
+
+
+%files -n libleveldb
+%manifest %{name}.manifest
+%license LICENSE
+%defattr(-,root,root,-)
+%{_libdir}/libleveldb.so.*
+
+
+%files devel
+%manifest %{name}.manifest
+%license LICENSE
+
+%{_libdir}/libleveldb.so
+%{_includedir}/leveldb/*.h
+%{_libdir}/pkgconfig/leveldb.pc