Sync from SUSE:ALP:Source:Standard:1.0 leveldb revision 3ab39b09a65daa617282e91d03b9e497
This commit is contained in:
commit
2e52edc517
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
baselibs.conf
Normal file
1
baselibs.conf
Normal file
@ -0,0 +1 @@
|
||||
libleveldb1
|
65
detect-system-gtest.patch
Normal file
65
detect-system-gtest.patch
Normal file
@ -0,0 +1,65 @@
|
||||
diff -Nur leveldb-1.23/CMakeLists.txt new/CMakeLists.txt
|
||||
--- leveldb-1.23/CMakeLists.txt 2021-02-23 21:54:37.000000000 +0100
|
||||
+++ new/CMakeLists.txt 2021-05-03 12:17:15.280336224 +0200
|
||||
@@ -289,27 +289,25 @@
|
||||
if(LEVELDB_BUILD_TESTS)
|
||||
enable_testing()
|
||||
|
||||
- # Prevent overriding the parent project's compiler/linker settings on Windows.
|
||||
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
- set(install_gtest OFF)
|
||||
- set(install_gmock OFF)
|
||||
- set(build_gmock ON)
|
||||
-
|
||||
- # This project is tested using GoogleTest.
|
||||
- add_subdirectory("third_party/googletest")
|
||||
-
|
||||
- # This project uses Google benchmark for benchmarking.
|
||||
- set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
|
||||
- set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
|
||||
- add_subdirectory("third_party/benchmark")
|
||||
-
|
||||
- # GoogleTest triggers a missing field initializers warning.
|
||||
- if(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
|
||||
- set_property(TARGET gtest
|
||||
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
|
||||
- set_property(TARGET gmock
|
||||
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
|
||||
- endif(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
|
||||
+ find_package(GTest)
|
||||
+ if(NOT GTest_FOUND)
|
||||
+ # Prevent overriding the parent project's compiler/linker settings on Windows.
|
||||
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
+ set(install_gtest OFF)
|
||||
+ set(install_gmock OFF)
|
||||
+ set(build_gmock ON)
|
||||
+
|
||||
+ # This project is tested using GoogleTest.
|
||||
+ add_subdirectory("third_party/googletest")
|
||||
+
|
||||
+ # GoogleTest triggers a missing field initializers warning.
|
||||
+ if(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
|
||||
+ set_property(TARGET gtest
|
||||
+ APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
|
||||
+ set_property(TARGET gmock
|
||||
+ APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
|
||||
+ endif(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
|
||||
+ endif()
|
||||
|
||||
function(leveldb_test test_file)
|
||||
get_filename_component(test_target_name "${test_file}" NAME_WE)
|
||||
@@ -386,6 +384,14 @@
|
||||
endif(LEVELDB_BUILD_TESTS)
|
||||
|
||||
if(LEVELDB_BUILD_BENCHMARKS)
|
||||
+ find_package(benchmark)
|
||||
+ if (NOT benchmark_FOUND)
|
||||
+ # This project uses Google benchmark for benchmarking.
|
||||
+ set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
|
||||
+ set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
|
||||
+ add_subdirectory("third_party/benchmark")
|
||||
+ endif()
|
||||
+
|
||||
function(leveldb_benchmark bench_file)
|
||||
get_filename_component(bench_target_name "${bench_file}" NAME_WE)
|
||||
|
17
enable-rtti.patch
Normal file
17
enable-rtti.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -Nur leveldb-1.23/CMakeLists.txt new/CMakeLists.txt
|
||||
--- leveldb-1.23/CMakeLists.txt 2021-02-23 21:54:37.000000000 +0100
|
||||
+++ new/CMakeLists.txt 2021-06-09 14:06:15.129760255 +0200
|
||||
@@ -71,9 +71,10 @@
|
||||
string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
||||
|
||||
+
|
||||
+ # We need RTTI support if code that uses leveldb uses typeid (e.g. ceph).
|
||||
- # Disable RTTI.
|
||||
- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
||||
+ # string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
||||
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
|
||||
# Test whether -Wthread-safety is available. See
|
BIN
leveldb-1.23.tar.gz
(Stored with Git LFS)
Normal file
BIN
leveldb-1.23.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
252
leveldb.changes
Normal file
252
leveldb.changes
Normal file
@ -0,0 +1,252 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 11 18:08:20 UTC 2024 - pgajdos@suse.com
|
||||
|
||||
- disable autocompact_test [bsc#1218597]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 8 12:47:35 UTC 2023 - Martin Pluskal <mpluskal@suse.com>
|
||||
|
||||
- Build AVX2 enabled hwcaps library for x86_64-v3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 9 12:08:18 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||
|
||||
- Add enable-rtti.patch, enable rtti support again to fix build
|
||||
issue of ceph
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 3 09:46:47 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||
|
||||
- Update to version 1.23:
|
||||
* Switch from C headers to C++ headers.
|
||||
* Remove leveldb::port::kLittleEndian.
|
||||
* Add Env::Remove{File,Dir} which obsolete Env::Delete{File,Dir}.
|
||||
* Sync MANIFEST before closing in db_impl when creating a new DB.
|
||||
* Optimize leveldb block seeks to utilize the current iterator
|
||||
location.
|
||||
* broken db: fix assertion in leveldb::InternalKey::Encode,
|
||||
mark base as corrupt
|
||||
* fix bug(uninitialized options pointer in State)
|
||||
* Fix accidental double std:: qualifiers.
|
||||
* Fix tsan problem in env_test.
|
||||
* Don't check current key in DBIter::Next()
|
||||
* block_builder header file dependency fixed
|
||||
* Add O_CLOEXEC to open calls.
|
||||
* Memory optimization
|
||||
* Documentation improvements
|
||||
- Add detect-system-gtest.patch to use googletest and benchmark
|
||||
from system, add those libraries as dependencies
|
||||
- Build in second build directory to prevent cmake files generated
|
||||
for the static library (prefer shared one)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 29 12:33:36 UTC 2020 - David Disseldorp <ddiss@suse.com>
|
||||
|
||||
- Remove 0001-debian-ports.patch
|
||||
* std::atomic now used instead of internal AtomicPointer asm
|
||||
- Update to version 1.22:
|
||||
* Corrected formatting to be compliant with the Google C++ Style Guide.
|
||||
* Restore soname versioning with CMake build.
|
||||
* Other miscellaneous cleanups, fixes, and improvements.
|
||||
- Update to version 1.21:
|
||||
* Add tests for empty keys and values.
|
||||
* Switch corruption_test to use InMemEnv.
|
||||
* Replace AtomicPointer with std::atomic.
|
||||
* Make InMemoryEnv more consistent with filesystem based Env's.
|
||||
* Align windows_logger with posix_logger.
|
||||
* Added native support for Windows.
|
||||
* Make WriteBatch::ApproximateSize() const.
|
||||
* Fix fdatasync() feature detection in opensource build.
|
||||
* C++11 cleanup for util/mutexlock.h.
|
||||
* Rework threading in env_posix.cc.
|
||||
* Remove InitOnce from the port API.
|
||||
* Expose WriteBatch::Append().
|
||||
* Fix documentation for log file growth.
|
||||
* Add move constructor to Status.
|
||||
* Replace port_posix with port_stdcxx.
|
||||
* Reimplement ConsumeDecimalNumber.
|
||||
* Replace NULL with nullptr in C++ files.
|
||||
* Remove PLATFORM_IS_LITTLE_ENDIAN from port/posix.h.
|
||||
* Add more thread safety annotations.
|
||||
* Require C++11.
|
||||
* Replace SIZE_MAX with std::numeric_limits.
|
||||
* Add CMake build support.
|
||||
* Enable thread safety annotations.
|
||||
* leveldb::DestroyDB will now delete empty directories.
|
||||
* Replace SSE-optimized CRC32C in POSIX port with external library.
|
||||
* Fix file writing bug in CL 170738066.
|
||||
* Fix use of uninitialized value in LRUHandle.
|
||||
* Fix issue #474: a race between the f*_unlocked() STDIO calls in
|
||||
env_posix.cc and concurrent application calls to fflush(NULL).
|
||||
* Report missing CURRENT manifest file as database corruption.
|
||||
* LevelDB: Add WriteBatch::ApproximateSize().
|
||||
* Other minor fixes, code cleanup, and documentation improvements.
|
||||
- Perform a two-pass build, once for static and once for shared libs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 2 07:04:04 UTC 2019 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
- Use FAT LTO objects in order to provide proper static library.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 11 10:44:05 UTC 2017 - ncutler@suse.com
|
||||
|
||||
- added 0001-debian-ports.patch
|
||||
* obtained by rebasing https://github.com/google/leveldb/pull/291
|
||||
on top of 1.20 (one non-trivial conflict involving aarch64,
|
||||
consulted with ARM experts - NOTE: this patch has not been
|
||||
accepted upstream, but it's needed to support s390x)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 10 11:52:35 UTC 2017 - ncutler@suse.com
|
||||
|
||||
- FATE#319443 (aarch64 enablement) changes were backported by
|
||||
https://build.opensuse.org/request/show/294636 and are part
|
||||
of this release. Factory version builds on aarch64.
|
||||
(bsc#1041611)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 11 17:07:36 UTC 2017 - mpluskal@suse.com
|
||||
|
||||
- Update to version 1.20:
|
||||
* Convert documentation to markdown.
|
||||
* Implement support for Intel crc32 instruction (SSE 4.2).
|
||||
* Limit the number of read-only files the POSIX Env will have
|
||||
open.
|
||||
* Add option for maximum file size.
|
||||
- Changes for version 1.19:
|
||||
* A snappy change broke test assumptions about the size of
|
||||
compressed output.
|
||||
* Fix problems in LevelDB's caching code.
|
||||
* Fix LevelDB build when asserts are enabled in release builds.
|
||||
* Change std::uint64_t to uint64_t (#354).
|
||||
* Fixes a bug encountered when reading records from leveldb
|
||||
files that have
|
||||
* been split, as in a [] input task split.
|
||||
* Deleted redundant null ptr check prior to delete. (#338).
|
||||
* Fix signed/unsigned mismatch on VC++ builds.
|
||||
* Putting build artifacts in subdirectory.
|
||||
* Added continuous build integration via Travis CI.
|
||||
* log compaction output file's level along with number.
|
||||
* Misc. improvements to README file.
|
||||
* Fix Android/MIPS build (#115).
|
||||
* Only compiling TrimSpace on linux (#310).
|
||||
* Use xcrun to determine Xcode.app path instead of using a
|
||||
hardcoded path.
|
||||
* Add "approximate-memory-usage" property to
|
||||
leveldb::DB::GetProperty.
|
||||
* Addleveldb::Cache::Prune.
|
||||
* Fix size_t/int comparison/conversion issues.
|
||||
* Added leveldb::Status::IsInvalidArgument() method.
|
||||
* Suppress error reporting after seeking but before a valid First
|
||||
or Full record is encountered.
|
||||
* #include -> (#280).
|
||||
* Now attempts to reuse the preceding MANIFEST and log file when
|
||||
re-opened.
|
||||
* Add benchmark that measures cost of repeatedly opening the
|
||||
database.
|
||||
* Added a new fault injection test.
|
||||
* Add arm64 support to leveldb.
|
||||
- Drop no longer needed 0001-debian-ports.patch
|
||||
- Package command line utils as well
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 5 13:29:58 UTC 2015 - mpluskal@suse.com
|
||||
|
||||
- Update project url
|
||||
- Use url for source
|
||||
- Enable tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 20 12:13:47 UTC 2014 - dmueller@suse.com
|
||||
|
||||
- update to 1.18:
|
||||
+ Replace the basic fprintf call with a call to fwrite
|
||||
+ Fix ALL the header guards.
|
||||
+ A new CONTRIBUTING file.
|
||||
+ leveldb: Remove unused function 'ConsumeChar'.
|
||||
+ leveldbutil: Remove unused member variables from WriteBatchItemPrinter.
|
||||
+ Verify checksums of index/meta/filter blocks when paranoid_checks set.
|
||||
+ Invoke all tools for iOS with xcrun. (This was causing problems with the new XCode 5.1.1 image on pulse.)
|
||||
+ include only once, and fix the following linter warning: "Found C system header after C++ system header"
|
||||
+ When encountering a corrupted table file, return Status::Corruption instead of Status::InvalidArgument.
|
||||
+ Support cygwin as build platform, patch is from https://code.google.com/p/leveldb/issues/detail?id=188
|
||||
+ Fix typo, merge patch from https://code.google.com/p/leveldb/issues/detail?id=159
|
||||
+ Fix typos and comments, and address the following two issues:
|
||||
+ Add missing db synchronize after "fillseq" in the benchmark.
|
||||
+ Removed unused variable in SeekRandom: value (issue #201)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 7 15:33:22 UTC 2014 - ddiss@suse.com
|
||||
|
||||
- updated to 1.16.0
|
||||
+ Make Log::Reader not report a corruption when the last record in a
|
||||
log file is truncated.
|
||||
+ Fix issue 224: variable created but not utilized.
|
||||
+ Remove comment that referenced a removed feature.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 5 16:14:12 UTC 2014 - ddiss@suse.com
|
||||
|
||||
- updated to 1.15.0
|
||||
+ switched from mmap based writing to simpler stdio based writing. Has
|
||||
a minor impact (0.5 microseconds) on microbenchmarks for asynchronous
|
||||
writes. Synchronous writes speed up from 30ms to 10ms on linux/ext4.
|
||||
Should be much more reliable on diverse platforms.
|
||||
+ compaction errors now immediately put the database into a read-only
|
||||
mode (until it is re-opened). As a downside, a disk going out of
|
||||
space and then space being created will require a re-open to recover
|
||||
from, whereas previously that would happen automatically. On the
|
||||
plus side, many corruption possibilities go away.
|
||||
+ force the DB to enter an error-state so that all future writes fail
|
||||
when a synchronous log write succeeds but the sync fails.
|
||||
+ repair now regenerates sstables that exhibit problems
|
||||
+ fix issue 218 - Use native memory barriers on OSX
|
||||
+ fix issue 212 - QNX build is broken
|
||||
+ fix build on iOS with xcode 5
|
||||
+ make tests compile and pass on windows
|
||||
|
||||
- refreshed 0001-debian-ports.patch
|
||||
+ moved OS_MACOSX hunk
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 18 17:49:35 CET 2013 - ro@suse.de
|
||||
|
||||
- add support for other archs (taken from debian, 0001-debian-ports.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 3 22:51:28 UTC 2013 - ddiss@suse.com
|
||||
|
||||
- Changed shared libs group to System/Libraries.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 13 07:59:03 UTC 2013 - i@marguerite.su
|
||||
|
||||
- ran spec-cleaner. too casual the specfile was.
|
||||
- make check/make clean is no more for OBS.
|
||||
- add Provides/Obsoletes to libleveldb1.
|
||||
* no one know that name, provide leveldb itself
|
||||
* required by python-leveldb and python3-leveldb
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 8 10:42:43 UTC 2013 - ddiss@suse.com
|
||||
|
||||
- Updated to 1.14.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 16 11:13:01 UTC 2013 - ddiss@suse.com
|
||||
|
||||
- Updated to 1.12.0
|
||||
+ removed shared_library.patch, now upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 8 17:29:24 UTC 2012 - mrueckert@suse.de
|
||||
|
||||
- added shared library patch
|
||||
- update to shared/static library packaging policy
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 8 16:55:02 UTC 2012 - mrueckert@suse.de
|
||||
|
||||
- initial package
|
||||
|
128
leveldb.spec
Normal file
128
leveldb.spec
Normal file
@ -0,0 +1,128 @@
|
||||
#
|
||||
# spec file for package leveldb
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: leveldb
|
||||
Version: 1.23
|
||||
Release: 0
|
||||
Summary: A key/value-store
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/google/leveldb
|
||||
Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source99: baselibs.conf
|
||||
# PATCH-FEATURE-OPENSUSE detect-system-gtest.patch -- https://github.com/google/leveldb/pull/912
|
||||
Patch0: detect-system-gtest.patch
|
||||
# PATCH-FIX-OPENSUSE enable-rtti.patch -- Enable rtti support again, needed for ceph
|
||||
Patch1: enable-rtti.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: snappy-devel
|
||||
BuildRequires: cmake(GTest)
|
||||
BuildRequires: cmake(benchmark)
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
%{?suse_build_hwcaps_libs}
|
||||
|
||||
%description
|
||||
leveldb implements a system for maintaining a persistent key/value store.
|
||||
|
||||
%define lib_name libleveldb1
|
||||
|
||||
%package -n %{lib_name}
|
||||
Summary: Shared library from leveldb
|
||||
Group: System/Libraries
|
||||
Provides: %{name} = %{version}
|
||||
Obsoletes: %{name} < %{version}
|
||||
|
||||
%description -n %{lib_name}
|
||||
leveldb implements a system for maintaining a persistent key/value store.
|
||||
|
||||
This package holds the shared library of leveldb.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for leveldb
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{lib_name} = %{version}
|
||||
|
||||
%description devel
|
||||
leveldb implements a system for maintaining a persistent key/value store.
|
||||
|
||||
This package holds the development files for leveldb.
|
||||
|
||||
%package devel-static
|
||||
Summary: Development files for statically link leveldb
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{name}-devel = %{version}
|
||||
|
||||
%description devel-static
|
||||
leveldb implements a system for maintaining a persistent key/value store.
|
||||
|
||||
This package holds the development files for statically linking leveldb.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
# unfortunately a two-pass build is needed for shared and static libs
|
||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||
%cmake -DBUILD_SHARED_LIBS=ON
|
||||
%cmake_build
|
||||
cd ..
|
||||
%define __builddir build_static
|
||||
%cmake -DBUILD_SHARED_LIBS=OFF
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
# Install shared libraries
|
||||
%define __builddir build
|
||||
%cmake_install
|
||||
# collect static libs built in the second pass
|
||||
cp -a build_static/libleveldb.a %{buildroot}%{_libdir}
|
||||
# cmake_install omits db_bench
|
||||
install -d -m 0755 %{buildroot}%{_bindir}
|
||||
cp -a build_static/db_bench %{buildroot}%{_bindir}
|
||||
|
||||
%check
|
||||
%define __builddir build_static
|
||||
%ifarch s390x
|
||||
# bsc#1218597
|
||||
exclude_regex='--exclude-regex autocompact_test'
|
||||
%endif
|
||||
eclude_regex='--exclude-regex "(autocompact_test|db_test)"'
|
||||
%ctest $exclude_regex
|
||||
|
||||
%post -n %{lib_name} -p /sbin/ldconfig
|
||||
%postun -n %{lib_name} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%{_bindir}/db_bench
|
||||
|
||||
%files -n %{lib_name}
|
||||
%license LICENSE
|
||||
%{_libdir}/libleveldb.so.*
|
||||
|
||||
%files devel
|
||||
%doc AUTHORS NEWS README.md TODO doc/*
|
||||
%{_includedir}/leveldb/
|
||||
%{_libdir}/libleveldb.so
|
||||
%{_libdir}/cmake/leveldb
|
||||
|
||||
%files devel-static
|
||||
%{_libdir}/libleveldb.a
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user