1Name: brotli 2Version: 1.0.9 3Release: 3 4Summary: Lossless compression algorithm 5 6License: MIT 7URL: https://github.com/google/brotli 8Source0: https://github.com/google/brotli/archive/v%{version}.tar.gz 9 10Patch6000: backport-Revert-Add-runtime-linker-path-to-pkg-config-files.patch 11 12BuildRequires: python3-devel gcc-c++ gcc cmake 13 14 15%description 16Brotli is a generic-purpose lossless compression algorithm that compresses 17data using a combination of a modern variant of the LZ77 algorithm, Huffman 18coding and 2nd order context modeling, with a compression ratio comparable 19to the best currently available general-purpose compression methods. 20It is similar in speed with deflate but offers more dense compression. 21 22%package -n python3-%{name} 23Requires: python3 24Summary: Lossless compression algorithm (python 3) 25%{?python_provide:%python_provide python3-%{name}} 26 27%description -n python3-%{name} 28This package installs a Python 3 module. 29 30%package devel 31Summary: Lossless compression algorithm (development files) 32Requires: %{name}%{?_isa} = %{version}-%{release} 33 34%description devel 35This package installs the development files 36 37%package_help 38 39%prep 40%autosetup -n %{name}-%{version} -p1 41 42%{__chmod} 644 c/enc/*.[ch] 43%{__chmod} 644 c/include/brotli/*.h 44%{__chmod} 644 c/tools/brotli.c 45 46%build 47mkdir -p build 48pushd build 49%cmake .. -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ 50 -DCMAKE_INSTALL_LIBDIR="%{_libdir}" 51%make_build 52popd 53 54%py3_build 55 56%install 57pushd build 58%make_install 59%__rm "%{buildroot}%{_libdir}/"*.a 60popd 61 62%py3_install 63%{__install} -dm755 "%{buildroot}%{_mandir}/man3" 64 65pushd docs 66for i in *.3;do 67%{__install} -m644 "$i" "%{buildroot}%{_mandir}/man3/${i}brotli" 68done 69 70%ldconfig_scriptlets 71 72%check 73pushd build 74ctest -V 75popd 76 77%files 78%license LICENSE 79%{_bindir}/brotli 80%{_libdir}/*.so.* 81 82%files -n python3-%{name} 83%license LICENSE 84%{python3_sitearch}/* 85 86%files devel 87%{_includedir}/* 88%{_libdir}/*.so 89%{_libdir}/pkgconfig/* 90 91%files help 92%{_mandir}/man3/* 93 94%changelog 95* Tue Oct 25 2022 yanglongkang <yanglongkang@h-partners.com> - 1.0.9-3 96- rebuild for next release 97 98* Fri Feb 05 2021 shixuantong <shixuantong@huawei.com> - 1.0.9-2 99- Revert "Add runtime linker path to pkg-config files (#740)" 100 101* Tue Feb 2 2021 liudabo <liudabo1@huawei.com> - 1.0.9-1 102- upgrade version to 1.0.9 103 104* Wed Nov 4 2020 wangjie<wangjie294@huawei.com> -1.0.7-4 105- Type:NA 106- ID:NA 107- SUG:NA 108- DESC:remove python2 109 110* Mon Oct 19 2020 wangjie<wangjie294@huawei.com> -1.0.7-3 111- Type:CVE 112- CVE:CVE-2020-8927 113- SUG:NA 114- DESC:fix CVE-2020-8927 115 116* Mon Oct 19 2020 wangjie<wangjie294@huawei.com> -1.0.7-2 117- Type:bugfix 118- ID:NA 119- SUG:NA 120- DESC:Synchronize patches from community 121 Verbose-CLI-start-pulling-Shared-Brotli.patch 122 Ensure-decompression-consumes-all-input.patch 123 fix-MSVC-configuration-and-c++-compilation-fails.patch 124 fix-executable-mode-of-decode-js.patch 125 Fix-include-for-EMCC-build.patch 126 Add-an-option-to-avoid-building-shared-libraries.patch 127 Disable-PIC-in-EMCC-mode.patch 128 Add-missing-const-to-a-couple-of-kConstants.patch 129 Move-TZCNT-and-BSR-intrinsics-and-add-MSVC-versions.patch 130 131* Thu Apr 16 2020 chengquan<chengquan3@huawei.com> -1.0.7-1 132- Type:enhancement 133- ID:NA 134- SUG:NA 135- DESC:upgrade software to v1.0.7 136 137* Thu Dec 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.5-3 138- fix auto detect of bundled mode 139 140* Thu Sep 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.5-2 141- Package init 142