brotli.spec 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ##
  2. ## brotli.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2020 OpenPKG Project <http://openpkg.org/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_base 1.0.9
  25. %define V_snap 20201227
  26. # package information
  27. Name: brotli
  28. Summary: Brotli Compression
  29. URL: https://github.com/google/brotli
  30. Vendor: Google
  31. Packager: OpenPKG Project
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Compression
  35. License: MIT
  36. Version: %{V_base}.%{V_snap}
  37. Release: 20201227
  38. # list of sources
  39. Source0: http://download.openpkg.org/components/versioned/brotli/brotli-%{V_snap}.tar.xz
  40. Patch0: brotli.patch
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20160101
  43. PreReq: OpenPKG, openpkg >= 20160101
  44. %description
  45. Brotli is a generic-purpose lossless compression algorithm that
  46. compresses data using a combination of a modern variant of the LZ77
  47. algorithm, Huffman coding and 2nd order context modeling, with
  48. a compression ratio comparable to the best currently available
  49. general-purpose compression methods. It is similar in speed with
  50. Deflate but offers more dense compression. The specification of the
  51. Brotli Compressed Data Format is defined in RFC 7932.
  52. %track
  53. prog brotli:base = {
  54. version = %{V_base}
  55. url = https://github.com/google/brotli/releases
  56. regex = v(__VER__)\.tar\.gz
  57. }
  58. prog brotli:snap = {
  59. version = %{V_snap}
  60. url = http://download.openpkg.org/components/versioned/brotli/
  61. regex = brotli-(__VER__)\.tar\.xz
  62. }
  63. %prep
  64. %setup -q -n brotli
  65. %patch -p0
  66. %build
  67. %{l_make} %{l_mflags -O} \
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags -O}" \
  70. CPPFLAGS="%{l_cppflags}" \
  71. LDFLAGS="%{l_ldflags}"
  72. %install
  73. %{l_shtool} mkdir -f -p -m 755 \
  74. $RPM_BUILD_ROOT%{l_prefix}/bin \
  75. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  76. %{l_shtool} install -c -s -m 755 \
  77. bin/brotli $RPM_BUILD_ROOT%{l_prefix}/bin/
  78. %{l_shtool} install -c -m 644 \
  79. docs/brotli.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  81. %files -f files
  82. %clean