1 | %bcond_with test |
---|
2 | |
---|
3 | Summary: Lossless compression algorithm |
---|
4 | Summary(ja): ロスレス圧縮アルゴリズム |
---|
5 | Name: brotli |
---|
6 | Version: 1.0.7 |
---|
7 | Release: 5%{?_dist_release} |
---|
8 | Group: system |
---|
9 | Vendor: Project Vine |
---|
10 | Distribution: Vine Linux |
---|
11 | |
---|
12 | License: MIT |
---|
13 | URL: https://github.com/google/brotli |
---|
14 | Source0: https://github.com/google/brotli/archive/v%{version}.tar.gz |
---|
15 | |
---|
16 | BuildRequires: cmake |
---|
17 | BuildRequires: python3-devel python-rpm-macros python3-rpm-macros |
---|
18 | |
---|
19 | %description |
---|
20 | Brotli is a generic-purpose lossless compression algorithm that compresses |
---|
21 | data using a combination of a modern variant of the LZ77 algorithm, Huffman |
---|
22 | coding and 2nd order context modeling, with a compression ratio comparable |
---|
23 | to the best currently available general-purpose compression methods. |
---|
24 | It is similar in speed with deflate but offers more dense compression. |
---|
25 | |
---|
26 | |
---|
27 | %package -n python3-%{name} |
---|
28 | Summary: Lossless compression algorithm (python 3) |
---|
29 | Group: programming |
---|
30 | %{?python_provide:%python_provide python3-%{name}} |
---|
31 | Requires: python3 |
---|
32 | |
---|
33 | %description -n python3-%{name} |
---|
34 | Brotli is a generic-purpose lossless compression algorithm that compresses |
---|
35 | data using a combination of a modern variant of the LZ77 algorithm, Huffman |
---|
36 | coding and 2nd order context modeling, with a compression ratio comparable |
---|
37 | to the best currently available general-purpose compression methods. |
---|
38 | It is similar in speed with deflate but offers more dense compression. |
---|
39 | This package installs a Python 3 module. |
---|
40 | |
---|
41 | |
---|
42 | %package -n %{name}-devel |
---|
43 | Summary: Lossless compression algorithm (development files) |
---|
44 | Group: programming |
---|
45 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
46 | |
---|
47 | %description -n %{name}-devel |
---|
48 | Brotli is a generic-purpose lossless compression algorithm that compresses |
---|
49 | data using a combination of a modern variant of the LZ77 algorithm, Huffman |
---|
50 | coding and 2nd order context modeling, with a compression ratio comparable |
---|
51 | to the best currently available general-purpose compression methods. |
---|
52 | It is similar in speed with deflate but offers more dense compression. |
---|
53 | This package installs the development files |
---|
54 | |
---|
55 | |
---|
56 | %prep |
---|
57 | %autosetup |
---|
58 | # fix permissions for -debuginfo |
---|
59 | # rpmlint will complain if I create an extra %%files section for |
---|
60 | # -debuginfo for this so we'll put it here instead |
---|
61 | %{__chmod} 644 c/enc/*.[ch] |
---|
62 | %{__chmod} 644 c/include/brotli/*.h |
---|
63 | %{__chmod} 644 c/tools/brotli.c |
---|
64 | |
---|
65 | |
---|
66 | %build |
---|
67 | mkdir -p build |
---|
68 | cd build |
---|
69 | %cmake .. -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ |
---|
70 | -DCMAKE_INSTALL_LIBDIR="%{_libdir}" |
---|
71 | %make_build |
---|
72 | cd .. |
---|
73 | %py3_build |
---|
74 | |
---|
75 | |
---|
76 | %install |
---|
77 | cd build |
---|
78 | %make_install |
---|
79 | |
---|
80 | # I couldn't find the option to not build the static libraries |
---|
81 | %__rm "%{buildroot}%{_libdir}/"*.a |
---|
82 | |
---|
83 | cd .. |
---|
84 | %py3_install |
---|
85 | %{__install} -dm755 "%{buildroot}%{_mandir}/man3" |
---|
86 | cd docs |
---|
87 | for i in *.3;do |
---|
88 | %{__install} -m644 "$i" "%{buildroot}%{_mandir}/man3/${i}brotli" |
---|
89 | done |
---|
90 | |
---|
91 | |
---|
92 | %if %{with test} |
---|
93 | %check |
---|
94 | cd build |
---|
95 | ctest -V |
---|
96 | cd .. |
---|
97 | %{__python3} setup.py test |
---|
98 | %endif |
---|
99 | |
---|
100 | |
---|
101 | %post -p /sbin/ldconfig |
---|
102 | %postun -p /sbin/ldconfig |
---|
103 | |
---|
104 | |
---|
105 | %files |
---|
106 | %license LICENSE |
---|
107 | %{_bindir}/brotli |
---|
108 | %{_libdir}/*.so.* |
---|
109 | |
---|
110 | # Note that there is no %%files section for the unversioned python module |
---|
111 | # if we are building for several python runtimes |
---|
112 | %files -n python3-%{name} |
---|
113 | %license LICENSE |
---|
114 | %{python3_sitearch}/* |
---|
115 | |
---|
116 | %files -n %{name}-devel |
---|
117 | %{_includedir}/* |
---|
118 | %{_libdir}/*.so |
---|
119 | %{_libdir}/pkgconfig/* |
---|
120 | %{_mandir}/man3/* |
---|
121 | |
---|
122 | |
---|
123 | %changelog |
---|
124 | * Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.7-5 |
---|
125 | - rebuilt with python-3.8. |
---|
126 | |
---|
127 | * Tue Aug 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.0.7-4 |
---|
128 | - rebuilt with current environment. |
---|
129 | |
---|
130 | * Thu Jan 03 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.0.7-3 |
---|
131 | - initial build for Vine Linux. |
---|
132 | |
---|
133 | * Sun Dec 09 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.7-2 |
---|
134 | - Remove last python2 bits |
---|
135 | |
---|
136 | * Wed Nov 28 2018 Travis Kendrick pouar@pouar.net> - 1.0.7-1 |
---|
137 | - Update to 1.0.7 |
---|
138 | |
---|
139 | * Wed Nov 28 2018 Travis Kendrick pouar@pouar.net> - 1.0.5-2 |
---|
140 | - remove Python 2 support https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal |
---|
141 | |
---|
142 | * Fri Jul 13 2018 Travis Kendrick pouar@pouar.net> - 1.0.5-1 |
---|
143 | - update to 1.0.5 |
---|
144 | |
---|
145 | * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-4 |
---|
146 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
---|
147 | |
---|
148 | * Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-3 |
---|
149 | - Rebuilt for Python 3.7 |
---|
150 | |
---|
151 | * Wed Apr 18 2018 Travis Kendrick pouar@pouar.net> - 1.0.4-2 |
---|
152 | - update to 1.0.4 |
---|
153 | |
---|
154 | * Sat Mar 03 2018 Travis Kendrick <pouar@pouar.net> - 1.0.3-1 |
---|
155 | - update to 1.0.3 |
---|
156 | |
---|
157 | * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3 |
---|
158 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
159 | |
---|
160 | * Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.1-2 |
---|
161 | - Switch to %%ldconfig_scriptlets |
---|
162 | |
---|
163 | * Fri Sep 22 2017 Travis Kendrick <pouar@pouar.net> - 1.0.1-1 |
---|
164 | - update to 1.0.1 |
---|
165 | |
---|
166 | * Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-6 |
---|
167 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild |
---|
168 | |
---|
169 | * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5 |
---|
170 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
---|
171 | |
---|
172 | * Tue May 23 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-4 |
---|
173 | - add man pages |
---|
174 | |
---|
175 | * Sun May 14 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-3 |
---|
176 | - wrong directory for ctest |
---|
177 | - LICENSE not needed in -devel |
---|
178 | - fix "spurious-executable-perm" |
---|
179 | - rpmbuild does the cleaning for us, so 'rm -rf %%{buildroot}' isn't needed |
---|
180 | |
---|
181 | * Sat May 13 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-2 |
---|
182 | - include libraries and development files |
---|
183 | |
---|
184 | * Sat May 06 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-1 |
---|
185 | - Initial build |
---|