Blame SPECS/brotli.spec

3475f7
Name:           brotli
3475f7
Version:        1.0.9
3475f7
Release:        6%{?dist}
3475f7
Summary:        Lossless compression algorithm
3475f7
3475f7
License:        MIT
3475f7
URL:            https://github.com/google/brotli
3475f7
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
3475f7
3475f7
Patch0:        09b0992b6acb7faa6fd3b23f9bc036ea117230fc.patch
3475f7
3475f7
%if 0%{?rhel} == 7
3475f7
BuildRequires:  devtoolset-7-toolchain, devtoolset-7-libatomic-devel
3475f7
%endif
3475f7
BuildRequires:  gcc
3475f7
BuildRequires:  gcc-c++
3475f7
BuildRequires:  cmake
3475f7
BuildRequires:  python%{python3_pkgversion}-devel
3475f7
BuildRequires:  python%{python3_pkgversion}-setuptools
3475f7
Requires: lib%{name}%{?_isa} = %{version}-%{release}
3475f7
3475f7
%description
3475f7
Brotli is a generic-purpose lossless compression algorithm that compresses
3475f7
data using a combination of a modern variant of the LZ77 algorithm, Huffman
3475f7
coding and 2nd order context modeling, with a compression ratio comparable
3475f7
to the best currently available general-purpose compression methods.
3475f7
It is similar in speed with deflate but offers more dense compression.
3475f7
3475f7
%package -n libbrotli
3475f7
Summary:        Library for brotli lossless compression algorithm
3475f7
3475f7
%description -n libbrotli
3475f7
Brotli is a generic-purpose lossless compression algorithm that compresses
3475f7
data using a combination of a modern variant of the LZ77 algorithm, Huffman
3475f7
coding and 2nd order context modeling, with a compression ratio comparable
3475f7
to the best currently available general-purpose compression methods.
3475f7
It is similar in speed with deflate but offers more dense compression.
3475f7
3475f7
3475f7
%package -n python%{python3_pkgversion}-%{name}
3475f7
Summary:        Lossless compression algorithm (python 3)
3475f7
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
3475f7
3475f7
%description -n python%{python3_pkgversion}-%{name}
3475f7
Brotli is a generic-purpose lossless compression algorithm that compresses
3475f7
data using a combination of a modern variant of the LZ77 algorithm, Huffman
3475f7
coding and 2nd order context modeling, with a compression ratio comparable
3475f7
to the best currently available general-purpose compression methods.
3475f7
It is similar in speed with deflate but offers more dense compression.
3475f7
This package installs a Python 3 module.
3475f7
3475f7
3475f7
%package devel
3475f7
Summary:        Lossless compression algorithm (development files)
3475f7
Requires: %{name}%{?_isa} = %{version}-%{release}
3475f7
Requires: lib%{name}%{?_isa} = %{version}-%{release}
3475f7
3475f7
%description devel
3475f7
Brotli is a generic-purpose lossless compression algorithm that compresses
3475f7
data using a combination of a modern variant of the LZ77 algorithm, Huffman
3475f7
coding and 2nd order context modeling, with a compression ratio comparable
3475f7
to the best currently available general-purpose compression methods.
3475f7
It is similar in speed with deflate but offers more dense compression.
3475f7
This package installs the development files
3475f7
3475f7
%prep
3475f7
%autosetup -p1
3475f7
# fix permissions for -debuginfo
3475f7
# rpmlint will complain if I create an extra %%files section for
3475f7
# -debuginfo for this so we'll put it here instead
3475f7
chmod 644 c/enc/*.[ch]
3475f7
chmod 644 c/include/brotli/*.h
3475f7
chmod 644 c/tools/brotli.c
3475f7
3475f7
%build
3475f7
%if 0%{?rhel} == 7
3475f7
. /opt/rh/devtoolset-7/enable
3475f7
%endif
3475f7
%cmake \
3475f7
    -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
3475f7
    -DCMAKE_INSTALL_LIBDIR="%{_libdir}"
3475f7
%cmake_build
3475f7
%py3_build
3475f7
3475f7
%install
3475f7
%if 0%{?rhel} == 7
3475f7
. /opt/rh/devtoolset-7/enable
3475f7
%endif
3475f7
%cmake_install
3475f7
3475f7
# I couldn't find the option to not build the static libraries
3475f7
rm "%{buildroot}%{_libdir}/"*.a
3475f7
3475f7
%py3_install
3475f7
install -dm755 "%{buildroot}%{_mandir}/man3"
3475f7
cd docs
3475f7
for i in *.3;do
3475f7
install -m644 "$i" "%{buildroot}%{_mandir}/man3/${i}brotli"
3475f7
done
3475f7
3475f7
%ldconfig_scriptlets
3475f7
3475f7
%check
3475f7
%if 0%{?rhel} == 7
3475f7
. /opt/rh/devtoolset-7/enable
3475f7
%endif
3475f7
%ctest
3475f7
3475f7
%files
3475f7
%{_bindir}/brotli
3475f7
3475f7
%files -n libbrotli
3475f7
%license LICENSE
3475f7
%{_libdir}/libbrotlicommon.so.1*
3475f7
%{_libdir}/libbrotlidec.so.1*
3475f7
%{_libdir}/libbrotlienc.so.1*
3475f7
3475f7
# Note that there is no %%files section for the unversioned python module
3475f7
# if we are building for several python runtimes
3475f7
%files -n python%{python3_pkgversion}-%{name}
3475f7
%license LICENSE
3475f7
%{python3_sitearch}/brotli.py
3475f7
%{python3_sitearch}/_brotli.cpython-%{python3_version_nodots}*.so
3475f7
%{python3_sitearch}/__pycache__/brotli.cpython-%{python3_version_nodots}*.py*
3475f7
%{python3_sitearch}/Brotli-%{version}-py%{python3_version}.egg-info
3475f7
3475f7
%files devel
3475f7
%{_includedir}/brotli
3475f7
%{_libdir}/libbrotlicommon.so
3475f7
%{_libdir}/libbrotlidec.so
3475f7
%{_libdir}/libbrotlienc.so
3475f7
%{_libdir}/pkgconfig/libbrotlicommon.pc
3475f7
%{_libdir}/pkgconfig/libbrotlidec.pc
3475f7
%{_libdir}/pkgconfig/libbrotlienc.pc
3475f7
%{_mandir}/man3/constants.h.3brotli*
3475f7
%{_mandir}/man3/decode.h.3brotli*
3475f7
%{_mandir}/man3/encode.h.3brotli*
3475f7
%{_mandir}/man3/types.h.3brotli*
3475f7
3475f7
3475f7
%changelog
3475f7
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.9-6
3475f7
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
3475f7
  Related: rhbz#1991688
3475f7
3475f7
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.9-5
3475f7
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
3475f7
3475f7
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-4
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
3475f7
3475f7
* Thu Oct 01 2020 Travis Kendrick <pouar@pouar.net> - 1.0.9-3
3475f7
- Apparently %%autosetup calls %%patch on its own
3475f7
3475f7
* Thu Oct 01 2020 Travis Kendrick <pouar@pouar.net> - 1.0.9-2
3475f7
- Fix pc file (#1884364)
3475f7
3475f7
* Wed Sep 30 2020 Travis Kendrick <pouar@pouar.net> - 1.0.9-1
3475f7
- Update to 1.0.9 (#1872932)
3475f7
3475f7
* Wed Aug 12 2020 Carl George <carl@george.computer> - 1.0.7-14
3475f7
- Update cmake invocation rhbz#1863298
3475f7
3475f7
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-13
3475f7
- Second attempt - Rebuilt for
3475f7
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3475f7
3475f7
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-12
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3475f7
3475f7
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.7-11
3475f7
- Rebuilt for Python 3.9
3475f7
3475f7
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-10
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
3475f7
3475f7
* Sat Dec  7 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.7-9
3475f7
- Splil out the libs to a separate package
3475f7
3475f7
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.7-8
3475f7
- Rebuilt for Python 3.8.0rc1 (#1748018)
3475f7
3475f7
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.7-7
3475f7
- Rebuilt for Python 3.8
3475f7
3475f7
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-6
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3475f7
3475f7
* Sat Apr 20 2019 Orion Poplawski <orion@nwra.com> - 1.0.7-5
3475f7
- Build with devtoolset-7 on EPEL7 to fix aarch64 builds
3475f7
3475f7
* Thu Mar 28 2019 Carl George <carl@george.computer> - 1.0.7-4
3475f7
- EPEL compatibility
3475f7
3475f7
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-3
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3475f7
3475f7
* Sun Dec 09 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.7-2
3475f7
- Remove last python2 bits
3475f7
3475f7
* Wed Nov 28 2018 Travis Kendrick pouar@pouar.net> - 1.0.7-1
3475f7
- Update to 1.0.7
3475f7
3475f7
* Wed Nov 28 2018 Travis Kendrick pouar@pouar.net> - 1.0.5-2
3475f7
- remove Python 2 support https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
3475f7
3475f7
* Fri Jul 13 2018 Travis Kendrick pouar@pouar.net> - 1.0.5-1
3475f7
- update to 1.0.5
3475f7
3475f7
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-4
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3475f7
3475f7
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-3
3475f7
- Rebuilt for Python 3.7
3475f7
3475f7
* Wed Apr 18 2018 Travis Kendrick pouar@pouar.net> - 1.0.4-2
3475f7
- update to 1.0.4
3475f7
3475f7
* Sat Mar 03 2018 Travis Kendrick <pouar@pouar.net> - 1.0.3-1
3475f7
- update to 1.0.3
3475f7
3475f7
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3475f7
3475f7
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.1-2
3475f7
- Switch to %%ldconfig_scriptlets
3475f7
3475f7
* Fri Sep 22 2017 Travis Kendrick <pouar@pouar.net> - 1.0.1-1
3475f7
- update to 1.0.1
3475f7
3475f7
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-6
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
3475f7
3475f7
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
3475f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3475f7
3475f7
* Tue May 23 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-4
3475f7
- add man pages
3475f7
3475f7
* Sun May 14 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-3
3475f7
- wrong directory for ctest
3475f7
- LICENSE not needed in -devel
3475f7
- fix "spurious-executable-perm"
3475f7
- rpmbuild does the cleaning for us, so 'rm -rf %%{buildroot}' isn't needed
3475f7
3475f7
* Sat May 13 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-2
3475f7
- include libraries and development files
3475f7
3475f7
* Sat May 06 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-1
3475f7
- Initial build