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