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