53319a
Name:           snappy
f169e9
Version:        1.1.8
f169e9
Release:        3%{?dist}
53319a
Summary:        Fast compression and decompression library
53319a
53319a
Group:          System Environment/Libraries
53319a
License:        BSD
53319a
URL:            https://github.com/google/snappy
f169e9
Source0:        https://github.com/google/snappy/archive/%{version}.tar.gz
53319a
53319a
# add missing dependency on gtest to snappy_unittest
53319a
Patch0:         %{name}-gtest.patch
53319a
53319a
BuildRequires:  cmake
53319a
BuildRequires:  gcc-c++
53319a
BuildRequires:  gtest-devel
53319a
53319a
%description
53319a
Snappy is a compression/decompression library. It does not aim for maximum 
53319a
compression, or compatibility with any other compression library; instead, it 
53319a
aims for very high speeds and reasonable compression. For instance, compared to 
53319a
the fastest mode of zlib, Snappy is an order of magnitude faster for most 
53319a
inputs, but the resulting compressed files are anywhere from 20% to 100% 
53319a
bigger. 
53319a
53319a
53319a
%package        devel
53319a
Summary:        Development files for %{name}
53319a
Group:          Development/Libraries
53319a
Requires:       %{name}%{?_isa} = %{version}-%{release}
53319a
Requires:       cmake-filesystem
53319a
Requires:       pkgconfig
f169e9
Obsoletes:      %{name}-devel < %{version}-2
53319a
53319a
%description    devel
53319a
The %{name}-devel package contains libraries and header files for
53319a
developing applications that use %{name}.
53319a
53319a
53319a
%prep
53319a
%setup -q
53319a
%patch0 -p1
53319a
53319a
%build
53319a
%cmake .
53319a
%make_build
53319a
53319a
# create pkgconfig file
53319a
cat << EOF >snappy.pc
53319a
prefix=%{_prefix}
53319a
exec_prefix=%{_exec_prefix}
53319a
includedir=%{_includedir}
53319a
libdir=%{_libdir}
53319a
53319a
Name: %{name}
53319a
Description: A fast compression/decompression library
53319a
Version: %{version}
53319a
Cflags: -I\${includedir}
53319a
Libs: -L\${libdir} -lsnappy
53319a
EOF
53319a
53319a
53319a
%install
53319a
rm -rf %{buildroot}
53319a
chmod 644 *.txt AUTHORS COPYING NEWS README.md
53319a
%make_install
53319a
install -m644 -D snappy.pc %{buildroot}%{_libdir}/pkgconfig/snappy.pc
f169e9
# Address multilib failures while moving files from _libdir to
f169e9
# _datadir
f169e9
%ifarch x86_64 s390x ppc64 ppc64le aarch64
f169e9
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/lib64/
f169e9
mv %{buildroot}%{_libdir}/cmake/Snappy/*cmake %{buildroot}%{_datadir}/cmake/Modules/lib64/
f169e9
%else
f169e9
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/lib/
f169e9
mv %{buildroot}%{_libdir}/cmake/Snappy/*cmake %{buildroot}%{_datadir}/cmake/Modules/lib/
f169e9
%endif
53319a
rm -rf %{buildroot}%{_datadir}/doc/snappy/
53319a
rm -rf %{buildroot}%{_datadir}/doc/snappy-devel/
53319a
53319a
%check
53319a
ctest -V %{?_smp_mflags}
53319a
53319a
53319a
%ldconfig_scriptlets
53319a
53319a
53319a
%files
53319a
%defattr(-,root,root,-)
53319a
%doc AUTHORS COPYING NEWS README.md
53319a
%{_libdir}/libsnappy.so.*
53319a
53319a
%files devel
53319a
%defattr(-,root,root,-)
53319a
%doc format_description.txt framing_format.txt
53319a
%{_includedir}/snappy*.h
53319a
%{_libdir}/libsnappy.so
53319a
%{_libdir}/pkgconfig/snappy.pc
f169e9
%ifarch x86_64 s390x ppc64 ppc64le aarch64
f169e9
%{_datadir}/cmake/Modules/lib64/*.cmake
f169e9
%else
f169e9
%{_datadir}/cmake/Modules/lib/*.cmake
f169e9
%endif
53319a
53319a
53319a
%changelog
f169e9
* Fri Aug 21 2020 Bhupesh Sharma <bhsharma@redhat.com> - 1.1.8-3
f169e9
- Obsolete snappy-devel versions lower than 1.1.8-2 as lower versions have multilib issues.
f169e9
f169e9
* Fri Jul 24 2020 Bhupesh Sharma <bhsharma@redhat.com> - 1.1.8-2
f169e9
- Fix multilib (i686 and x86) issues with snappy-devel package
f169e9
f169e9
* Wed Jul 22 2020 Bhupesh Sharma <bhsharma@redhat.com> - 1.1.8-1
f169e9
- Rebase to latest github version Snappy-1.1.8
f169e9
- Also change the URL to reflect to the updated github location.
f169e9
53319a
* Mon Feb 19 2018 Martin Gieseking <martin.gieseking@uos.de> - 1.1.7-5
53319a
- Added BR: gcc-c++ according to new packaging guidelines.
53319a
53319a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.7-4
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
53319a
53319a
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1.7-3
53319a
- Switch to %%ldconfig_scriptlets
53319a
53319a
* Wed Dec 20 2017 Martin Gieseking <martin.gieseking@uos.de> - 1.1.7-2
53319a
- Fixed https://bugzilla.redhat.com/show_bug.cgi?id=1527850
53319a
53319a
* Fri Aug 25 2017 Martin Gieseking <martin.gieseking@uos.de> - 1.1.7-1
53319a
- Updated to new release.
53319a
- Build with CMake since autotool support is deprecated.
53319a
53319a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-5
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
53319a
53319a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-4
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
53319a
53319a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-3
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
53319a
53319a
* Sat Jan 28 2017 Martin Gieseking <martin.gieseking@uos.de> - 1.1.4-2
53319a
- Rebuilt with https://github.com/google/snappy/archive/1.1.4.tar.gz since
53319a
  %%{source0} contains different and buggy code.
53319a
  https://groups.google.com/forum/#!topic/snappy-compression/uhELq553TrI
53319a
53319a
* Sat Jan 28 2017 Martin Gieseking <martin.gieseking@uos.de> - 1.1.4-1
53319a
- Updated to new release.
53319a
- Added pkgconfig file now coming with the sources.
53319a
53319a
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
53319a
53319a
* Tue Jul 14 2015 Martin Gieseking <martin.gieseking@uos.de> 1.1.3-1
53319a
- Updated to new release.
53319a
53319a
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-6
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
53319a
53319a
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.1.1-5
53319a
- Rebuilt for GCC 5 C++11 ABI change
53319a
53319a
* Wed Feb 25 2015 Martin Gieseking <martin.gieseking@uos.de> 1.1.1-4
53319a
- Rebuilt for new GCC 5.0 ABI.
53319a
53319a
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
53319a
53319a
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
53319a
53319a
* Mon Feb 24 2014 Martin Gieseking <martin.gieseking@uos.de> 1.1.1-1
53319a
- Updated to new release.
53319a
53319a
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
53319a
53319a
* Wed Feb 06 2013 Martin Gieseking <martin.gieseking@uos.de> 1.1.0-1
53319a
- updated to new release
53319a
53319a
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-2
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
53319a
53319a
* Fri Feb 24 2012 Martin Gieseking <martin.gieseking@uos.de> 1.0.5-1
53319a
- updated to release 1.0.5
53319a
- made dependency of devel package on base package arch dependant
53319a
53319a
* Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.0.4-3
53319a
- Add in buildroot stuff for EL5 build
53319a
53319a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-2
53319a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
53319a
53319a
* Fri Sep 16 2011 Martin Gieseking <martin.gieseking@uos.de> 1.0.4-1
53319a
- updated to release 1.0.4
53319a
53319a
* Sat Jun 04 2011 Martin Gieseking <martin.gieseking@uos.de> 1.0.3-1
53319a
- updated to release 1.0.3
53319a
- added format description to devel package
53319a
53319a
* Fri Apr 29 2011 Martin Gieseking <martin.gieseking@uos.de> 1.0.2-1
53319a
- updated to release 1.0.2
53319a
- changed License to BSD
53319a
- dropped the patch as it has been applied upstream
53319a
53319a
* Thu Mar 24 2011 Martin Gieseking <martin.gieseking@uos.de> 1.0.0-3
53319a
- added file COPYING from the upstream repo
53319a
53319a
* Thu Mar 24 2011 Martin Gieseking <martin.gieseking@uos.de> 1.0.0-2
53319a
- replaced $CXXFLAGS with %%{optflags} in %%build section
53319a
- removed empty %%doc entry from %%files devel
53319a
53319a
* Thu Mar 24 2011 Martin Gieseking <martin.gieseking@uos.de> 1.0.0-1
53319a
- initial package
53319a