Bump to 1.23 accepted/tizen_unified accepted/tizen_unified_riscv sandbox/leveldb_1.23 accepted/tizen/unified/20231227.063246 accepted/tizen/unified/riscv/20231227.105057
authorTizenOpenSource <tizenopensrc@samsung.com>
Thu, 21 Dec 2023 07:18:22 +0000 (16:18 +0900)
committerTizenOpenSource <tizenopensrc@samsung.com>
Thu, 21 Dec 2023 07:18:22 +0000 (16:18 +0900)
Signed-off-by: TizenOpenSource <tizenopensrc@samsung.com>
.gitignore [deleted file]
packaging/disable_gtest_benchmarks.patch [new file with mode: 0644]
packaging/leveldb.changes [new file with mode: 0644]
packaging/leveldb.manifest [new file with mode: 0644]
packaging/leveldb.pc [new file with mode: 0644]
packaging/leveldb.spec [new file with mode: 0644]
packaging/memenv.pc [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index c4b2425..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# Editors.
-*.sw*
-.vscode
-.DS_Store
-
-# Build directory.
-build/
-out/
diff --git a/packaging/disable_gtest_benchmarks.patch b/packaging/disable_gtest_benchmarks.patch
new file mode 100644 (file)
index 0000000..ad03045
--- /dev/null
@@ -0,0 +1,24 @@
+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)
diff --git a/packaging/leveldb.changes b/packaging/leveldb.changes
new file mode 100644 (file)
index 0000000..3ad8b0f
--- /dev/null
@@ -0,0 +1,6 @@
+* Sun Aug 25 2013 Chengwei Yang <chengwei.yang@intel.com>
+- Remove debian packaging stuff
+
+* Sat May 18 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130517.051247@2a95e52
+- Fixed build on 64 bit systems
+
diff --git a/packaging/leveldb.manifest b/packaging/leveldb.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/leveldb.pc b/packaging/leveldb.pc
new file mode 100644 (file)
index 0000000..521f58a
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libleveldb
+Description: LevelDB Library
+Version: 1.1
+Libs: -L${libdir} -lleveldb
+Cflags: -I${includedir}
diff --git a/packaging/leveldb.spec b/packaging/leveldb.spec
new file mode 100644 (file)
index 0000000..9fe84b9
--- /dev/null
@@ -0,0 +1,83 @@
+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
diff --git a/packaging/memenv.pc b/packaging/memenv.pc
new file mode 100644 (file)
index 0000000..a456ce8
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libmemenv
+Description: LevelDB-MemEnv Library
+Version: 1.1
+Libs: -L${libdir} -lmemenv
+Cflags: -I${includedir}