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