brotli-vl.spec 5.2 KB

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