From 53319aa9a55172f930f2013e7e3298c1c79d038b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 07 2019 05:52:24 +0000 Subject: import snappy-1.1.7-5.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9df1b0f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/snappy-1.1.7.tar.gz diff --git a/.snappy.metadata b/.snappy.metadata new file mode 100644 index 0000000..b2dcd3b --- /dev/null +++ b/.snappy.metadata @@ -0,0 +1 @@ +1ec676b842fc96fd8a95b03c12758935e7f257b0 SOURCES/snappy-1.1.7.tar.gz diff --git a/SOURCES/snappy-gtest.patch b/SOURCES/snappy-gtest.patch new file mode 100644 index 0000000..94ad525 --- /dev/null +++ b/SOURCES/snappy-gtest.patch @@ -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) diff --git a/SOURCES/snappy-version-macros.patch b/SOURCES/snappy-version-macros.patch new file mode 100755 index 0000000..c46ef64 --- /dev/null +++ b/SOURCES/snappy-version-macros.patch @@ -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 + #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) + diff --git a/SPECS/snappy.spec b/SPECS/snappy.spec new file mode 100644 index 0000000..0d92bc9 --- /dev/null +++ b/SPECS/snappy.spec @@ -0,0 +1,195 @@ +Name: snappy +Version: 1.1.7 +Release: 5%{?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 + +# 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++ +BuildRequires: gtest-devel + +%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. For instance, compared to +the fastest mode of zlib, Snappy is an order of magnitude faster for most +inputs, but the resulting compressed files are anywhere from 20% to 100% +bigger. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: cmake-filesystem +Requires: pkgconfig + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%cmake . +%make_build + +# create pkgconfig file +cat << EOF >snappy.pc +prefix=%{_prefix} +exec_prefix=%{_exec_prefix} +includedir=%{_includedir} +libdir=%{_libdir} + +Name: %{name} +Description: A fast compression/decompression library +Version: %{version} +Cflags: -I\${includedir} +Libs: -L\${libdir} -lsnappy +EOF + + +%install +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/ +rm -rf %{buildroot}%{_datadir}/doc/snappy/ +rm -rf %{buildroot}%{_datadir}/doc/snappy-devel/ + +%check +ctest -V %{?_smp_mflags} + + +%ldconfig_scriptlets + + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING NEWS README.md +%{_libdir}/libsnappy.so.* + +%files devel +%defattr(-,root,root,-) +%doc format_description.txt framing_format.txt +%{_includedir}/snappy*.h +%{_libdir}/libsnappy.so +%{_libdir}/pkgconfig/snappy.pc +%{_datadir}/cmake/Modules/*.cmake + + +%changelog +* Mon Feb 19 2018 Martin Gieseking - 1.1.7-5 +- Added BR: gcc-c++ according to new packaging guidelines. + +* Fri Feb 09 2018 Fedora Release Engineering - 1.1.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 1.1.7-3 +- Switch to %%ldconfig_scriptlets + +* Wed Dec 20 2017 Martin Gieseking - 1.1.7-2 +- Fixed https://bugzilla.redhat.com/show_bug.cgi?id=1527850 + +* Fri Aug 25 2017 Martin Gieseking - 1.1.7-1 +- Updated to new release. +- Build with CMake since autotool support is deprecated. + +* Thu Aug 03 2017 Fedora Release Engineering - 1.1.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.1.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.1.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat Jan 28 2017 Martin Gieseking - 1.1.4-2 +- Rebuilt with https://github.com/google/snappy/archive/1.1.4.tar.gz since + %%{source0} contains different and buggy code. + https://groups.google.com/forum/#!topic/snappy-compression/uhELq553TrI + +* Sat Jan 28 2017 Martin Gieseking - 1.1.4-1 +- Updated to new release. +- Added pkgconfig file now coming with the sources. + +* Fri Feb 05 2016 Fedora Release Engineering - 1.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jul 14 2015 Martin Gieseking 1.1.3-1 +- Updated to new release. + +* Fri Jun 19 2015 Fedora Release Engineering - 1.1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 1.1.1-5 +- Rebuilt for GCC 5 C++11 ABI change + +* Wed Feb 25 2015 Martin Gieseking 1.1.1-4 +- Rebuilt for new GCC 5.0 ABI. + +* Mon Aug 18 2014 Fedora Release Engineering - 1.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Feb 24 2014 Martin Gieseking 1.1.1-1 +- Updated to new release. + +* Sun Aug 04 2013 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 06 2013 Martin Gieseking 1.1.0-1 +- updated to new release + +* Sat Jul 21 2012 Fedora Release Engineering - 1.0.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Feb 24 2012 Martin Gieseking 1.0.5-1 +- updated to release 1.0.5 +- made dependency of devel package on base package arch dependant + +* Tue Jan 17 2012 Nathaniel McCallum - 1.0.4-3 +- Add in buildroot stuff for EL5 build + +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Sep 16 2011 Martin Gieseking 1.0.4-1 +- updated to release 1.0.4 + +* Sat Jun 04 2011 Martin Gieseking 1.0.3-1 +- updated to release 1.0.3 +- added format description to devel package + +* Fri Apr 29 2011 Martin Gieseking 1.0.2-1 +- updated to release 1.0.2 +- changed License to BSD +- dropped the patch as it has been applied upstream + +* Thu Mar 24 2011 Martin Gieseking 1.0.0-3 +- added file COPYING from the upstream repo + +* Thu Mar 24 2011 Martin Gieseking 1.0.0-2 +- replaced $CXXFLAGS with %%{optflags} in %%build section +- removed empty %%doc entry from %%files devel + +* Thu Mar 24 2011 Martin Gieseking 1.0.0-1 +- initial package +