2 # - add the licence agreement mechanism
3 # - check if this works in opera/konqueror
4 # NOTE: there are partial sources available
5 # (https://helixcommunity.org/frs/download.php/2153/realplay-10.0.8-source.tar.bz2)
6 # but included binary blobs are only for x86
9 %bcond_without autodeps # don't BR packages needed only for resolving deps
11 %define _name realplay
12 Summary: RealPlayer - RealAudio and RealVideo player
13 Summary(pl.UTF-8): RealPlayer - odtwarzacz RealAudio i RealVideo
20 Version: 10.0.%{minor_ver}
22 License: Helix DNA Technology Binary Research Use License (not distributable, see LICENSE)
23 Group: X11/Applications/Multimedia
24 # download from https://helixcommunity.org/project/showfiles.php?group_id=154
26 Source0: https://helixcommunity.org/frs/download.php/2151/realplay-%{version}.805-linux-2.2-libc6-gcc32-i586.bin
27 # NoSource0-md5: d28b31261059231a3e93c7466f8153e6
31 Source1: https://helixcommunity.org/frs/download.php/1346/realplay-%{version}.756-linux-2.2-libc6-gcc32-powerpc.bin
32 # NoSource1-md5: d87d35617f07ab9435341f37229dd3ae
35 Patch0: realplayer-desktop.patch
36 URL: http://www.real.com/linux/
38 BuildRequires: rpmbuild(macros) >= 1.312
39 BuildRequires: sed >= 4.0
45 BuildRequires: libstdc++
48 Requires(post,postun): hicolor-icon-theme
52 Obsoletes: RealPlayer-gnome
54 ExclusiveArch: %{ix86} ppc
55 ExcludeArch: i386 i486
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 %define _plugindir %{_libdir}/browser-plugins
59 %define browsers mozilla, mozilla-firefox, netscape, seamonkey
60 %define _noautocompressdoc LICENSE README
63 Streaming audio/video/flash/pix/text player.
66 WARNING: this package is vulnerable - see CVE-2006-0323!
69 %description -l pl.UTF-8
70 Odtwarzacz strumieni audio/video/flash/pix/tekst.
73 UWAGA: ten pakiet jest niebezpieczny - szczegóły w CVE-2006-0323!
76 %package -n browser-plugin-%{name}
77 Summary: RealPlayer plugin for WWW browsers
78 Summary(pl.UTF-8): Wtyczka RealPlayer do przeglądarek WWW
79 Group: X11/Applications/Multimedia
80 Requires: %{name} = %{version}-%{release}
81 Requires: browser-plugins(%{_target_base_arch})
83 %description -n browser-plugin-%{name}
84 RealPlayer plugin for WWW browsers.
86 Supported browsers: %{browsers}.
88 %description -n browser-plugin-%{name} -l pl.UTF-8
89 Wtyczka RealPlayer dla przeglądarek WWW.
91 Obsługiwane przeglądarki: %{browsers}.
96 dd if=%{SOURCE0} bs=1 skip=143273 | tar xjf -
99 dd if=%{SOURCE1} bs=1 skip=158895 | tar xjf -
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT%{_desktopdir} \
106 $RPM_BUILD_ROOT%{_plugindir} \
107 $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{_name}} \
108 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{48x48,128x128}/mimetypes \
109 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,32x32,48x48,128x128}/apps
111 cp -a codecs common plugins lib $RPM_BUILD_ROOT%{_libdir}/%{_name}
113 icons="mime-application-generic \
114 mime-application-ogg \
115 mime-application-ram \
116 mime-application-rpm \
117 mime-application-smil \
137 install ${i}_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/mimetypes/${i}.png
138 # SIC! there is no 192 size defined in hicolor, therefore use 128
139 install ${i}_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/mimetypes/${i}.png
141 install realplay_16x16.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/16x16/apps/realplay.png
142 install realplay_32x32.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/apps/realplay.png
143 install realplay_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/realplay.png
144 install realplay_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/apps/realplay.png
147 # install locales in proper domains
150 install -d $RPM_BUILD_ROOT%{_datadir}/locale/${LC}/LC_MESSAGES
151 cp -a ${LC}/player.mo $RPM_BUILD_ROOT%{_datadir}/locale/${LC}/LC_MESSAGES/realplay.mo
152 cp -a ${LC}/widget.mo $RPM_BUILD_ROOT%{_datadir}/locale/${LC}/LC_MESSAGES/libgtkhx.mo
156 install mozilla/*.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
158 install realplay* $RPM_BUILD_ROOT%{_libdir}/%{_name}
159 ln -sf ../%{_lib}/%{_name}/realplay $RPM_BUILD_ROOT%{_bindir}/realplay
161 install share/realplay.desktop $RPM_BUILD_ROOT%{_desktopdir}
163 install -d $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/{default,realplay}
165 install share/realplay/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/realplay
166 install share/default/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/default
167 install share/*.html $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
168 install share/*.css $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
169 cp -a README LICENSE $RPM_BUILD_ROOT%{_libdir}/%{_name}
172 ln -s %{_libdir}/%{_name}/README docs
173 ln -s %{_libdir}/%{_name}/LICENSE docs
175 %{__sed} -i -e 's&#[ \t]*HELIX_LIBS[ \t]*=.*$&HELIX_LIBS=%{_libdir}/%{_name} ; export HELIX_LIBS&' \
176 $RPM_BUILD_ROOT%{_libdir}/realplay/realplay
178 # "realplay" and "libgtkhx" domains
179 %find_lang %{name} --all-name
182 rm -rf $RPM_BUILD_ROOT
186 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
187 %update_icon_cache hicolor
191 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1
192 %update_icon_cache hicolor
194 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
195 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
197 %triggerun -n browser-plugin-%{name} -- mozilla-firefox
198 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
200 %triggerin -n browser-plugin-%{name} -- mozilla
201 %nsplugin_install -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
203 %triggerun -n browser-plugin-%{name} -- mozilla
204 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
206 #triggerin -n browser-plugin-%{name} -- konqueror
207 #nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nphelix.so
209 #triggerun -n browser-plugin-%{name} -- konqueror
210 #nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nphelix.so
212 #triggerin -n browser-plugin-%{name} -- opera
213 #nsplugin_install -d %{_libdir}/opera/plugins nphelix.so
215 #triggerun -n browser-plugin-%{name} -- opera
216 #nsplugin_uninstall -d %{_libdir}/opera/plugins nphelix.so
218 %triggerin -n browser-plugin-%{name} -- seamonkey
219 %nsplugin_install -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
221 %triggerun -n browser-plugin-%{name} -- seamonkey
222 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
224 # as rpm removes the old obsoleted package files after the triggers
225 # above are ran, add another trigger to make the links there.
226 %triggerpostun -n browser-plugin-%{name} -- mozilla-firefox-plugin-RealPlaer
227 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
229 %triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-RealPlayer
230 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
232 %files -f %{name}.lang
233 %defattr(644,root,root,755)
234 %doc docs/{LICENSE,README}
235 %attr(755,root,root) %{_bindir}/realplay
236 %dir %{_libdir}/%{_name}
237 %dir %{_libdir}/%{_name}/codecs
238 %attr(755,root,root) %{_libdir}/%{_name}/codecs/*.so*
239 %dir %{_libdir}/%{_name}/common
240 %attr(755,root,root) %{_libdir}/%{_name}/common/*.so*
241 %dir %{_libdir}/%{_name}/lib
242 %attr(755,root,root) %{_libdir}/%{_name}/lib/*.so*
243 %dir %{_libdir}/%{_name}/plugins
244 %attr(755,root,root) %{_libdir}/%{_name}/plugins/*.so*
245 %attr(755,root,root) %{_libdir}/%{_name}/realplay
246 %attr(755,root,root) %{_libdir}/%{_name}/realplay.bin
247 %{_libdir}/%{_name}/share
248 %{_libdir}/%{_name}/LICENSE
249 %{_libdir}/%{_name}/README
250 %{_iconsdir}/hicolor/*/*/*.png
251 %{_desktopdir}/*.desktop
253 %files -n browser-plugin-%{name}
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_plugindir}/*.so