brotli-vl.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. %bcond_with test
  2. Summary: Lossless compression algorithm
  3. Summary(ja): ロスレス圧縮アルゴリズム
  4. Name: brotli
  5. Version: 1.0.7
  6. Release: 5%{?_dist_release}
  7. Group: system
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: MIT
  11. URL: https://github.com/google/brotli
  12. Source0: https://github.com/google/brotli/archive/v%{version}.tar.gz
  13. BuildRequires: cmake
  14. BuildRequires: python3-devel python-rpm-macros python3-rpm-macros
  15. %description
  16. Brotli is a generic-purpose lossless compression algorithm that compresses
  17. data using a combination of a modern variant of the LZ77 algorithm, Huffman
  18. coding and 2nd order context modeling, with a compression ratio comparable
  19. to the best currently available general-purpose compression methods.
  20. It is similar in speed with deflate but offers more dense compression.
  21. %package -n python3-%{name}
  22. Summary: Lossless compression algorithm (python 3)
  23. Group: programming
  24. %{?python_provide:%python_provide python3-%{name}}
  25. Requires: python3
  26. %description -n python3-%{name}
  27. Brotli is a generic-purpose lossless compression algorithm that compresses
  28. data using a combination of a modern variant of the LZ77 algorithm, Huffman
  29. coding and 2nd order context modeling, with a compression ratio comparable
  30. to the best currently available general-purpose compression methods.
  31. It is similar in speed with deflate but offers more dense compression.
  32. This package installs a Python 3 module.
  33. %package -n %{name}-devel
  34. Summary: Lossless compression algorithm (development files)
  35. Group: programming
  36. Requires: %{name}%{?_isa} = %{version}-%{release}
  37. %description -n %{name}-devel
  38. Brotli is a generic-purpose lossless compression algorithm that compresses
  39. data using a combination of a modern variant of the LZ77 algorithm, Huffman
  40. coding and 2nd order context modeling, with a compression ratio comparable
  41. to the best currently available general-purpose compression methods.
  42. It is similar in speed with deflate but offers more dense compression.
  43. This package installs the development files
  44. %prep
  45. %autosetup
  46. # fix permissions for -debuginfo
  47. # rpmlint will complain if I create an extra %%files section for
  48. # -debuginfo for this so we'll put it here instead
  49. %{__chmod} 644 c/enc/*.[ch]
  50. %{__chmod} 644 c/include/brotli/*.h
  51. %{__chmod} 644 c/tools/brotli.c
  52. %build
  53. mkdir -p build
  54. cd build
  55. %cmake .. -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
  56. -DCMAKE_INSTALL_LIBDIR="%{_libdir}"
  57. %make_build
  58. cd ..
  59. %py3_build
  60. %install
  61. cd build
  62. %make_install
  63. # I couldn't find the option to not build the static libraries
  64. %__rm "%{buildroot}%{_libdir}/"*.a
  65. cd ..
  66. %py3_install
  67. %{__install} -dm755 "%{buildroot}%{_mandir}/man3"
  68. cd docs
  69. for i in *.3;do
  70. %{__install} -m644 "$i" "%{buildroot}%{_mandir}/man3/${i}brotli"
  71. done
  72. %if %{with test}
  73. %check
  74. cd build
  75. ctest -V
  76. cd ..
  77. %{__python3} setup.py test
  78. %endif
  79. %post -p /sbin/ldconfig
  80. %postun -p /sbin/ldconfig
  81. %files
  82. %license LICENSE
  83. %{_bindir}/brotli
  84. %{_libdir}/*.so.*
  85. # Note that there is no %%files section for the unversioned python module
  86. # if we are building for several python runtimes
  87. %files -n python3-%{name}
  88. %license LICENSE
  89. %{python3_sitearch}/*
  90. %files -n %{name}-devel
  91. %{_includedir}/*
  92. %{_libdir}/*.so
  93. %{_libdir}/pkgconfig/*
  94. %{_mandir}/man3/*
  95. %changelog
  96. * Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.7-5
  97. - rebuilt with python-3.8.
  98. * Tue Aug 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.0.7-4
  99. - rebuilt with current environment.
  100. * Thu Jan 03 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.0.7-3
  101. - initial build for Vine Linux.
  102. * Sun Dec 09 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.7-2
  103. - Remove last python2 bits
  104. * Wed Nov 28 2018 Travis Kendrick pouar@pouar.net> - 1.0.7-1
  105. - Update to 1.0.7
  106. * Wed Nov 28 2018 Travis Kendrick pouar@pouar.net> - 1.0.5-2
  107. - remove Python 2 support https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
  108. * Fri Jul 13 2018 Travis Kendrick pouar@pouar.net> - 1.0.5-1
  109. - update to 1.0.5
  110. * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-4
  111. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  112. * Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-3
  113. - Rebuilt for Python 3.7
  114. * Wed Apr 18 2018 Travis Kendrick pouar@pouar.net> - 1.0.4-2
  115. - update to 1.0.4
  116. * Sat Mar 03 2018 Travis Kendrick <pouar@pouar.net> - 1.0.3-1
  117. - update to 1.0.3
  118. * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
  119. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  120. * Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.1-2
  121. - Switch to %%ldconfig_scriptlets
  122. * Fri Sep 22 2017 Travis Kendrick <pouar@pouar.net> - 1.0.1-1
  123. - update to 1.0.1
  124. * Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-6
  125. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  126. * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
  127. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  128. * Tue May 23 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-4
  129. - add man pages
  130. * Sun May 14 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-3
  131. - wrong directory for ctest
  132. - LICENSE not needed in -devel
  133. - fix "spurious-executable-perm"
  134. - rpmbuild does the cleaning for us, so 'rm -rf %%{buildroot}' isn't needed
  135. * Sat May 13 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-2
  136. - include libraries and development files
  137. * Sat May 06 2017 Travis Kendrick <pouar@pouar.net> - 0.6.0-1
  138. - Initial build