]> git.pld-linux.org Git - packages/RealPlayer.git/blobdiff - RealPlayer.spec
- proper source
[packages/RealPlayer.git] / RealPlayer.spec
index ecc47af32f3d6d23ff984b8cd58ac9854bbc47be..e429dc6362f60620637630ce90ccde9df0ec13ba 100644 (file)
@@ -1,19 +1,46 @@
+#
+# Todo:
+#      - add the licence agreement mechanism
+#      - check if this works in opera/konqueror
+#
 %define                _name   realplay
-Summary:       Welcome to RealPlayer 10!
+Summary:       RealPlayer - RealAudio and RealVideo player
 Summary(pl):   RealPlayer - odtwarzacz RealAudio i RealVideo
 Name:          RealPlayer
-Version:       10
+%ifarch        %{ix86}
+%define                minor_ver       7
+%else
+%define                minor_ver       5
+%endif
+Version:       10.0.%{minor_ver}
 Release:       1
 License:       Helix DNA Technology Binary Research Use License (not distributable, see LICENSE)
 Group:         X11/Applications/Multimedia
-URL:           http://www.real.com/
-Source0:       http://software-dl.real.com/06c1f73fd206f3264217/unix/%{name}%{version}GOLD.bin
-# NoSource0-md5:       1e6435241bfb0ea6c015ec717fbf141a
-Conflicts:     realplayer
+# download from https://helixcommunity.org/project/showfiles.php?group_id=154
+%ifarch %{ix86}
+Source0:       https://helixcommunity.org/download.php/1917/%{name}-%{version}.785-20060201.i586.rpm
+# NoSource0-md5:       3de2e377fd6f00ea1de8f3016469fe5e
+NoSource:      0
+%endif
+%ifarch ppc
+Source1:       https://helixcommunity.org/download.php/1346/realplay-%{version}.756-linux-2.2-libc6-gcc32-powerpc.bin
+# NoSource1-md5:       d87d35617f07ab9435341f37229dd3ae
+NoSource:      1
+%endif
+URL:           http://www.real.com/linux/
+BuildRequires: cpio
+BuildRequires: rpmbuild(macros) >= 1.312
+BuildRequires: sed >= 4.0
+Provides:      helix-core
+Requires:      sed >= 4.0
 Obsoletes:     G2player
+Obsoletes:     RealPlayer-gnome
+Conflicts:     realplayer
+ExclusiveArch: %{ix86} ppc
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-NoSource:      0
-ExclusiveArch: %{ix86} 
+
+%define                _plugindir      %{_libdir}/browser-plugins
+%define                browsers        mozilla, mozilla-firefox, netscape, seamonkey
 
 %description
 Streaming audio/video/flash/pix/text player.
@@ -21,60 +48,40 @@ Streaming audio/video/flash/pix/text player.
 %description -l pl
 Odtwarzacz strumieni audio/video/flash/pix/tekst.
 
-%package -n mozilla-plugin-%{name}
-Summary:       RealPlayer Mozilla plugin
-Summary(pl):   Wtyczka Mozilli RealPlayer
+%package -n browser-plugin-%{name}
+Summary:       RealPlayer plugin for WWW browsers
+Summary(pl):   Wtyczka RealPlayer do przegl±darek WWW
 Group:         X11/Applications/Multimedia
-Requires:      %{name} = %{version}
-Prereq:                mozilla-embedded
-
-%description -n mozilla-plugin-%{name}
-RealPlayer Mozilla plugin
-
-%description -n mozilla-plugin-%{name} -l pl
-Wtyczka Mozilli RealPlayer
-
-%package -n mozilla-firefox-plugin-%{name}
-Summary:        RealPlayer Mozilla Firefox plugin
-Summary(pl):    Wtyczka Mozilli Firefox RealPlayer
-Group:          X11/Applications/Multimedia
-Requires:       %{name} = %{version}
-Prereq:         mozilla-firefox
-
-%description -n mozilla-firefox-plugin-%{name}
-RealPlayer Mozilla plugin
-
-%description -n mozilla-firefox-plugin-%{name} -l pl
-Wtyczka Mozilli RealPlayer
+Requires:      %{name} = %{version}-%{release}
+Requires:      browser-plugins(%{_target_base_arch})
 
-%package gnome
-Summary:       GNOME data for Realplayer
-Summary(pl):   Dane Realplayera dla GNOME
-Group:         X11/Applications/Multimedia
-Requires:      %{name} = %{version}
-Requires:      gnome-libs
+%description -n browser-plugin-%{name}
+RealPlayer plugin for WWW browsers.
 
-%description gnome
-Mime information and application registry data for GNOME.
+Supported browsers: %{browsers}.
 
-%description gnome -l pl
-Dane MIME oraz wpisy do rejestru aplikacji dla GNOME.
+%description -n browser-plugin-%{name} -l pl
+Wtyczka RealPlayer dla przegl±darek WWW.
 
+Obs³ugiwane przegl±darki: %{browsers}.
 
 %prep
 %setup -q -c -T
