opera.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##
  2. ## opera.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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. # package version
  26. %define V_real 7.54
  27. %define V_comp 754
  28. %define V_date 20040803.1
  29. # package information
  30. Name: opera
  31. Summary: Graphical Web Browser
  32. URL: http://www.opera.com/
  33. Vendor: Opera Software
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG
  36. Class: EVAL
  37. Group: Web
  38. License: Commercial
  39. Version: %{V_real}
  40. Release: 20040806
  41. # list of sources
  42. Source0: ftp://ftp.opera.com/pub/opera/unix/freebsd/%{V_comp}/final/en/static/opera-%{V_real}-%{V_date}-static-qt.i386.freebsd-en.tar.bz2
  43. Source1: ftp://ftp.opera.com/pub/opera/unix/solaris/%{V_comp}/final/en/static/opera-%{V_real}-%{V_date}-static-qt-sol8-sparc-local-en.tar.bz2
  44. Source2: ftp://ftp.opera.com/pub/opera/linux/%{V_comp}/final/en/i386/static/opera-%{V_real}-%{V_date}-static-qt.i386-en.tar.bz2
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130
  49. PreReq: OpenPKG, openpkg >= 20040130, X11
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Opera is a very fast graphical web browser.
  54. %track
  55. prog opera:freebsd = {
  56. version = %{V_comp}
  57. url = ftp://ftp.opera.com/pub/opera/unix/freebsd/
  58. regex = (\d\d\d)
  59. }
  60. prog opera:linux = {
  61. version = %{V_comp}
  62. url = ftp://ftp.opera.com/pub/opera/linux/
  63. regex = (\d\d\d)
  64. }
  65. prog opera:solaris = {
  66. version = %{V_comp}
  67. url = ftp://ftp.opera.com/pub/opera/unix/solaris/
  68. regex = (\d\d\d)
  69. }
  70. %prep
  71. %setup -q -c -T
  72. case "%{l_platform -t}" in
  73. i?86-freebsd[45]* ) src="%{SOURCE0}" ;;
  74. sun4?-sunos5* ) src="%{SOURCE1}" ;;
  75. i?86-linux2* ) src="%{SOURCE2}" ;;
  76. * ) echo "Platform \"%{l_platform -t}\" not supported" 1>&2; exit 1 ;;
  77. esac
  78. %{l_bzip2} -d -c $src | %{l_tar} xf -
  79. %build
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. ( cd opera-*
  83. ./install.sh \
  84. --DESTDIR=$RPM_BUILD_ROOT \
  85. --exec_prefix=%{l_prefix}/libexec/opera \
  86. --wrapperdir=%{l_prefix}/bin \
  87. --docdir=%{l_prefix}/doc/opera \
  88. --sharedir=%{l_prefix}/share/opera \
  89. --plugindir=%{l_prefix}/libexec/opera \
  90. --verbose
  91. rm -rf $RPM_BUILD_ROOT%{l_prefix}/doc >/dev/null 2>&1 || true
  92. ) || exit $?
  93. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  94. %files -f files
  95. %clean
  96. rm -rf $RPM_BUILD_ROOT