2 # - add the licence agreement mechanism
3 # - check if this works in opera/konqueror
4 # - check if realplayer-desktop.patch (from realplayer.spec) is needed
7 %bcond_without autodeps # don't BR packages needed only for resolving deps
10 Summary: RealPlayer - RealAudio and RealVideo player
11 Summary(pl): RealPlayer - odtwarzacz RealAudio i RealVideo
18 Version: 10.0.%{minor_ver}
20 License: Helix DNA Technology Binary Research Use License (not distributable, see LICENSE)
21 Group: X11/Applications/Multimedia
22 # download from https://helixcommunity.org/project/showfiles.php?group_id=154
24 Source0: https://helixcommunity.org/download.php/1917/%{name}-%{version}.785-20060201.i586.rpm
25 # NoSource0-md5: 3de2e377fd6f00ea1de8f3016469fe5e
29 Source1: https://helixcommunity.org/download.php/1346/realplay-%{version}.756-linux-2.2-libc6-gcc32-powerpc.bin
30 # NoSource1-md5: d87d35617f07ab9435341f37229dd3ae
33 Patch0: realplayer-desktop.patch
34 URL: http://www.real.com/linux/
36 BuildRequires: rpmbuild(macros) >= 1.312
37 BuildRequires: sed >= 4.0
43 BuildRequires: libstdc++
49 Obsoletes: RealPlayer-gnome
51 ExclusiveArch: %{ix86} ppc
52 ExcludeArch: i386 i486
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 %define _plugindir %{_libdir}/browser-plugins
56 %define browsers mozilla, mozilla-firefox, netscape, seamonkey
57 %define _noautocompressdoc LICENSE README
60 Streaming audio/video/flash/pix/text player.
63 WARNING: this package is vulnerable - see CVE-2006-0323!
67 Odtwarzacz strumieni audio/video/flash/pix/tekst.
70 UWAGA: ten pakiet jest niebezpieczny - szczegó³y w CVE-2006-0323!
73 %package -n browser-plugin-%{name}
74 Summary: RealPlayer plugin for WWW browsers
75 Summary(pl): Wtyczka RealPlayer do przegl±darek WWW
76 Group: X11/Applications/Multimedia
77 Requires: %{name} = %{version}-%{release}
78 Requires: browser-plugins(%{_target_base_arch})
80 %description -n browser-plugin-%{name}
81 RealPlayer plugin for WWW browsers.
83 Supported browsers: %{browsers}.
85 %description -n browser-plugin-%{name} -l pl
86 Wtyczka RealPlayer dla przegl±darek WWW.
88 Obs³ugiwane przegl±darki: %{browsers}.
93 rpm2cpio %{SOURCE0} | cpio -dimu
94 mv -f usr/local/RealPlayer/* .
97 dd if=%{SOURCE1} bs=1 skip=158895 | tar xjf -
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_desktopdir} \
103 $RPM_BUILD_ROOT%{_plugindir} \
104 $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{_name},%{_datadir}/locale} \
105 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{48x48,128x128}/mimetypes \
106 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,32x32,48x48,128x128}/apps
108 cp -a codecs common plugins lib $RPM_BUILD_ROOT%{_libdir}/%{_name}
110 icons="mime-application-generic \
111 mime-application-ogg \
112 mime-application-ram \
113 mime-application-rpm \
114 mime-application-smil \
134 install ${i}_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/mimetypes/${i}.png
135 # SIC! there is no 192 size defined in hicolor, therefore use 128
136 install ${i}_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/mimetypes/${i}.png
138 install realplay_16x16.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/16x16/apps/realplay.png
139 install realplay_32x32.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/apps/realplay.png
140 install realplay_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/realplay.png
141 install realplay_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/apps/realplay.png
144 cp -rf share/locale/* $RPM_BUILD_ROOT%{_datadir}/locale
145 # from realplayer.spec - does it work???
148 # install -d $RPM_BUILD_ROOT%{_datadir}/locale/${LC}/LC_MESSAGES
149 # cp -a ${LC}/player.mo $RPM_BUILD_ROOT%{_datadir}/locale/${LC}/LC_MESSAGES/realplay.mo
150 # cp -a ${LC}/widget.mo $RPM_BUILD_ROOT%{_datadir}/locale/${LC}/LC_MESSAGES/libgtkhx.mo
154 install mozilla/*.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
156 install realplay* $RPM_BUILD_ROOT%{_libdir}/%{_name}
157 ln -sf ../%{_lib}/%{_name}/realplay $RPM_BUILD_ROOT%{_bindir}/realplay
159 install share/realplay.desktop $RPM_BUILD_ROOT%{_desktopdir}
161 install -d $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/{default,realplay}
163 install share/realplay/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/realplay
164 install share/default/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/default
165 install share/*.html $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
166 install share/*.css $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
169 ln -s %{_libdir}/%{_name}/README docs
170 ln -s %{_libdir}/%{_name}/LICENSE docs
172 %{__sed} -i -e 's&#[ \t]*HELIX_LIBS[ \t]*=.*$&HELIX_LIBS=%{_libdir}/%{_name} ; export HELIX_LIBS&' \
173 $RPM_BUILD_ROOT%{_libdir}/realplay/realplay
175 # "player" and "widget" domains
176 %find_lang %{name} --all-name
179 rm -rf $RPM_BUILD_ROOT
183 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
184 %update_icon_cache hicolor
188 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1
189 %update_icon_cache hicolor
191 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
192 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
194 %triggerun -n browser-plugin-%{name} -- mozilla-firefox
195 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
197 %triggerin -n browser-plugin-%{name} -- mozilla
198 %nsplugin_install -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
200 %triggerun -n browser-plugin-%{name} -- mozilla
201 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
203 #triggerin -n browser-plugin-%{name} -- konqueror
204 #nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nphelix.so
206 #triggerun -n browser-plugin-%{name} -- konqueror
207 #nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nphelix.so
209 #triggerin -n browser-plugin-%{name} -- opera
210 #nsplugin_install -d %{_libdir}/opera/plugins nphelix.so
212 #triggerun -n browser-plugin-%{name} -- opera
213 #nsplugin_uninstall -d %{_libdir}/opera/plugins nphelix.so
215 %triggerin -n browser-plugin-%{name} -- seamonkey
216 %nsplugin_install -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
218 %triggerun -n browser-plugin-%{name} -- seamonkey
219 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
221 # as rpm removes the old obsoleted package files after the triggers
222 # above are ran, add another trigger to make the links there.
223 %triggerpostun -n browser-plugin-%{name} -- mozilla-firefox-plugin-RealPlaer
224 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
226 %triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-RealPlayer
227 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
229 %files -f %{name}.lang
230 %defattr(644,root,root,755)
231 %doc docs/{LICENSE,README}
232 %attr(755,root,root) %{_bindir}/realplay
233 %dir %{_libdir}/%{_name}
234 %dir %{_libdir}/%{_name}/codecs
235 %attr(755,root,root) %{_libdir}/%{_name}/codecs/*.so*
236 %dir %{_libdir}/%{_name}/common
237 %attr(755,root,root) %{_libdir}/%{_name}/common/*.so*
238 %dir %{_libdir}/%{_name}/lib
239 %attr(755,root,root) %{_libdir}/%{_name}/lib/*.so*
240 %dir %{_libdir}/%{_name}/plugins
241 %attr(755,root,root) %{_libdir}/%{_name}/plugins/*.so*
242 %attr(755,root,root) %{_libdir}/%{_name}/realplay
243 %attr(755,root,root) %{_libdir}/%{_name}/realplay.bin
244 %{_libdir}/%{_name}/share
245 %{_libdir}/%{_name}/LICENSE
246 %{_libdir}/%{_name}/README
247 %{_iconsdir}/hicolor/*/*/*.png
248 %{_desktopdir}/*.desktop
250 %files -n browser-plugin-%{name}
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_plugindir}/*.so