You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
2.5 KiB
107 lines
2.5 KiB
Name: zstd |
|
Version: 1.5.1 |
|
Release: 1%{?dist} |
|
Summary: Zstd compression library |
|
License: BSD and GPLv2 |
|
URL: https://github.com/facebook/zstd |
|
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz |
|
Patch1: pzstd.1.patch |
|
BuildRequires: gcc gtest-devel |
|
BuildRequires: gcc-c++ |
|
|
|
|
|
%description |
|
Zstd, short for Zstandard, is a fast lossless compression algorithm, |
|
targeting real-time compression scenarios at zlib-level compression ratio. |
|
|
|
|
|
%package -n lib%{name} |
|
Summary: Zstd shared library |
|
%description -n lib%{name} |
|
Zstandard compression shared library. |
|
|
|
|
|
%package -n lib%{name}-devel |
|
Summary: Header files for Zstd library |
|
Requires: lib%{name}%{?_isa} = %{version}-%{release} |
|
%description -n lib%{name}-devel |
|
Header files for Zstd library. |
|
|
|
|
|
%package -n lib%{name}-static |
|
Summary: Static variant of the Zstd library |
|
Requires: lib%{name}-devel = %{version}-%{release} |
|
%description -n lib%{name}-static |
|
Static variant of the Zstd library. |
|
|
|
|
|
%prep |
|
%setup -q |
|
find -name .gitignore -delete |
|
%patch1 -p1 |
|
|
|
|
|
%build |
|
export CFLAGS="$RPM_OPT_FLAGS" |
|
export LDFLAGS="$RPM_LD_FLAGS" |
|
for dir in lib programs; do |
|
%make_build -C "$dir" %{!?with_asm:ZSTD_NO_ASM=1} |
|
done |
|
export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11" |
|
%make_build -C contrib/pzstd %{!?with_asm:ZSTD_NO_ASM=1} |
|
|
|
|
|
%check |
|
export CFLAGS="$RPM_OPT_FLAGS" |
|
export LDFLAGS="$RPM_LD_FLAGS" |
|
make -C tests test-zstd |
|
export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11" |
|
make -C contrib/pzstd test |
|
|
|
|
|
%install |
|
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} |
|
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd |
|
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 |
|
|
|
|
|
%pre -n lib%{name} -p /sbin/ldconfig |
|
%post -n lib%{name} -p /sbin/ldconfig |
|
|
|
|
|
%files |
|
%doc CHANGELOG README.md |
|
%{_bindir}/%{name} |
|
%{_bindir}/p%{name} |
|
%{_mandir}/man1/p%{name}.1* |
|
%{_bindir}/%{name}mt |
|
%{_bindir}/un%{name} |
|
%{_bindir}/%{name}cat |
|
%{_bindir}/%{name}grep |
|
%{_bindir}/%{name}less |
|
%{_mandir}/man1/%{name}.1* |
|
%{_mandir}/man1/un%{name}.1* |
|
%{_mandir}/man1/%{name}cat.1* |
|
%{_mandir}/man1/%{name}grep.1* |
|
%{_mandir}/man1/%{name}less.1* |
|
%license COPYING LICENSE |
|
|
|
|
|
%files -n lib%{name} |
|
%{_libdir}/libzstd.so.* |
|
%license COPYING LICENSE |
|
|
|
|
|
%files -n lib%{name}-devel |
|
%{_includedir}/zdict.h |
|
%{_includedir}/zstd.h |
|
%{_includedir}/zstd_errors.h |
|
%{_libdir}/pkgconfig/libzstd.pc |
|
%{_libdir}/libzstd.so |
|
|
|
|
|
%files -n lib%{name}-static |
|
%{_libdir}/libzstd.a |
|
|
|
|
|
%changelog
|
|
|