-dd if=%{SOURCE0} skip=1 bs=129460| %{__bzip2} -d | %{__tar} xvf -
+%ifarch %{ix86}
+rpm2cpio %{SOURCE0} | cpio -dimu
+mv -f usr/local/RealPlayer/* .
+%endif
+%ifarch ppc
+dd if=%{SOURCE1} bs=1 skip=158895 | tar xjf -
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_desktopdir} \
-       $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins \
-       $RPM_BUILD_ROOT%{_libdir}/mozilla-firefox/plugins \
-       $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{_name},%{_datadir}/{locale}} \
+       $RPM_BUILD_ROOT%{_plugindir} \
+       $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{_name},%{_datadir}/locale} \
        $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{48x48,128x128}/mimetypes \
-       $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,32x32,48x48,128x128}/apps \
-       $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES \
-       $RPM_BUILD_ROOT%{_datadir}/{application-registry,mime-info}
+       $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,32x32,48x48,128x128}/apps
 
 cp -a codecs common plugins lib $RPM_BUILD_ROOT%{_libdir}/%{_name}
 
@@ -112,61 +119,101 @@ install realplay_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/realpl
 install realplay_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/apps/realplay.png
 cd -
 
-install share/locale/fr.mo $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/realplay.mo
+cp -rf share/locale/* $RPM_BUILD_ROOT%{_datadir}/locale
 
-install mozilla/*.so $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins
-install mozilla/*.so $RPM_BUILD_ROOT%{_libdir}/mozilla-firefox/plugins
+install mozilla/*.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
 
-install realplay*  $RPM_BUILD_ROOT%{_libdir}/%{_name}
+install realplay* $RPM_BUILD_ROOT%{_libdir}/%{_name}
 ln -sf ../lib/%{_name}/realplay $RPM_BUILD_ROOT%{_bindir}/realplay
 
-install share/realplay.applications $RPM_BUILD_ROOT%{_datadir}/application-registry
-install share/realplay.mime $RPM_BUILD_ROOT%{_datadir}/mime-info
-install share/realplay.keys $RPM_BUILD_ROOT%{_datadir}/mime-info
-
 install share/realplay.desktop $RPM_BUILD_ROOT%{_desktopdir}
-cp -a share/realplay $RPM_BUILD_ROOT%{_datadir}
 
-install -d $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/default
+install -d $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/{default,realplay}
 
+install share/realplay/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/realplay
 install share/default/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/default
 install share/*.html $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
 install share/*.css $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
 
-%find_lang realplay
+%{__sed} -i -e 's&#[ \t]*HELIX_LIBS[ \t]*=.*$&HELIX_LIBS=%{_libdir}/%{_name} ; export HELIX_LIBS&' \
+       $RPM_BUILD_ROOT%{_libdir}/realplay/realplay
+
+# "player" and "widget" domains
+%find_lang %{name} --all-name
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files -f realplay.lang
+%post
+umask 022
+[ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
+%update_icon_cache hicolor
+
+%postun
+umask 022
+[ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1
+%update_icon_cache hicolor
+
+%triggerin -n browser-plugin-%{name} -- mozilla-firefox
+%nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
+
+%triggerun -n browser-plugin-%{name} -- mozilla-firefox
+%nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
+
+%triggerin -n browser-plugin-%{name} -- mozilla
+%nsplugin_install -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
+
+%triggerun -n browser-plugin-%{name} -- mozilla
+%nsplugin_uninstall -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
+
+#triggerin -n browser-plugin-%{name} -- konqueror
+#nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nphelix.so
+
+#triggerun -n browser-plugin-%{name} -- konqueror
+#nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nphelix.so
+
+#triggerin -n browser-plugin-%{name} -- opera
+#nsplugin_install -d %{_libdir}/opera/plugins nphelix.so
+
+#triggerun -n browser-plugin-%{name} -- opera
+#nsplugin_uninstall -d %{_libdir}/opera/plugins nphelix.so
+
+%triggerin -n browser-plugin-%{name} -- seamonkey
+%nsplugin_install -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
+
+%triggerun -n browser-plugin-%{name} -- seamonkey
+%nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
+
+# as rpm removes the old obsoleted package files after the triggers
+# above are ran, add another trigger to make the links there.
+%triggerpostun -n browser-plugin-%{name} -- mozilla-firefox-plugin-RealPlaer
+%nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
+
+%triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-RealPlayer
+%nsplugin_install -f -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
+
+%files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc LICENSE README 
 %attr(755,root,root) %{_bindir}/realplay
 %dir %{_libdir}/%{_name}
 %dir %{_libdir}/%{_name}/codecs
-%dir %{_libdir}/%{_name}/common
-%dir %{_libdir}/%{_name}/lib
-%dir %{_libdir}/%{_name}/plugins
-
 %attr(755,root,root) %{_libdir}/%{_name}/codecs/*.so*
+%dir %{_libdir}/%{_name}/common
 %attr(755,root,root) %{_libdir}/%{_name}/common/*.so*
+%dir %{_libdir}/%{_name}/lib
 %attr(755,root,root) %{_libdir}/%{_name}/lib/*.so*
+%dir %{_libdir}/%{_name}/plugins
 %attr(755,root,root) %{_libdir}/%{_name}/plugins/*.so*
-%attr(755,root,root) %{_libdir}/%{_name}/realplay*
+%attr(755,root,root) %{_libdir}/%{_name}/realplay
+%attr(755,root,root) %{_libdir}/%{_name}/realplay.bin
+
 %{_libdir}/%{_name}/share
-%{_datadir}/%{_name}
+
 %{_iconsdir}/hicolor/*/*/*.png
 %{_desktopdir}/*.desktop
 
-%files gnome
-%defattr(644,root,root,755)
-%{_datadir}/application-registry
-%{_datadir}/mime-info
-
-%files -n mozilla-plugin-%{name}
-%defattr(644,root,root,755)
-%{_libdir}/mozilla/plugins/*
-
-%files -n mozilla-firefox-plugin-%{name}
+%files -n browser-plugin-%{name}
 %defattr(644,root,root,755)
-%{_libdir}/mozilla-firefox/plugins/*
+%attr(755,root,root) %{_plugindir}/*.so
+%{_plugindir}/*.xpt
This page took 0.139967 seconds and 4 git commands to generate.