import snappy-1.1.8-3.el8

This commit is contained in:
CentOS Sources 2021-03-30 16:01:06 -04:00 committed by Stepan Oksanichenko
parent f895a71594
commit 49838d924e
5 changed files with 32 additions and 30 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/snappy-1.1.7.tar.gz
SOURCES/1.1.8.tar.gz

View File

@ -1 +1 @@
1ec676b842fc96fd8a95b03c12758935e7f257b0 SOURCES/snappy-1.1.7.tar.gz
1eeb144e7b564dd726136c97f869b453d2fb7924 SOURCES/1.1.8.tar.gz

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,7 +118,7 @@
"${PROJECT_SOURCE_DIR}/snappy-test.cc"
@@ -212,7 +212,7 @@ if(SNAPPY_BUILD_TESTS)
"snappy-test.cc"
)
target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
- target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})

View File

@ -1,17 +0,0 @@
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)

View File

@ -1,17 +1,15 @@
Name: snappy
Version: 1.1.7
Release: 5%{?dist}
Version: 1.1.8
Release: 3%{?dist}
Summary: Fast compression and decompression library
Group: System Environment/Libraries
License: BSD
URL: https://github.com/google/snappy
Source0: https://github.com/google/snappy/releases/download/%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/google/snappy/archive/%{version}.tar.gz
# add missing dependency on gtest to snappy_unittest
Patch0: %{name}-gtest.patch
# fix version macros in snappy-stubs-public.h.in (BZ #1527850)
Patch1: %{name}-version-macros.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@ -32,6 +30,7 @@ Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: cmake-filesystem
Requires: pkgconfig
Obsoletes: %{name}-devel < %{version}-2
%description devel
The %{name}-devel package contains libraries and header files for
@ -41,7 +40,6 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%cmake .
@ -67,8 +65,15 @@ rm -rf %{buildroot}
chmod 644 *.txt AUTHORS COPYING NEWS README.md
%make_install
install -m644 -D snappy.pc %{buildroot}%{_libdir}/pkgconfig/snappy.pc
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/
mv %{buildroot}%{_libdir}/cmake/Snappy/*cmake %{buildroot}%{_datadir}/cmake/Modules/
# Address multilib failures while moving files from _libdir to
# _datadir
%ifarch x86_64 s390x ppc64 ppc64le aarch64
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/lib64/
mv %{buildroot}%{_libdir}/cmake/Snappy/*cmake %{buildroot}%{_datadir}/cmake/Modules/lib64/
%else
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/lib/
mv %{buildroot}%{_libdir}/cmake/Snappy/*cmake %{buildroot}%{_datadir}/cmake/Modules/lib/
%endif
rm -rf %{buildroot}%{_datadir}/doc/snappy/
rm -rf %{buildroot}%{_datadir}/doc/snappy-devel/
@ -90,10 +95,24 @@ ctest -V %{?_smp_mflags}
%{_includedir}/snappy*.h
%{_libdir}/libsnappy.so
%{_libdir}/pkgconfig/snappy.pc
%{_datadir}/cmake/Modules/*.cmake
%ifarch x86_64 s390x ppc64 ppc64le aarch64
%{_datadir}/cmake/Modules/lib64/*.cmake
%else
%{_datadir}/cmake/Modules/lib/*.cmake
%endif
%changelog
* Fri Aug 21 2020 Bhupesh Sharma <bhsharma@redhat.com> - 1.1.8-3
- Obsolete snappy-devel versions lower than 1.1.8-2 as lower versions have multilib issues.
* Fri Jul 24 2020 Bhupesh Sharma <bhsharma@redhat.com> - 1.1.8-2
- Fix multilib (i686 and x86) issues with snappy-devel package
* Wed Jul 22 2020 Bhupesh Sharma <bhsharma@redhat.com> - 1.1.8-1
- Rebase to latest github version Snappy-1.1.8
- Also change the URL to reflect to the updated github location.
* Mon Feb 19 2018 Martin Gieseking <martin.gieseking@uos.de> - 1.1.7-5
- Added BR: gcc-c++ according to new packaging guidelines.