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