Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > media > core-release-src > by-pkgid > b87dbef0d678aec28d9f467ac107860b > files > 4

snappy-1.1.10-1.mga10.src.rpm

%define major     1
%define libname   %mklibname %{name} %{major}
%define develname %mklibname %{name} -d

Name:           snappy
Version:        1.1.10
Release:        %mkrel 1
Summary:        Fast compression and decompression library
Group:          System/Libraries
License:        BSD
URL:            https://google.github.io/snappy/
Source0:        https://github.com/google/snappy/archive/%{version}/%{name}-%{version}.tar.gz
# Remove dependency on bundled gtest and google-benchmark.
Patch0:         %{name}-thirdparty.patch

#(eatdirt) allows to enable rtti (breaks cephfs otherwise, see
#https://tracker.ceph.com/issues/53060)
Patch2:         snappy-1.1.9-rtti.patch

BuildRequires:  cmake
BuildRequires:  pkgconfig(benchmark)
BuildRequires:  pkgconfig(gtest)

%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 -n %{libname}
Summary:        Library of Snappy
Group:          System/Libraries
Provides:       %{name} = %{version}-%{release}

%description -n %{libname}
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 -n %{develname}
Summary:        Development files for %{name}
Group:          Development/Java
Requires:       %{libname} = %{version}-%{release}
Provides:       %{name}-devel = %{version}-%{release}

%description -n %{develname}
The %{develname} package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q
%autopatch -p1


%build
#(eatdirt) RTTI ON is required for cephfs
%cmake -DSNAPPY_ENABLE_RTTI:BOOL=ON
%cmake_build


%install
%cmake_install

rm -rf %{buildroot}%{_datadir}/doc/snappy/
# we don't want these
find %{buildroot} -name '*.la' -delete

# 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 -Dm 0644 snappy.pc %{buildroot}%{_libdir}/pkgconfig/snappy.pc


%check
ctest -V


%files -n %{libname}
%doc AUTHORS NEWS README.md
%license COPYING
%{_libdir}/libsnappy.so.%{major}{,.*}

%files -n %{develname}
%doc format_description.txt framing_format.txt
%{_includedir}/snappy*.h
%{_libdir}/libsnappy.so
%{_libdir}/pkgconfig/snappy.pc
%{_libdir}/cmake/Snappy/


%changelog
* Sun Sep 03 2023 daviddavid <daviddavid> 1.1.10-1.mga10
+ Revision: 1983894
- new version: 1.1.10
- remove merged upstream patch

* Wed Apr 05 2023 eatdirt <eatdirt> 1.1.9-3.mga9
+ Revision: 1951508
- Add support to and enable RTTI (required by ceph)

* Wed Mar 30 2022 umeabot <umeabot> 1.1.9-2.mga9
+ Revision: 1833567
- Mageia 9 Mass Rebuild

* Fri May 21 2021 daviddavid <daviddavid> 1.1.9-1.mga9
+ Revision: 1725968
- new version: 1.1.9

* Wed Feb 19 2020 umeabot <umeabot> 1.1.8-2.mga8
+ Revision: 1543928
- Mageia 8 Mass Rebuild

* Thu Jan 23 2020 daviddavid <daviddavid> 1.1.8-1.mga8
+ Revision: 1482431
- new version: 1.1.8

* Sun Sep 23 2018 umeabot <umeabot> 1.1.7-2.mga7
+ Revision: 1301086
- Mageia 7 Mass Rebuild

* Sat Feb 17 2018 daviddavid <daviddavid> 1.1.7-1.mga7
+ Revision: 1202041
- switch build to cmake
- add two fedora patches
- add a pkgconfig file
- new version: 1.1.7
- update URL

* Thu Mar 17 2016 cjw <cjw> 1.1.3-4.mga6
+ Revision: 992303
- sync with 1.1.3-1
- obsolete snappy and snappy-devel packages

* Wed Feb 24 2016 daviddavid <daviddavid> 1.1.3-3.mga6
+ Revision: 978590
- switch to %%configure2_5x

* Mon Aug 24 2015 joequant <joequant> 1.1.3-1.mga6
+ Revision: 868899
- update to 1.1.3

* Wed Oct 15 2014 umeabot <umeabot> 1.1.2-3.mga5
+ Revision: 743386
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.1.2-2.mga5
+ Revision: 689224
- Mageia 5 Mass Rebuild

* Sun Mar 23 2014 dglent <dglent> 1.1.2-1.mga5
+ Revision: 606759
- New version 1.1.2

* Sat Dec 14 2013 dglent <dglent> 1.1.1-1.mga4
+ Revision: 556733
- New version 1.1.1
- Remove comment based on fedora as the current version is much different now.
- Restore the version tag in devel package requires
- Remove br based on arch
- Change in devel requires from '%%{name}' to '%%{libname}'
- Add in provides '%%{name}-devel' in devel package
- Update spec
- Fix description of devel package
- Modify spec according Mageia policy for libraries
- imported package snappy