Blame SPECS/brotli.spec

312329
%if 0%{?rhel} > 7
312329
# Disable python2 build by default
312329
%bcond_with python2
312329
%else
312329
%bcond_without python2
312329
%endif
312329
312329
Name:           brotli
312329
Version:        1.0.6
944952
Release:        3%{?dist}
312329
Summary:        Lossless compression algorithm
312329
312329
License:        MIT
312329
URL:            https://github.com/google/brotli
312329
Source0:        https://github.com/google/brotli/archive/v%{version}.tar.gz
312329
944952
Patch1:         rhbz1881156.patch
944952
312329
%if %{with python2}
312329
BuildRequires:  python2-devel
312329
%endif
312329
BuildRequires:  python3-devel
312329
BuildRequires:  gcc-c++ gcc cmake
312329
312329
%description
312329
Brotli is a generic-purpose lossless compression algorithm that compresses
312329
data using a combination of a modern variant of the LZ77 algorithm, Huffman
312329
coding and 2nd order context modeling, with a compression ratio comparable
312329
to the best currently available general-purpose compression methods.
312329
It is similar in speed with deflate but offers more dense compression.
312329
312329
%if %{with python2}
312329
%package -n python2-%{name}
312329
Summary:        Lossless compression algorithm (python 2)
312329
Requires: python2
312329
%{?python_provide:%python_provide python2-%{name}}
312329
312329
%description -n python2-%{name}
312329
Brotli is a generic-purpose lossless compression algorithm that compresses
312329
data using a combination of a modern variant of the LZ77 algorithm, Huffman
312329
coding and 2nd order context modeling, with a compression ratio comparable
312329
to the best currently available general-purpose compression methods.
312329
It is similar in speed with deflate but offers more dense compression.
312329
This package installs a Python 2 module.
312329
%endif
312329
312329
%package -n python3-%{name}
312329
Requires: %{__python3}
312329
Summary:        Lossless compression algorithm (python 3)
312329
%{?python_provide:%python_provide python3-%{name}}
312329
312329
%description -n python3-%{name}
312329
Brotli is a generic-purpose lossless compression algorithm that compresses
312329
data using a combination of a modern variant of the LZ77 algorithm, Huffman
312329
coding and 2nd order context modeling, with a compression ratio comparable
312329
to the best currently available general-purpose compression methods.
312329
It is similar in speed with deflate but offers more dense compression.
312329
This package installs a Python 3 module.
312329
312329
312329
%package -n %{name}-devel
312329
Summary:        Lossless compression algorithm (development files)
312329
Requires: %{name}%{?_isa} = %{version}-%{release} 
312329
312329
%description -n %{name}-devel
312329
Brotli is a generic-purpose lossless compression algorithm that compresses
312329
data using a combination of a modern variant of the LZ77 algorithm, Huffman
312329
coding and 2nd order context modeling, with a compression ratio comparable
312329
to the best currently available general-purpose compression methods.
312329
It is similar in speed with deflate but offers more dense compression.
312329
This package installs the development files
312329
312329
%prep
944952
%autosetup -p1 -S git
312329
# fix permissions for -debuginfo
312329
# rpmlint will complain if I create an extra %%files section for
312329
# -debuginfo for this so we'll put it here instead
312329
%{__chmod} 644 c/enc/*.[ch]
312329
%{__chmod} 644 c/include/brotli/*.h
312329
%{__chmod} 644 c/tools/brotli.c
944952
312329
%build
312329
312329
mkdir -p build
312329
cd build
312329
%cmake .. -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
312329
    -DCMAKE_INSTALL_LIBDIR="%{_libdir}"
312329
%make_build
312329
cd ..
312329
%if %{with python2}
312329
%py2_build
312329
%endif
312329
%py3_build
312329
312329
%install
312329
cd build
312329
%make_install
312329
312329
# I couldn't find the option to not build the static libraries
312329
%__rm "%{buildroot}%{_libdir}/"*.a
312329
312329
cd ..
312329
# Must do the python2 install first because the scripts in /usr/bin are
312329
# overwritten with every setup.py install, and in general we want the
312329
# python3 version to be the default. If, however, we're installing separate
312329
# executables for python2 and python3, the order needs to be reversed so
312329
# the unversioned executable is the python2 one.
312329
%if %{with python2}
312329
%py2_install
312329
%endif
312329
%py3_install
312329
%{__install} -dm755 "%{buildroot}%{_mandir}/man3"
312329
cd docs
312329
for i in *.3;do
312329
%{__install} -m644 "$i" "%{buildroot}%{_mandir}/man3/${i}brotli"
312329
done
312329
312329
%ldconfig_scriptlets
312329
312329
%check
312329
cd build
312329
ctest -V
312329
cd ..
312329
%if %{with python2}
312329
%{__python2} setup.py test
312329
%endif
312329
%{__python3} setup.py test
312329
312329
%files
312329
%{_bindir}/brotli
312329
%{_libdir}/*.so.*
312329
%license LICENSE
312329
312329
# Note that there is no %%files section for the unversioned python module
312329
# if we are building for several python runtimes
312329
%if %{with python2}
312329
%files -n python2-%{name}
312329
%{python2_sitearch}/*
312329
%license LICENSE
312329
%endif
312329
312329
%files -n python3-%{name}
312329
%{python3_sitearch}/*
312329
%license LICENSE
312329
312329
%files -n %{name}-devel
312329
%{_includedir}/*
312329
%{_libdir}/*.so
312329
%{_libdir}/pkgconfig/*
312329
%{_mandir}/man3/*
312329
312329
312329
%changelog
944952
* Thu Oct 01 2020 Eike Rathke <erack@redhat.com> - 1.0.6-3
944952
- Resolves: CVE-2020-8927
944952
8eb99b
* Wed Jun 17 2020 Eike Rathke <erack@redhat.com> - 1.0.6-2
8eb99b
- Resolves: rhbz#1737412 bump NRV for build to compose
312329
312329
* Wed Oct 10 2018 Tomas Popela <tpopela@redhat.com> - 1.0.6-1
312329
- Update to 1.0.6
312329
- Resolves: rhbz#1637408
312329
312329
* Wed Sep 19 2018 Tomas Orsava <torsava@redhat.com> - 1.0.5-2
312329
- Require the Python interpreter directly instead of using the package name
312329
- Related: rhbz#1619153
312329
312329
* Mon Jul 16 2018 Tomas Popela <tpopela@redhat.com> - 1.0.5-1
312329
- Update to 1.0.5
312329
312329
* Tue Jun 19 2018 Lumír Balhar <lbalhar@redhat.com> - 1.0.1-4
312329
- Python 2 subpackage disabled
312329
312329
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
312329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
312329
312329
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.1-2
312329
- Switch to %%ldconfig_scriptlets
312329
312329
* Fri Sep 22 2017 Travis Kendrick <pouar@pouar.net> - 1.0.1-1
312329
- update to 1.0.1
312329
312329
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-6
312329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
312329
312329
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
312329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
312329
312329
* Tue May 23 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-4
312329
- add man pages
312329
312329
* Sun May 14 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-3
312329
- wrong directory for ctest
312329
- LICENSE not needed in -devel
312329
- fix "spurious-executable-perm"
312329
- rpmbuild does the cleaning for us, so 'rm -rf %%{buildroot}' isn't needed
312329
312329
* Sat May 13 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-2
312329
- include libraries and development files
312329
312329
* Sat May 06 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-1
312329
- Initial build