mirror of
https://abf.rosa.ru/djam/snappy.git
synced 2025-02-24 14:12:56 +00:00
97 lines
2.6 KiB
RPMSpec
97 lines
2.6 KiB
RPMSpec
%define major 1
|
|
%define libname %mklibname %{name} %{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
Summary: Fast compression and decompression library
|
|
Name: snappy
|
|
Version: 1.1.8
|
|
Release: 1
|
|
License: BSD
|
|
Group: System/Libraries
|
|
Url: http://code.google.com/p/snappy/
|
|
Source0: https://github.com/google/snappy/archive/%{version}.tar.gz
|
|
Patch0: snappy-gtest.patch
|
|
BuildRequires: cmake
|
|
BuildRequires: ninja
|
|
BuildRequires: gtest-devel
|
|
BuildRequires: pkgconfig(lzo2)
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
%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 for %{name}
|
|
Group: System/Libraries
|
|
%rename %{name}
|
|
|
|
%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.
|
|
|
|
This package contains shared libraries for %{name}.
|
|
|
|
%files -n %{libname}
|
|
%{_libdir}/libsnappy.so.%{major}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Development files for %{name}
|
|
Group: Development/C
|
|
Requires: %{libname} = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
This package contains libraries and header files for developing applications
|
|
that use %{name}.
|
|
|
|
%files -n %{devname}
|
|
%doc AUTHORS COPYING NEWS
|
|
%doc format_description.txt
|
|
%{_includedir}/snappy*.h
|
|
%{_libdir}/libsnappy.so
|
|
%{_libdir}/cmake/Snappy/*
|
|
%{_libdir}/pkgconfig/snappy.pc
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%cmake \
|
|
-DBUILD_SHARED_LIBS:BOOL=ON \
|
|
-G Ninja
|
|
|
|
%ninja_build
|
|
|
|
%install
|
|
%ninja_install -C 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 -m644 -D snappy.pc %{buildroot}%{_libdir}/pkgconfig/snappy.pc
|