1 |
%define _mozillapluginpath %{_libdir}/mozilla/plugins |
2 |
%define _mozillacomponentpath %{_libdir}/mozilla/plugins |
3 |
%define xulrunner_version %(rpm -q --whatprovides libxulrunner --queryformat %{VERSION}) |
4 |
%define snapshot %{nil} |
5 |
|
6 |
%define build_3264bit 0 |
7 |
%{?_with_3264bit: %{expand: %%global build_3264bit 1}} |
8 |
%{?_without_3264bit: %{expand: %%global build_3264bit 0}} |
9 |
%if %{build_3264bit} |
10 |
%define pkgext 32 |
11 |
%else |
12 |
%define pkgext %{nil} |
13 |
%endif |
14 |
|
15 |
Summary: A browser plugin to allow playing embedded movies on web pages |
16 |
Name: mplayerplugin%{pkgext} |
17 |
Version: 3.55 |
18 |
Release: %mkrel 5 |
19 |
License: GPLv2+ |
20 |
Group: Networking/WWW |
21 |
URL: http://mplayerplug-in.sourceforge.net |
22 |
Source0: http://heanet.dl.sourceforge.net/sourceforge/mplayerplug-in/mplayerplug-in-%{version}.tar.bz2 |
23 |
Patch0: mplayerplugin-3.01-mime.patch |
24 |
Patch1: mplayerplugin-3.50-32_64bit.patch |
25 |
Patch5: mplayerplug-in-3.55-types-nomidi.patch |
26 |
Patch6: mplayerplug-in-3.55-cvs20090908.patch |
27 |
BuildRequires: X11-devel |
28 |
%if %{mdkversion} >= 200900 |
29 |
BuildRequires: xulrunner-devel |
30 |
%endif |
31 |
%if %{mdkversion} > 1020 && %{mdkversion} < 200900 |
32 |
BuildRequires: mozilla-firefox-devel |
33 |
%endif |
34 |
%if %{mdkversion} < 1020 |
35 |
BuildRequires: mozilla-devel |
36 |
%endif |
37 |
BuildRequires: gtk+2-devel |
38 |
Requires: mplayer%{pkgext} >= 1.0 |
39 |
Conflicts: mozplugger < 1.5.2-2mdk |
40 |
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot |
41 |
|
42 |
%description |
43 |
Mplayerplug-in is a Netscape/Mozilla browser plugin to allow |
44 |
playing embedded movies on web pages. |
45 |
|
46 |
%prep |
47 |
%setup -qn mplayerplug-in-%{version} |
48 |
%patch0 -p1 -b .mime |
49 |
%if %{build_3264bit} |
50 |
%patch1 -p1 -b .32_64 |
51 |
%endif |
52 |
%patch5 -p1 -b .nomidi |
53 |
%patch6 -p1 -b .cvs |
54 |
|
55 |
%build |
56 |
%if %{mdkversion} > 200900 |
57 |
autoreconf -fiv |
58 |
#(tpg) hack to include prtime.h and prtypes.h from nsrp4-devel |
59 |
export CFLAGS="%{optflags} -I/usr/include/nspr4" |
60 |
export CXXFLAGS=$CFLAGS |
61 |
%endif |
62 |
|
63 |
%configure2_5x \ |
64 |
--enable-wmp \ |
65 |
--enable-qt \ |
66 |
--enable-gmp \ |
67 |
--enable-rm \ |
68 |
--enable-dvx \ |
69 |
--disable-rpath \ |
70 |
--disable-x \ |
71 |
--disable-gtk1 \ |
72 |
--enable-gtk2 \ |
73 |
--with-gecko-sdk="%{_libdir}/xulrunner-devel-%{xulrunner_version}" |
74 |
|
75 |
%make |
76 |
|
77 |
%install |
78 |
rm -rf %{buildroot} |
79 |
mkdir -p %{buildroot}%{_bindir} \ |
80 |
%{buildroot}%{_sysconfdir} \ |
81 |
%{buildroot}%{_mozillapluginpath} \ |
82 |
%{buildroot}%{_mozillacomponentpath} |
83 |
|
84 |
cat > %{buildroot}%{_sysconfdir}/mplayerplug-in%{pkgext}.conf <<EOF |
85 |
# Enable debugging if set to 1 (default=0) |
86 |
debug=0 |
87 |
|
88 |
# Video output |
89 |
vo=xv,x11 |
90 |
|
91 |
# Audio output |
92 |
%if %{mdkversion} >= 200810 |
93 |
ao=pulse,esd,alsa,oss,arts,null |
94 |
%else |
95 |
ao=esd,alsa,oss,arts,null |
96 |
%endif |
97 |
|
98 |
# Passes display to show output to, useful for multiple monitor setups |
99 |
#display=[display name] |
100 |
|
101 |
# Tells mplayer to allow default video post processing or not (default=0) |
102 |
#novop=1 |
103 |
|
104 |
# Pass special video post processing |
105 |
#vopopt=[mplayer vop options] |
106 |
|
107 |
# Option for rtsp streams, set to 1 when behind proxy (default=0) |
108 |
rtsp-use-tcp=1 |
109 |
|
110 |
# OSD Level (default=0) |
111 |
osdlevel=1 |
112 |
|
113 |
# When set to 1 uses the aspect of movie no matter what (default=1) |
114 |
#prefer-aspect=0 |
115 |
|
116 |
# If set to 1, forces mplayer to be in it's own window (default=0) |
117 |
#noembed=0 |
118 |
|
119 |
# If set to 1, mplayer will be launced in its own window if the url is not |
120 |
# an embed tag (default=0) |
121 |
#fileonly-embed=1 |
122 |
|
123 |
# Where to store the downloaded movies |
124 |
dload-dir=\$HOME/tmp |
125 |
|
126 |
# Download file before playing (default=0) |
127 |
#download=1 |
128 |
|
129 |
# Set to 1 if you want to keep downloaded media (default=0) |
130 |
#keep-download=1 |
131 |
|
132 |
# Cache Size in kB. This is the buffer size before the video plays (default=512) |
133 |
cachesize=2048 |
134 |
|
135 |
# Percent of file to load into cache (default=25) |
136 |
#cache-percent=10 |
137 |
|
138 |
# Read mime types to handle from \$HOME/{.mplayer,.mozilla}, /etc/mplayerplug-in.types |
139 |
use-mimetypes=1 |
140 |
|
141 |
# Set QT Speeed, use "low" for dialup, "med" (default) for DSL, "high" for more |
142 |
#qt-speed=low |
143 |
|
144 |
# Enable/Disable Mpeg mime-types (default=1) |
145 |
#enable-mpeg=0 |
146 |
|
147 |
# Enable/Disable MP3 Support (default=1) |
148 |
#enable-mp3=0 |
149 |
|
150 |
# Enable/Disable Ogg mime-types (default=1) |
151 |
#enable-ogg=0 |
152 |
|
153 |
# Enable/Disable Smil (Synchronized Multimedia Integration Language, default=1) |
154 |
#enable-smil=0 |
155 |
|
156 |
# Enable/Disable Helix compatibility (avoid nphelix.so to handle its |
157 |
# own mime types, default=1) |
158 |
enable-helix=0 |
159 |
|
160 |
# Enable/Disable Windows Media Support (default=1) |
161 |
#enable-wmp=0 |
162 |
|
163 |
# Enable/Disable QuickTime Support (default=1) |
164 |
#enable-qt=0 |
165 |
|
166 |
# Enable/Disable RealMedia Support (default=1) |
167 |
#enable-rm=0 |
168 |
|
169 |
# Enable PLS Support (default=1, mime type: audio/x-scpls, Shoutcast Playlist) |
170 |
#enable-pls=0 |
171 |
|
172 |
# Enable/Disable midi Support (default=1) |
173 |
enable-midi=0 |
174 |
|
175 |
# Enable/Disable gmp Support (default=1, |
176 |
# mime type: application/x-google-vlc-plugin, Google Video) |
177 |
#enable-gmp=0 |
178 |
|
179 |
# For Live.com video behind a proxy |
180 |
#rtsp-use-tcp=0 |
181 |
|
182 |
# Black background |
183 |
#black-background=0 |
184 |
|
185 |
# Disable media cache |
186 |
#nomediacache=0 |
187 |
|
188 |
# Skip displaying some frames (default=0) |
189 |
#framedrop=0 |
190 |
|
191 |
# Gradually adjusts the A/V sync based on audio delay measurements |
192 |
#autosync=0 |
193 |
|
194 |
# Maximum A-V sync correction per frame |
195 |
#mc=0 |
196 |
|
197 |
# User-Agent |
198 |
#user-agent=NSPlayer |
199 |
|
200 |
# Disable mouse button press/release input (default=1) |
201 |
#nomouseinput=0 |
202 |
|
203 |
# Disable reading key events from standard input (default=1) |
204 |
#noconsolecontrols=1 |
205 |
|
206 |
# Send cookies when making HTTP request |
207 |
#cookies=1 |
208 |
|
209 |
# When set to 1 disables the pausing of video files when they are |
210 |
# covered/hidden in the browser (default=0) |
211 |
nopauseonhide=1 |
212 |
|
213 |
# When set to 0, media will not start until play is clicked (default=1) |
214 |
#autostart=0 |
215 |
|
216 |
# Option showing the logo, 0 = no logo shown (default=1) |
217 |
#slowlogo=0 |
218 |
|
219 |
# Option showing the time in the progress bar, 0 = no time shown (default=1) |
220 |
showtime=1 |
221 |
|
222 |
# Option showing the media progress bar, 0 = not shown (default=1) |
223 |
#showtracker=0 |
224 |
|
225 |
# When set to 1, no status messages are shown (default=0) |
226 |
#hidestatus=1 |
227 |
EOF |
228 |
|
229 |
install -m 755 mplayerplug-in.so %{buildroot}%{_mozillapluginpath} |
230 |
install -m 644 mplayerplug-in.xpt %{buildroot}%{_mozillacomponentpath} |
231 |
|
232 |
install -m 755 mplayerplug-in-wmp.so %{buildroot}%{_mozillapluginpath} |
233 |
install -m 644 mplayerplug-in-wmp.xpt %{buildroot}%{_mozillacomponentpath} |
234 |
|
235 |
install -m 755 mplayerplug-in-qt.so %{buildroot}%{_mozillapluginpath} |
236 |
install -m 755 mplayerplug-in-qt.xpt %{buildroot}%{_mozillacomponentpath} |
237 |
|
238 |
install -m 755 mplayerplug-in-rm.so %{buildroot}%{_mozillapluginpath} |
239 |
install -m 755 mplayerplug-in-rm.xpt %{buildroot}%{_mozillacomponentpath} |
240 |
|
241 |
install -m 755 mplayerplug-in-gmp.so %{buildroot}%{_mozillapluginpath} |
242 |
install -m 755 mplayerplug-in-gmp.xpt %{buildroot}%{_mozillacomponentpath} |
243 |
|
244 |
install -m 755 mplayerplug-in-dvx.so %{buildroot}%{_mozillapluginpath} |
245 |
install -m 755 mplayerplug-in-dvx.xpt %{buildroot}%{_mozillacomponentpath} |
246 |
|
247 |
install -m 644 mplayerplug-in.types %{buildroot}%{_sysconfdir} |
248 |
|
249 |
# install translations |
250 |
%makeinstall_std -C po DESTDIR=%{buildroot} |
251 |
%find_lang mplayerplug-in |
252 |
%if %{build_3264bit} |
253 |
mv -f %{buildroot}%{_sysconfdir}/mplayerplug-in.types \ |
254 |
%{buildroot}%{_sysconfdir}/mplayerplug-in%{pkgext}.types |
255 |
%endif |
256 |
|
257 |
%clean |
258 |
rm -rf %{buildroot} |
259 |
|
260 |
%files -f mplayerplug-in.lang |
261 |
%defattr(-,root,root) |
262 |
%doc ChangeLog INSTALL README |
263 |
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/mplayerplug-in%{pkgext}.conf |
264 |
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/mplayerplug-in%{pkgext}.types |
265 |
%{_mozillapluginpath}/mplayerplug-in.so |
266 |
%{_mozillapluginpath}/mplayerplug-in-wmp.so |
267 |
%{_mozillapluginpath}/mplayerplug-in-qt.so |
268 |
%{_mozillapluginpath}/mplayerplug-in-rm.so |
269 |
%{_mozillapluginpath}/mplayerplug-in-gmp.so |
270 |
%{_mozillapluginpath}/mplayerplug-in-dvx.so |
271 |
%{_mozillacomponentpath}/mplayerplug-in.xpt |
272 |
%{_mozillacomponentpath}/mplayerplug-in-wmp.xpt |
273 |
%{_mozillacomponentpath}/mplayerplug-in-qt.xpt |
274 |
%{_mozillacomponentpath}/mplayerplug-in-rm.xpt |
275 |
%{_mozillacomponentpath}/mplayerplug-in-gmp.xpt |
276 |
%{_mozillacomponentpath}/mplayerplug-in-dvx.xpt |
277 |
|
278 |
|