Initial import (#1250025)

This commit is contained in:
Matej Muzila 2017-06-27 15:51:02 +02:00
parent 2121bbf614
commit 85f049a601
4 changed files with 128 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/rocksdb-5.2.1.tar.gz

View File

@ -0,0 +1,57 @@
Fix installation paths.
--- rocksdb-3.12/Makefile.install_path 2015-07-21 02:11:02.000000000 +0200
+++ rocksdb-3.12/Makefile 2015-07-31 11:47:21.512002547 +0200
@@ -863,33 +863,36 @@
#-------------------------------------------------
# make install related stuff
-INSTALL_PATH ?= /usr/local
+INSTALL_PREFIX ?= /
+INCLUDE_INSTAL_DIR ?= /usr/local/include/
+LIB_INSTALL_DIR ?= /usr/local/lib/
+
uninstall:
- rm -rf $(INSTALL_PATH)/include/rocksdb \
- $(INSTALL_PATH)/lib/$(LIBRARY) \
- $(INSTALL_PATH)/lib/$(SHARED4) \
- $(INSTALL_PATH)/lib/$(SHARED3) \
- $(INSTALL_PATH)/lib/$(SHARED2) \
- $(INSTALL_PATH)/lib/$(SHARED1)
+ rm -rf $(INSTALL_PREFIX)/$(INCLUDE_INSTALL_DIR)/rocksdb \
+ $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)/$(LIBRARY) \
+ $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)/$(SHARED4) \
+ $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)/$(SHARED3) \
+ $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)/$(SHARED2) \
+ $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)/$(SHARED1)
install-headers:
- install -d $(INSTALL_PATH)/lib
- for header_dir in `find "include/rocksdb" -type d`; do \
- install -d $(INSTALL_PATH)/$$header_dir; \
+ install -d $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)
+ for header_dir in $$(find "include/rocksdb" -type d|sed -r 's/^([^\/]*\/)//'); do \
+ install -d $(INSTALL_PREFIX)/$(INCLUDE_INSTALL_DIR)/$$header_dir; \
done
- for header in `find "include/rocksdb" -type f -name *.h`; do \
- install -C -m 644 $$header $(INSTALL_PATH)/$$header; \
+ for header in $$(find "include/rocksdb" -type f -name *.h|sed -r 's/^([^\/]*\/)//'); do \
+ install -C -m 644 "include/$$header" $(INSTALL_PREFIX)/$(INCLUDE_INSTALL_DIR)/$$header; \
done
install-static: install-headers $(LIBRARY)
- install -C -m 755 $(LIBRARY) $(INSTALL_PATH)/lib
+ install -C -m 755 $(LIBRARY) $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)
install-shared: install-headers $(SHARED4)
- install -C -m 755 $(SHARED4) $(INSTALL_PATH)/lib && \
- ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED3) && \
- ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED2) && \
- ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED1)
+ install -C -m 755 $(SHARED4) $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR) && \
+ ln -fs $(SHARED4) $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)/$(SHARED3) && \
+ ln -fs $(SHARED4) $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)/$(SHARED2) && \
+ ln -fs $(SHARED4) $(INSTALL_PREFIX)/$(LIB_INSTALL_DIR)/$(SHARED1)
# install static by default + install shared if it exists
install: install-static

69
rocksdb.spec Normal file
View File

@ -0,0 +1,69 @@
Name: rocksdb
Version: 5.2.1
Release: 1%{?dist}
Summary: A Persistent Key-Value Store for Flash and RAM Storage
License: BSD
URL: https://github.com/facebook/rocksdb.git
BuildRequires: gtest-devel
Source0: https://github.com/facebook/rocksdb/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: rocksdb-5.2.1-install_path.patch
%description
Rocksdb is a library that forms the core building block for a fast key value
server, especially suited for storing data on flash drives. It has a
Log-Structured-Merge-Database (LSM) design with flexible trade offs between
Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF) and
Space-Amplification-Factor (SAF). It has multithreaded compaction, making it
specially suitable for storing multiple terabytes of data in a single database.
%package devel
Summary: Development files for rocksdb
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files for rocksdb
%prep
%setup -q
%patch0 -p1 -b .install_path
rm -rf third-party/gtest-1.7.0
rm java/benchmark/src/main/java/org/rocksdb/benchmark/DbBenchmark.java
rm build_tools/gnu_parallel
%build
export CFLAGS="%{optflags}"
export EXTRA_CXXFLAGS=" -std=c++11 %{optflags}"
make %{?_smp_mflags} shared_lib
%install
make install-shared \
INSTALL_PREFIX=%{buildroot}\
LIB_INSTALL_DIR=%{_libdir}\
INCLUDE_INSTALL_DIR=%{_includedir}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{_libdir}/librocksdb.so.5
%{_libdir}/librocksdb.so.5.2
%{_libdir}/librocksdb.so.5.2.1
%license LICENSE
%files devel
%{_libdir}/librocksdb.so
%{_includedir}/*
%changelog
* Tue Jan 24 2017 Matej Muzila <mmuzila@redhat.com> 5.2.1-1
- Packaged rocksdb

View File

@ -0,0 +1 @@
SHA512 (rocksdb-5.2.1.tar.gz) = 7506f0863ff912ac67a4c3829d432043d9dc0221bf2d2b451718af91798ed5fb71025011f9b6d0ee5e3913d9a65cf091a3ad7ac5ac35500160feaadfa0340922