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