bzip2.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. ##
  2. ## bzip2.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: bzip2
  26. Summary: De-/Compression with BZIP2 Algorithm
  27. URL: http://www.bzip.org/
  28. Vendor: Julian Seward
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: CORE
  32. Group: Compression
  33. License: GPL
  34. Version: 1.0.4
  35. Release: 20070505
  36. # list of sources
  37. Source0: http://www.bzip.org/%{version}/bzip2-%{version}.tar.gz
  38. Patch0: bzip2.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130
  43. PreReq: OpenPKG, openpkg >= 20040130
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. BZIP2 is a freely available, patent free, high-quality data
  48. compressor. It typically compresses files to within 10% to 15%
  49. of the best available techniques (the PPM family of statistical
  50. compressors), whilst being around twice as fast at compression and
  51. six times faster at decompression.
  52. %track
  53. prog bzip2 = {
  54. version = %{version}
  55. url = http://www.bzip.org/downloads.html
  56. regex = bzip2-(__VER__)\.tar\.gz
  57. }
  58. %prep
  59. %setup -q
  60. %patch -p0
  61. %{l_shtool} subst \
  62. -e 's;#!/bin/sh;#!%{l_bash};g' \
  63. -e 's;^\(PATH="\)\(.*\)$;\1%{l_prefix}/bin:\2;' \
  64. bzdiff bzgrep bzmore
  65. %{l_shtool} subst \
  66. -e 's;ln -s;ln;g' \
  67. Makefile
  68. %build
  69. # build package
  70. cflags=""
  71. case "%{l_platform -t}" in
  72. sparc64-freebsd* ) cflags="-fPIC" ;;
  73. esac
  74. %{l_make} %{l_mflags} \
  75. CC="%{l_cc}" \
  76. CFLAGS="%{l_cflags -O} -D_FILE_OFFSET_BITS=64 $cflags"
  77. %install
  78. rm -rf $RPM_BUILD_ROOT
  79. # install package
  80. %{l_shtool} mkdir -f -p -m 755 \
  81. $RPM_BUILD_ROOT%{l_prefix}
  82. %{l_make} %{l_mflags} install \
  83. PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  84. # strip down installation
  85. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  86. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  87. # install manual
  88. %{l_shtool} mkdir -f -p -m 755 \
  89. $RPM_BUILD_ROOT%{l_prefix}/share/bzip2
  90. %{l_shtool} install -c -m 644 \
  91. manual.html $RPM_BUILD_ROOT%{l_prefix}/share/bzip2/
  92. # determine installation files
  93. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  94. %{l_files_std} \
  95. '%doc %{l_prefix}/share/bzip2/manual.html'
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT