Package init
This commit is contained in:
commit
d9b440350c
38
Fix-Travis-CI-configuration-for-OSX.patch
Normal file
38
Fix-Travis-CI-configuration-for-OSX.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From e69d9f880677f2aa3488c80b953ec4309f0dfa2e Mon Sep 17 00:00:00 2001
|
||||
From: costan <costan@google.com>
|
||||
Date: Thu, 4 Jan 2018 14:26:40 -0800
|
||||
Subject: [PATCH 03/35] Fix Travis CI configuration for OSX.
|
||||
|
||||
---
|
||||
.travis.yml | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/.travis.yml b/.travis.yml
|
||||
index 9841e9a..8816edb 100644
|
||||
--- a/.travis.yml
|
||||
+++ b/.travis.yml
|
||||
@@ -38,10 +38,17 @@ addons:
|
||||
- clang-4.0
|
||||
|
||||
install:
|
||||
-# Travis doesn't have a nice way to install homebrew packages yet.
|
||||
-# https://github.com/travis-ci/travis-ci/issues/5377
|
||||
-- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
|
||||
-- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install gcc@6; fi
|
||||
+# Travis doesn't have a DSL for installing homebrew packages yet. Status tracked
|
||||
+# in https://github.com/travis-ci/travis-ci/issues/5377
|
||||
+# The Travis VM image for Mac already has a link at /usr/local/include/c++,
|
||||
+# causing Homebrew's gcc@6 installation to error out. This was reported to
|
||||
+# Homebrew maintainers at https://github.com/Homebrew/brew/issues/1742 and
|
||||
+# removing the link emerged as a workaround.
|
||||
+- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
+ brew update;
|
||||
+ if [ -L /usr/local/include/c++ ]; then rm /usr/local/include/c++; fi;
|
||||
+ brew install gcc@6;
|
||||
+ fi
|
||||
# /usr/bin/gcc is stuck to old versions by on both Linux and OSX.
|
||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
|
||||
- echo ${CC}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
BIN
snappy-1.1.7.tar.gz
Normal file
BIN
snappy-1.1.7.tar.gz
Normal file
Binary file not shown.
12
snappy-gtest.patch
Normal file
12
snappy-gtest.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -118,7 +118,7 @@
|
||||
"${PROJECT_SOURCE_DIR}/snappy-test.cc"
|
||||
)
|
||||
target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
|
||||
- target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
|
||||
+ target_link_libraries(snappy_unittest snappy ${GTEST_LIBRARIES} ${GFLAGS_LIBRARIES})
|
||||
|
||||
if(HAVE_LIBZ)
|
||||
target_link_libraries(snappy_unittest z)
|
||||
17
snappy-version-macros.patch
Executable file
17
snappy-version-macros.patch
Executable file
@ -0,0 +1,17 @@
|
||||
diff --git a/snappy-stubs-public.h.in b/snappy-stubs-public.h.in
|
||||
index 3fd79bb..bb5b222 100644
|
||||
--- a/snappy-stubs-public.h.in
|
||||
+++ b/snappy-stubs-public.h.in
|
||||
@@ -48,9 +48,9 @@
|
||||
#include <sys/uio.h>
|
||||
#endif // HAVE_SYS_UIO_H
|
||||
|
||||
-#define SNAPPY_MAJOR ${SNAPPY_MAJOR}
|
||||
-#define SNAPPY_MINOR ${SNAPPY_MINOR}
|
||||
-#define SNAPPY_PATCHLEVEL ${SNAPPY_PATCHLEVEL}
|
||||
+#define SNAPPY_MAJOR ${PROJECT_VERSION_MAJOR}
|
||||
+#define SNAPPY_MINOR ${PROJECT_VERSION_MINOR}
|
||||
+#define SNAPPY_PATCHLEVEL ${PROJECT_VERSION_PATCH}
|
||||
#define SNAPPY_VERSION \
|
||||
((SNAPPY_MAJOR << 16) | (SNAPPY_MINOR << 8) | SNAPPY_PATCHLEVEL)
|
||||
|
||||
10
snappy.pc
Normal file
10
snappy.pc
Normal file
@ -0,0 +1,10 @@
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/include
|
||||
libdir=${prefix}/lib64
|
||||
|
||||
Name: snappy
|
||||
Description: A fast compression/decompression library
|
||||
Version: 1.1.7
|
||||
Libs: -L\${libdir} -lsnappy
|
||||
Cflags: -I\${includedir}
|
||||
87
snappy.spec
Normal file
87
snappy.spec
Normal file
@ -0,0 +1,87 @@
|
||||
Name: snappy
|
||||
Version: 1.1.7
|
||||
Release: 9
|
||||
Summary: A fast compressor/decompressor
|
||||
License: BSD
|
||||
URL: https://github.com/google/snappy
|
||||
Source0: https://github.com/google/snappy/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: snappy.pc
|
||||
|
||||
Patch0: snappy-gtest.patch
|
||||
Patch1: snappy-version-macros.patch
|
||||
Patch2: Fix-Travis-CI-configuration-for-OSX.patch
|
||||
|
||||
BuildRequires: gcc-c++ automake autoconf gtest-devel git cmake
|
||||
|
||||
%description
|
||||
Snappy is a compression/decompression library. It does not aim for maximum compression,
|
||||
or compatibility with any other compression library; instead, it aims for very high
|
||||
speeds and reasonable compression.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for snappy
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: cmake-filesystem pkgconfig
|
||||
|
||||
%description devel
|
||||
This package is the development files for snappy.
|
||||
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1 -Sgit
|
||||
|
||||
%build
|
||||
%cmake
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
mkdir %{buildroot}
|
||||
%make_install
|
||||
install -p -D %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/snappy.pc
|
||||
|
||||
%check
|
||||
make test
|
||||
|
||||
%pre
|
||||
|
||||
%preun
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS
|
||||
%license COPYING
|
||||
%{_libdir}/libsnappy.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc format_*.txt framing_*.txt
|
||||
%{_includedir}/snappy*.h
|
||||
%{_libdir}/libsnappy.so
|
||||
%{_libdir}/pkgconfig/snappy.pc
|
||||
%{_libdir}/cmake/Snappy/*.cmake
|
||||
|
||||
%files help
|
||||
%doc NEWS README.md
|
||||
|
||||
%changelog
|
||||
* Fri Sep 27 2019 shenyangyang<shenyangyang4@huawei.com> - 1.1.7-9
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:move the license
|
||||
|
||||
* Tue Sep 24 2019 shenyangyang<shenyangyang4@huawei.com> - 1.1.7-8
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:add help package
|
||||
|
||||
* Tue Aug 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.7-7
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user