infozip.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. ##
  2. ## infozip.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 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 versions
  25. %define V_zip_here 2.32
  26. %define V_zip_real 232
  27. %define V_unzip_here 5.52
  28. %define V_unzip_real 552
  29. # package information
  30. Name: infozip
  31. Summary: Un-/Packing Tools for [PK]ZIP Files
  32. URL: http://www.info-zip.org/pub/infozip/
  33. Vendor: Samuel H. Smith, Greg Roelofs
  34. Packager: OpenPKG
  35. Distribution: OpenPKG
  36. Class: BASE
  37. Group: Archiver
  38. License: BSD
  39. Version: %{V_zip_here}.%{V_unzip_here}
  40. Release: 20060702
  41. # list of sources
  42. Source0: ftp://ftp.info-zip.org/pub/infozip/src/zip%{V_zip_real}.tar.gz
  43. Source1: ftp://ftp.info-zip.org/pub/infozip/src/unzip%{V_unzip_real}.tar.gz
  44. Patch0: infozip.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  49. PreReq: OpenPKG, openpkg >= 20040130
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Info-ZIP provides free, portable, high-quality versions of the Zip
  54. and UnZip compressor-archiver utilities that are compatible with the
  55. DOS-based PKZIP by PKWARE, Inc.
  56. %track
  57. prog infozip:unzip = {
  58. version = %{V_unzip_real}
  59. url = ftp://ftp.info-zip.org/pub/infozip/src/
  60. regex = unzip(__VER__)\.tar\.gz
  61. }
  62. prog infozip:zip = {
  63. version = %{V_zip_real}
  64. url = ftp://ftp.info-zip.org/pub/infozip/src/
  65. regex = [^n]zip(__VER__)\.tar\.gz
  66. }
  67. %prep
  68. %setup -q -c
  69. %setup -q -T -D -a 1
  70. %patch -p0
  71. %{l_shtool} subst \
  72. -e 's;@l_cpp@;%{l_cc} -E;' \
  73. zip-%{V_zip_here}/unix/configure
  74. %build
  75. ( cd zip-%{V_zip_here}
  76. %{l_make} %{l_mflags} -f unix/Makefile generic
  77. ) || exit $?
  78. ( cd unzip-%{V_unzip_here}
  79. os=generic
  80. case "%{l_platform -t}" in
  81. *-linux* ) os=linux_noasm ;;
  82. *-sunos* ) os=solaris ;;
  83. ix86-freebsd* ) os=freebsd ;;
  84. *-freebsd* ) os=bsd ;;
  85. esac
  86. %{l_make} %{l_mflags} -f unix/Makefile $os
  87. ) || exit $?
  88. %install
  89. rm -rf $RPM_BUILD_ROOT
  90. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  91. ( cd zip-%{V_zip_here}
  92. %{l_make} %{l_mflags} -f unix/Makefile install \
  93. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  94. INSTALL="%{l_shtool} install -c" \
  95. INSTALL_D="%{l_shtool} mkdir -f -p -m 755"
  96. ) || exit $?
  97. ( cd unzip-%{V_unzip_here}
  98. %{l_make} %{l_mflags} -f unix/Makefile install \
  99. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  100. INSTALL_D="%{l_shtool} mkdir -f -p -m 755"
  101. ) || exit $?
  102. chmod -R u+w $RPM_BUILD_ROOT%{_prefix}
  103. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  105. %files -f files
  106. %clean
  107. rm -rf $RPM_BUILD_ROOT