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