3 # - add the licence agreement mechanism
6 Summary: RealPlayer - RealAudio and RealVideo player
7 Summary(pl): RealPlayer - odtwarzacz RealAudio i RealVideo
14 Version: 10.0.%{minor_ver}
16 License: Helix DNA Technology Binary Research Use License (not distributable, see LICENSE)
17 Group: X11/Applications/Multimedia
18 # download from https://helixcommunity.org/project/showfiles.php?group_id=154
20 Source0: RealPlayer10GOLD.rpm
21 # NoSource0-md5: 3de2e377fd6f00ea1de8f3016469fe5e
25 Source1: https://helixcommunity.org/download.php/1346/realplay-%{version}.756-linux-2.2-libc6-gcc32-powerpc.bin
26 # NoSource1-md5: d87d35617f07ab9435341f37229dd3ae
29 URL: http://www.real.com/linux/
31 BuildRequires: rpmbuild(macros) >= 1.312
32 BuildRequires: sed >= 4.0
36 Obsoletes: RealPlayer-gnome
38 ExclusiveArch: %{ix86} ppc
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %define _plugindir %{_libdir}/browser-plugins
42 %define browsers mozilla, mozilla-firefox, netscape, seamonkey
45 Streaming audio/video/flash/pix/text player.
48 Odtwarzacz strumieni audio/video/flash/pix/tekst.
50 %package -n browser-plugin-%{name}
51 Summary: RealPlayer plugin for WWW browsers
52 Summary(pl): Wtyczka RealPlayer do przegl±darek WWW
53 Group: X11/Applications/Multimedia
54 Requires: %{name} = %{version}-%{release}
55 Requires: browser-plugins(%{_target_base_arch})
57 %description -n browser-plugin-%{name}
58 RealPlayer plugin for WWW browsers.
60 Supported browsers: %{browsers}.
62 %description -n browser-plugin-%{name} -l pl
63 Wtyczka RealPlayer dla przegl±darek WWW.
65 Obs³ugiwane przegl±darki: %{browsers}.
70 rpm2cpio %{SOURCE0} | cpio -dimu
71 mv -f usr/local/RealPlayer/* .
74 dd if=%{SOURCE1} bs=1 skip=158895 | tar xjf -
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT%{_desktopdir} \
80 $RPM_BUILD_ROOT%{_plugindir} \
81 $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{_name},%{_datadir}/locale} \
82 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{48x48,128x128}/mimetypes \
83 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,32x32,48x48,128x128}/apps
85 cp -a codecs common plugins lib $RPM_BUILD_ROOT%{_libdir}/%{_name}
87 icons="mime-application-generic \
88 mime-application-ogg \
89 mime-application-ram \
90 mime-application-rpm \
91 mime-application-smil \
111 install ${i}_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/mimetypes/${i}.png
112 # SIC! there is no 192 size defined in hicolor, therefore use 128
113 install ${i}_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/mimetypes/${i}.png
115 install realplay_16x16.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/16x16/apps/realplay.png
116 install realplay_32x32.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/apps/realplay.png
117 install realplay_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/realplay.png
118 install realplay_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/apps/realplay.png
121 cp -rf share/locale/* $RPM_BUILD_ROOT%{_datadir}/locale
123 install mozilla/*.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
125 install realplay* $RPM_BUILD_ROOT%{_libdir}/%{_name}
126 ln -sf ../lib/%{_name}/realplay $RPM_BUILD_ROOT%{_bindir}/realplay
128 install share/realplay.desktop $RPM_BUILD_ROOT%{_desktopdir}
130 install -d $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/{default,realplay}
132 install share/realplay/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/realplay
133 install share/default/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/default
134 install share/*.html $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
135 install share/*.css $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
137 %{__sed} -i -e 's&#[ \t]*HELIX_LIBS[ \t]*=.*$&HELIX_LIBS=%{_libdir}/%{_name} ; export HELIX_LIBS&' \
138 $RPM_BUILD_ROOT%{_libdir}/realplay/realplay
140 # "player" and "widget" domains
141 %find_lang %{name} --all-name
144 rm -rf $RPM_BUILD_ROOT
148 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
149 %update_icon_cache hicolor
153 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1
154 %update_icon_cache hicolor
156 %triggerin -- mozilla-firefox
157 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
159 %triggerun -- mozilla-firefox
160 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
162 %triggerin -- mozilla
163 %nsplugin_install -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
165 %triggerun -- mozilla
166 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
168 %triggerin -- konqueror
169 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nphelix.so
171 %triggerun -- konqueror
172 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nphelix.so
175 %nsplugin_install -d %{_libdir}/opera/plugins nphelix.so
178 %nsplugin_uninstall -d %{_libdir}/opera/plugins nphelix.so
180 %triggerin -- seamonkey
181 %nsplugin_install -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
183 %triggerun -- seamonkey
184 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
186 # as rpm removes the old obsoleted package files after the triggers
187 # above are ran, add another trigger to make the links there.
188 %triggerpostun -- mozilla-firefox-plugin-macromedia-flash
189 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
191 %triggerpostun -- mozilla-plugin-macromedia-flash
192 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
194 %files -f %{name}.lang
195 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/realplay
198 %dir %{_libdir}/%{_name}
199 %dir %{_libdir}/%{_name}/codecs
200 %attr(755,root,root) %{_libdir}/%{_name}/codecs/*.so*
201 %dir %{_libdir}/%{_name}/common
202 %attr(755,root,root) %{_libdir}/%{_name}/common/*.so*
203 %dir %{_libdir}/%{_name}/lib
204 %attr(755,root,root) %{_libdir}/%{_name}/lib/*.so*
205 %dir %{_libdir}/%{_name}/plugins
206 %attr(755,root,root) %{_libdir}/%{_name}/plugins/*.so*
207 %attr(755,root,root) %{_libdir}/%{_name}/realplay
208 %attr(755,root,root) %{_libdir}/%{_name}/realplay.bin
210 %{_libdir}/%{_name}/share
212 %{_iconsdir}/hicolor/*/*/*.png
213 %{_desktopdir}/*.desktop
215 %files -n browser-plugin-%{name}
216 %defattr(644,root,root,755)
217 %attr(755,root,root) %{_plugindir}/*.so