From 79f34f4bb44120aa355b0f2102430ba49906faf7 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sat, 3 Aug 2024 11:35:57 +0800 Subject: [PATCH] Do ship binaries and static lib archive as other distros --- zstd.spec | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/zstd.spec b/zstd.spec index e7094ea..61a9111 100644 --- a/zstd.spec +++ b/zstd.spec @@ -2,16 +2,22 @@ Name: zstd Version: 1.5.6 -Release: 1 +Release: 2 Summary: A fast lossless compression algorithm -License: BSD and GPLv2 +License: BSD-3-Clause AND GPL-2.0-only URL: https://github.com/facebook/zstd Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -BuildRequires: gtest-devel gcc-c++ pkg-config +BuildRequires: gcc gcc-c++ +BuildRequires: pkgconfig(liblz4) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(zlib) +%if %{with pzstd} +BuildRequires: pkgconfig(gtest) +%endif -Provides: libzstd -Obsoletes: libzstd +Provides: libzstd = %{version}-%{release} +Obsoletes: libzstd < %{version}-%{release} %description Zstd is a fast lossless compression algorithm. It's backed by a very fast entropy stage, @@ -21,18 +27,15 @@ and has a better compression ratio. %package devel Summary: Header files for zstd library Requires: %{name} = %{version}-%{release} -Provides: libzstd-devel -Obsoletes: libzstd-devel +Provides: libzstd-devel = %{version}-%{release} +Obsoletes: libzstd-devel < %{version}-%{release} +Provides: libzstd-static = %{version}-%{release} +Obsoletes: libzstd-static < %{version}-%{release} %description devel This package contains the header files for zstd library. -%package help -Summary: Help documentation related to zstd -BuildArch: noarch - -%description help -This package includes help documentation and manuals related to zstd. +%package_help %prep %autosetup -p1 @@ -48,15 +51,11 @@ done %endif %check -make -C tests test-zstd +%make_build -C tests test-zstd %if %{with pzstd} -make -C contrib/pzstd test CXXFLAGS="$RPM_OPT_FLAGS -std=c++11" +%make_build -C contrib/pzstd test CXXFLAGS="$RPM_OPT_FLAGS -std=c++11" %endif -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - %install %make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} %if %{with pzstd} @@ -68,23 +67,21 @@ install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1 %doc CHANGELOG README.md %license LICENSE COPYING %{_bindir}/* - %{_libdir}/libzstd.so.* -%exclude %{_bindir}/%{name}less -%exclude %{_bindir}/%{name}grep -%exclude %{_libdir}/libzstd.a - %files devel %{_includedir}/*.h - %{_libdir}/pkgconfig/libzstd.pc %{_libdir}/libzstd.so +%{_libdir}/libzstd.a %files help %{_mandir}/man1/*.1* %changelog +* Sat Aug 03 2024 Funda Wang - 1.5.6-2 +- Do ship binaries and static lib archive as other distros + * Wed May 22 2024 zhangxingrong - 1.5.6-1 - Update to version 1.5.6 -- Gitee