Blame SPECS/brotli.spec

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