zstd.spec 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. Name: zstd
  2. Version: 1.5.2
  3. Release: 1%{?dist}
  4. Summary: Zstandard lossless data compressor
  5. License: BSD GPLv2
  6. URL: https://www.zstd.net
  7. Source0: https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz
  8. BuildRequires: gcc-c++
  9. %description
  10. Zstandard, or zstd as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios. It's backed by a very fast entropy stage, provided by Huff0 and FSE library.
  11. # do not install shared libraries by default
  12. %bcond_with shared
  13. %prep
  14. %setup -q
  15. %build
  16. make PREFIX=%{_prefix} LIBDIR=%{_libdir} %{?_smp_mflags}
  17. make -C contrib/pzstd PREFIX=%{_prefix} LIBDIR=%{_libdir} %{?_smp_mflags}
  18. %install
  19. make PREFIX=%{_prefix} LIBDIR=%{_libdir} DESTDIR=%{buildroot} install
  20. ln -sf zstd %{buildroot}/usr/bin/zstdmt
  21. install -Dm 755 contrib/pzstd/pzstd -t %{buildroot}/usr/bin
  22. rm -f "%{buildroot}/usr/share/info/dir"
  23. %if %{without shared}
  24. rm %{buildroot}/%{_libdir}/libzstd.so*
  25. %endif
  26. %if %{with shared}
  27. %post
  28. /sbin/ldconfig
  29. %postun
  30. /sbin/ldconfig
  31. %endif
  32. %files
  33. %license LICENSE
  34. %{_bindir}/*zstd*
  35. %{_libdir}/libzstd.*
  36. %{_libdir}/pkgconfig/libzstd.pc
  37. %{_mandir}/man1/*zstd*
  38. %{_includedir}/zdict.h
  39. %{_includedir}/zstd.h
  40. %{_includedir}/zstd_errors.h
  41. %changelog