unrar.spec 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ##
  2. ## unrar.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. %define V_real 2.50
  26. %define V_src 250
  27. # package information
  28. Name: unrar
  29. Summary: Extracting Tool for RAR Format Files
  30. URL: ftp://ftp.elf.stuba.sk/pub/pc/pack/
  31. Vendor: Eugene Roshal
  32. Packager: The OpenPKG Project
  33. Distribution: OpenPKG [PLUS]
  34. Group: Archiver
  35. License: freely distributable
  36. Version: %{V_real}
  37. Release: 20020321
  38. # list of sources
  39. Source0: ftp://ftp.elf.stuba.sk/pub/pc/pack/unrar%{V_src}.zip
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20020206, infozip
  44. PreReq: OpenPKG, openpkg >= 20020206
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. The unRAR utility is a program for extracting, testing and viewing the
  49. contents of archives created with the RAR archiver, version 1.50 and
  50. above.
  51. %prep
  52. ( cd $RPM_BUILD_DIR
  53. rm -rf %{name}-%{version}
  54. %{l_prefix}/bin/unzip -q %{SOURCE0}
  55. )
  56. %build
  57. ( cd $RPM_BUILD_DIR/%{name}-%{version}/src
  58. cflags=""
  59. case "%{l_target}" in
  60. sparc*-* ) cflags="$cflags -DNON_INTEL_BYTE_ORDER" ;;
  61. esac
  62. %{l_cc} %{l_cflags -O} $cflags -o unrar unrar.c
  63. )
  64. %install
  65. rm -rf $RPM_BUILD_ROOT
  66. ( cd $RPM_BUILD_DIR/%{name}-%{version}/src
  67. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  68. %{l_shtool} install -c -s -m 755 unrar $RPM_BUILD_ROOT%{l_prefix}/bin/
  69. )
  70. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  71. %files -f files
  72. %clean
  73. rm -rf $RPM_BUILD_ROOT