mozilla-mplayer.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. ##
  2. ## mozilla-mplayer.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 information
  26. Name: mozilla-mplayer
  27. Summary: Mozilla MPlayer Plugin
  28. URL: http://mplayerplug-in.sourceforge.net/
  29. Vendor: Kevin DeKorte
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Web
  34. License: GPL
  35. Version: 2.66
  36. Release: 20040917
  37. # list of sources
  38. Source0: http://osdn.dl.sourceforge.net/mplayerplug-in/mplayerplug-in-%{version}.tar.gz
  39. Patch0: mozilla-mplayer.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  44. PreReq: OpenPKG, openpkg >= 20040130, mplayer
  45. BuildPreReq: X11, mozilla, mozilla::with_sdk = yes
  46. PreReq: X11, mozilla, mozilla::with_sdk = yes
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. This is the MPLayer Plugin for the Mozilla web browser. It allows
  51. embedded playing of Windows Media, Quicktime and MPEG video format
  52. files.
  53. %track
  54. prog mozilla-mplayer = {
  55. version = %{version}
  56. url = http://prdownloads.sourceforge.net/mplayerplug-in/
  57. regex = mplayerplug-in-(__VER__)\.tar\.gz
  58. }
  59. %prep
  60. %setup -q -n mplayerplug-in
  61. %patch -p0
  62. %{l_shtool} subst \
  63. -e '/\/etc\/mplayerplug/s;/etc;%{l_prefix}/etc/mozilla-mplayer;' \
  64. Source/plugin-setup.cpp
  65. %build
  66. # determine standard build flags
  67. export CC="%{l_cc}"
  68. export CPPFLAGS="%{l_cppflags}"
  69. export CFLAGS="%{l_cflags -O} %{l_cppflags}"
  70. export LDFLAGS="%{l_ldflags}"
  71. export LIBS="%{l_ldflags}"
  72. # determine additional X11 build flags
  73. CPPFLAGS="$CPPFLAGS -I`%{l_prefix}/etc/rc --query x11_incdir`"
  74. CFLAGS="$CFLAGS -I`%{l_prefix}/etc/rc --query x11_incdir`"
  75. LDFLAGS="$LDFLAGS -L`%{l_prefix}/etc/rc --query x11_libdir`"
  76. LIBS="$LIBS -L`%{l_prefix}/etc/rc --query x11_libdir`"
  77. # determine additional Mozilla build flags
  78. CPPFLAGS="$CPPFLAGS `pkg-config mozilla-plugin --cflags-only-I`"
  79. CFLAGS="$CFLAGS `pkg-config mozilla-plugin --cflags-only-other`"
  80. LDFLAGS="$LDFLAGS `pkg-config mozilla-plugin --libs-only-L`"
  81. LIBS="$LIBS `pkg-config mozilla-plugin --libs-only-other`"
  82. LIBS="$LIBS %{l_ldflags mozilla}"
  83. # configure plugin
  84. ./configure \
  85. --prefix=%{l_prefix} \
  86. --with-x \
  87. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  88. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  89. --disable-gtk2 \
  90. --enable-gtk1 \
  91. --with-gecko-sdk=%{l_prefix}/lib/mozilla
  92. # build plugin
  93. %{l_make} %{l_mflags}
  94. %install
  95. # install plugin
  96. rm -rf $RPM_BUILD_ROOT
  97. %{l_shtool} mkdir -f -p -m 755 \
  98. $RPM_BUILD_ROOT%{l_prefix}/etc/mozilla-mplayer \
  99. $RPM_BUILD_ROOT%{l_prefix}/lib/mozilla/plugins
  100. %{l_shtool} install -c -m 755 \
  101. mplayerplug-in.so $RPM_BUILD_ROOT%{l_prefix}/lib/mozilla/plugins/
  102. %{l_shtool} install -c -m 644 \
  103. mplayerplug-in.conf mplayerplug-in.types \
  104. $RPM_BUILD_ROOT%{l_prefix}/etc/mozilla-mplayer/
  105. # determine installation files
  106. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  107. %{l_files_std} \
  108. '%config %{l_prefix}/etc/mozilla-mplayer/*' \
  109. '%not %dir %{l_prefix}/lib/mozilla' \
  110. '%not %dir %{l_prefix}/lib/mozilla/plugins'
  111. %files -f files
  112. %clean
  113. rm -rf $RPM_BUILD_ROOT