]> git.pld-linux.org Git - packages/zstd.git/blame - zstd.spec
disable asm on non-x86_64 to fix exec stack; rel 2
[packages/zstd.git] / zstd.spec
CommitLineData
b46fcfe9
JP
1#
2# Conditional build:
3%bcond_without asm # disable assembler
4
5# workaround executable stack on non-x86_64
6# https://github.com/facebook/zstd/issues/2963
7%ifnarch %{x8664}
8%undefine with_asm
9%endif
10
8edbfa0e
JB
11Summary: Zstandard - fast lossless compression algorithm
12Summary(pl.UTF-8): Zstandard - szybki, bezstratny algorytm kompresji
13Name: zstd
62ae61c3 14Version: 1.5.1
b46fcfe9 15Release: 2
8edbfa0e
JB
16License: BSD
17Group: Libraries
a3eb5c88
JB
18#Source0Download: https://github.com/facebook/zstd/releases
19Source0: https://github.com/facebook/zstd/archive/v%{version}/%{name}-%{version}.tar.gz
62ae61c3 20# Source0-md5: 120d77140ad538e8bd3a7dae6a38c4c9
a3eb5c88 21URL: https://github.com/facebook/zstd
8edbfa0e 22BuildRequires: gcc >= 5:3.2
8df4284d
JP
23BuildRequires: lz4-devel
24BuildRequires: xz-devel
25BuildRequires: zlib-devel
8edbfa0e
JB
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
f3c32c66
JP
28%ifarch %{arm}
29%define archcflags -DMEM_FORCE_MEMORY_ACCESS=1
30%endif
31
8edbfa0e
JB
32%description
33Zstd, short for Zstandard, is a fast lossless compression algorithm,
34targeting real-time compression scenarios at zlib-level compression
35ratio.
36
37%description -l pl.UTF-8
38Zstd (skrót od Zstandard) to szybki, bezstratny algorytm kompresji, do
39zastosowwań przy kompresji w czasie rzeczywistym ze współczynnikiem
40kompresji zbliżonym do biblioteki zlib.
41
42%package devel
43Summary: Header files for Zstd library
44Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Zstd
45Group: Development/Libraries
46Requires: %{name} = %{version}-%{release}
47
48%description devel
49Header files for Zstd library.
50
51%description devel -l pl.UTF-8
52Pliki nagłówkowe biblioteki Zstd.
53
54%package static
55Summary: Static Zstd library
56Summary(pl.UTF-8): Statyczna biblioteka Zstd
57Group: Development/Libraries
58Requires: %{name}-devel = %{version}-%{release}
59
60%description static
61Static Zstd library.
62
63%description static -l pl.UTF-8
64Statyczna biblioteka Zstd.
65
66%prep
67%setup -q
8edbfa0e
JB
68
69%build
70CC="%{__cc}" \
cfde35c2 71CXX="%{__cxx}" \
f3c32c66 72CFLAGS="%{rpmcflags} %{rpmcppflags} %{?archcflags}" \
cfde35c2 73CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
8edbfa0e 74LDFLAGS="%{rpmldflags}" \
c45ba9ec 75%{__make} allmost manual \
b46fcfe9
JP
76 V=1 \
77 %{!?with_asm:ZSTD_NO_ASM=1}
8edbfa0e
JB
78
79%install
80rm -rf $RPM_BUILD_ROOT
2a73dcc2 81install -d $RPM_BUILD_ROOT/%{_lib}
8edbfa0e
JB
82
83%{__make} install \
2219447b 84 V=1 \
8edbfa0e
JB
85 DESTDIR=$RPM_BUILD_ROOT \
86 PREFIX=%{_prefix} \
87 LIBDIR=%{_libdir}
88
2a73dcc2
JR
89%{__mv} $RPM_BUILD_ROOT%{_libdir}/libzstd.so.* $RPM_BUILD_ROOT/%{_lib}
90ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libzstd.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libzstd.so
91
8edbfa0e
JB
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95%post -p /sbin/ldconfig
96%postun -p /sbin/ldconfig
97
98%files
99%defattr(644,root,root,755)
ce3b3dc6 100%doc LICENSE CHANGELOG README.md
8edbfa0e
JB
101%attr(755,root,root) %{_bindir}/unzstd
102%attr(755,root,root) %{_bindir}/zstd
103%attr(755,root,root) %{_bindir}/zstdcat
a3eb5c88
JB
104%attr(755,root,root) %{_bindir}/zstdgrep
105%attr(755,root,root) %{_bindir}/zstdless
46edb54d 106%attr(755,root,root) %{_bindir}/zstdmt
2a73dcc2
JR
107%attr(755,root,root) /%{_lib}/libzstd.so.*.*.*
108%attr(755,root,root) %ghost /%{_lib}/libzstd.so.1
8edbfa0e
JB
109%{_mandir}/man1/unzstd.1*
110%{_mandir}/man1/zstd.1*
111%{_mandir}/man1/zstdcat.1*
73730962
JB
112%{_mandir}/man1/zstdgrep.1*
113%{_mandir}/man1/zstdless.1*
8edbfa0e
JB
114
115%files devel
116%defattr(644,root,root,755)
a3eb5c88 117%doc doc/{zstd_compression_format.md,zstd_manual.html,images}
8edbfa0e 118%attr(755,root,root) %{_libdir}/libzstd.so
8edbfa0e
JB
119%{_includedir}/zdict.h
120%{_includedir}/zstd.h
a3eb5c88 121%{_includedir}/zstd_errors.h
8edbfa0e
JB
122%{_pkgconfigdir}/libzstd.pc
123
124%files static
125%defattr(644,root,root,755)
126%{_libdir}/libzstd.a
This page took 0.110443 seconds and 4 git commands to generate.