mozilla-mplayer.spec 4.4 KB

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