Merged trunk changes r9797:9829 into 217update branch.
#
# spec file for package SUNWrealplayer
#
# Copyright (c) 2004 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: jerrytan
#
# DO NOT REMOVE NEXT LINE
# PACKAGE NOT ARC REVIEWED BY SUN JDS TEAM
#
%include Solaris.inc
%define t_suffix -buildjds4_53
%define browser_prefix /usr
%define browser_name firefox
Name: SUNWrealplayer
Summary: RealPlayer media application
Version: 10.0.8.822
BuildRoot: %{_tmppath}/%{name}-%{version}-root
SUNW_Copyright: realplayer-copyright.txt
%include default-depend.inc
%ifarch sparc
Source: realplay-%{version}-sparc%{t_suffix}.tar.bz2
%else
Source: realplay-%{version}-i386%{t_suffix}.tar.bz2
%endif
Source1: %{name}-manpages-0.1.tar.gz
Source2: LICENSE-realplayer
Patch: realplayer-01-libs.diff
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: SUNWlibC
Requires: SUNWmlib
Requires: SUNWcslr
Requires: SUNWlibms
Requires: SUNWlibmsr
Requires: SUNWxwplt
Requires: SUNWxwrtl
Requires: SUNWgnome-base-libs
Requires: SUNWpostrun
Requires: SUNWgnome-file-mgr
Requires: SUNWgnome-vfs
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-file-mgr-devel
BuildRequires: SUNWgnome-vfs-devel
%if %build_l10n
%package l10n-de
Summary: %{summary} - l10n-de files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: de
%include default-depend.inc
Requires: %{name}
%package l10n-es
Summary: %{summary} - l10n-es files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: es
%include default-depend.inc
Requires: %{name}
%package l10n-fr
Summary: %{summary} - l10n-fr files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: fr
%include default-depend.inc
Requires: %{name}
%package l10n-it
Summary: %{summary} - l10n-it files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: it
%include default-depend.inc
Requires: %{name}
%package l10n-ja
Summary: %{summary} - l10n-ja files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: ja,ja_JP.PCK,ja_JP.UTF-8
%include default-depend.inc
Requires: %{name}
%package l10n-ko
Summary: %{summary} - l10n-ko files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: ko,ko.UTF-8
%include default-depend.inc
Requires: %{name}
%package l10n-pl
Summary: %{summary} - l10n-pl files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: pl_PL
%include default-depend.inc
Requires: %{name}
%package l10n-ptBR
Summary: %{summary} - l10n-ptBR files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: pt_BR
%include default-depend.inc
Requires: %{name}
%package l10n-zhCN
Summary: %{summary} - l10n-zhCN files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: zh,zh.GBK,zh_CN.GB18030,zh.UTF-8
%include default-depend.inc
Requires: %{name}
%package l10n-zhHK
Summary: %{summary} - l10n-zhHK files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: zh_HK.BIG5HK,zh_HK.UTF-8
%include default-depend.inc
Requires: %{name}
%package l10n-zhTW
Summary: %{summary} - l10n-zhTW files
SUNW_BaseDir: %{_basedir}
SUNW_PkgList: SUNWrealplayer
SUNW_Loc: zh_TW,zh_TW.BIG5,zh_TW.UTF-8
%include default-depend.inc
Requires: %{name}
%endif
%prep
mkdir -p %{name}-%{version}
cd %{_builddir}/%name-%version
gzcat %SOURCE1 | tar xf -
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}/RealPlay
cd $RPM_BUILD_ROOT%{_libdir}/RealPlay
bzip2 -dc %SOURCE|tar xf -
%patch -p0
rm -rf postinst doc Bin
cat %SOURCE2 > $RPM_BUILD_ROOT%{_libdir}/RealPlay/LICENSE
# /usr/bin
install -d $RPM_BUILD_ROOT%{_bindir}
cd $RPM_BUILD_ROOT%{_bindir}
ln -s ../lib/RealPlay/realplay realplay
# browser plugins
mv $RPM_BUILD_ROOT%{_libdir}/RealPlay/mozilla $RPM_BUILD_ROOT%{_libdir}/RealPlay/%{browser_name}
install -d $RPM_BUILD_ROOT%{browser_prefix}/lib/%{browser_name}/plugins
cd $RPM_BUILD_ROOT%{browser_prefix}/lib/%{browser_name}/plugins
ln -s ../../RealPlay/%{browser_name}/nphelix.so nphelix.so
ln -s ../../RealPlay/%{browser_name}/nphelix.xpt nphelix.xpt
install -d $RPM_BUILD_ROOT%{_datadir}
# /usr/share/icons
cd $RPM_BUILD_ROOT%{_libdir}/RealPlay/share
pixel_arr="16x16 32x32 48x48 192x192"
for ipixel in $pixel_arr
do
install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$ipixel/apps
install --mode=0644 icons/realplay_$ipixel.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$ipixel/apps/realplay.png
if (ls icons/mime-*_$ipixel.png>/dev/null 2>&1); then
install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$ipixel/mimetypes
for jmime_png in `ls icons/mime-*_$ipixel.png`
do
dest_png=`echo $jmime_png | awk -F_ '{print $1".png"}' | awk -F/ '{print $2}'`
install --mode=0644 $jmime_png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$ipixel/mimetypes/$dest_png
done
fi
done
rm -rf icons
# /usr/share/locale
cd $RPM_BUILD_ROOT%{_libdir}/RealPlay/share/locale
for ilocale in `ls`
do
cd $ilocale
install -d $RPM_BUILD_ROOT%{_datadir}/locale/$ilocale/LC_MESSAGES
install --mode=0644 player.mo $RPM_BUILD_ROOT%{_datadir}/locale/$ilocale/LC_MESSAGES/realplay.mo
install --mode=0644 widget.mo $RPM_BUILD_ROOT%{_datadir}/locale/$ilocale/LC_MESSAGES/libgtkhx.mo
rm -rf player.mo widget.mo
cd ..
done
#copy all files from zh_TW to zh_HK
cd $RPM_BUILD_ROOT%{_libdir}/RealPlay/share/locale
mkdir zh_HK; cd zh_HK
cp ../zh_TW/README .
cp ../zh_TW/LICENSE .
cd $RPM_BUILD_ROOT%{_datadir}/locale
mkdir -p zh_HK/LC_MESSAGES; cd zh_HK/LC_MESSAGES
cp ../../zh_TW/LC_MESSAGES/realplay.mo .
cp ../../zh_TW/LC_MESSAGES/libgtkhx.mo .
# /usr/share/pixmaps
cd $RPM_BUILD_ROOT%{_libdir}/RealPlay/share
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install --mode=0644 realplay.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
rm realplay.png
# /usr/share/applications
cd $RPM_BUILD_ROOT%{_libdir}/RealPlay/share
install -d $RPM_BUILD_ROOT%{_datadir}/applications
install --mode=0644 realplay.desktop $RPM_BUILD_ROOT%{_datadir}/applications/
rm realplay.desktop
# /usr/share/mime/packages
cd $RPM_BUILD_ROOT%{_libdir}/RealPlay/share
install -d $RPM_BUILD_ROOT%{_datadir}/mime/packages
install --mode=0644 realplay.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/
rm realplay.xml
# removed some unsed files
cd $RPM_BUILD_ROOT%{_libdir}/RealPlay/share
rm realplay.mime realplay.keys realplay.applications
rm -rf mimelnk
# /usr/share/man
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT
# change some file mode to 0644
chmod 644 $RPM_BUILD_ROOT%{_libdir}/RealPlay/LICENSE
chmod 644 $RPM_BUILD_ROOT%{_libdir}/RealPlay/README
find $RPM_BUILD_ROOT%{_libdir}/RealPlay/share -type f -exec chmod 644 {} \;
find $RPM_BUILD_ROOT%{_datadir} -type f -exec chmod 644 {} \;
%if %build_l10n
# Delete hi and uk files as they are unsupported.
rm -rf $RPM_BUILD_ROOT%{_libdir}/RealPlay/share/locale/hi
rm -rf $RPM_BUILD_ROOT%{_libdir}/RealPlay/share/locale/uk
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/hi
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/uk
%else
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{_libdir}/RealPlay/share/locale
%endif
%post
( echo 'test -x %{_bindir}/update-mime-database || exit 0';
echo '%{_bindir}/update-mime-database %{_datadir}/mime'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait
%postun
test -x $BASEDIR/lib/postrun || exit 0
( echo 'test -x %{_bindir}/update-mime-database || exit 0';
echo '%{_bindir}/update-mime-database %{_datadir}/mime'
) | $BASEDIR/lib/postrun -b -u -c JDS
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, bin) %{_libdir}/RealPlay
%{_libdir}/RealPlay/%{browser_name}
%{_libdir}/RealPlay/lib
%{_libdir}/RealPlay/common
%{_libdir}/RealPlay/codecs
%{_libdir}/RealPlay/plugins
%{_libdir}/RealPlay/realplay.bin
%{_libdir}/RealPlay/realplay
%{_libdir}/RealPlay/README
%{_libdir}/RealPlay/LICENSE
%dir %attr (0755, root, bin) %{_libdir}/RealPlay/share
%{_libdir}/RealPlay/share/realplay
%{_libdir}/RealPlay/share/default
%{_libdir}/RealPlay/share/tigris.css
%{_libdir}/RealPlay/share/hxplay_help.html
# browser plugin
%dir %attr (0755, root, bin) %{browser_prefix}/lib/%{browser_name}
%dir %attr (0755, root, bin) %{browser_prefix}/lib/%{browser_name}/plugins
%{browser_prefix}/lib/%{browser_name}/plugins/*
# share
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/icons
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%dir %attr (0755, root, root) %{_datadir}/mime
%dir %attr (0755, root, root) %{_datadir}/mime/packages
%{_datadir}/mime/packages/*
%defattr (-, root, bin)
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/*
%{_mandir}/*/*
%if %build_l10n
%files l10n-de
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/de
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/de
%files l10n-es
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/es
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/es
%files l10n-fr
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/fr
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/fr
%files l10n-it
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/it
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/it
%files l10n-ja
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/ja
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/ja
%files l10n-ko
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/ko
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/ko
%files l10n-pl
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/pl
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/pl
%files l10n-ptBR
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/pt_BR
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/pt_BR
%files l10n-zhCN
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/zh_CN
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/zh_CN
%files l10n-zhHK
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/zh_HK
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/zh_HK
%files l10n-zhTW
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%attr (0755, root, other) %{_datadir}/locale/zh_TW
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/RealPlay/share/locale/zh_TW
%endif
%changelog
* Mon Nov 06 2006 - [email protected]
- Bump version to 10.0.8.822, which contains bug fix of CR#6479630,
CR#6474581
* Mon Sep 04 2006 - [email protected]
- New Manpage tarball
* Sat Aug 12 2006 - [email protected]
- change datadir/icons permissions back to root:other since it's a stable
interface and wasn't supposed to be changed
* Fri Jun 23 2006 - [email protected].
- Bump tarball version to buildjds4_45.
- Change minor version from 1453 to 1478.
* Fri Jul 14 2006 - [email protected]
- update %post/%postun/etc scripts to support diskless client setup,
part of 6448317
* Thu Jun 29 2006 - [email protected]
- update postrun scripts
* Wed Jun 28 2006 - [email protected]
- Update Build/Requires after check-deps.pl run.
* Fri Jun 23 2006 - [email protected].
- Bump tarball version to buildjds4_44.
- Change minor version from 1358 to 1453.
* Wed Jun 21 2006 - [email protected].
- Add %postun script. Fix bug #6414069.
* Tue Jun 20 2006 - [email protected].
- Install realplay.xml to %{_datadir}/mime/packages.
* Mon Jun 12 2006 - [email protected]
- Fix mime & mime/application dir owner.
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Tue May 16 2006 - [email protected]
- Removed local SUNW_Rev definition so the global on in Solaris.inc is used
* Thu May 11 2006 - [email protected]
- Change %defattr to (-, root, other).
* Tue May 02 2006 - [email protected]
- Delete hi and uk locale files as they are unsupported.
* Mon May 01 2006 - [email protected]
- Define l10n-de package.
* Sun Apr 30 2006 - [email protected]
- Seperate l10n files to each locales, requested by l10n team.
* Sat Apr 29 2006 - [email protected]
- Copy actual files from zh_TW to zh_HK to fix CR#6392783.
* Fri Apr 28 2006 - [email protected]
- Install icons to %{_datadir}/icons/hicolor, instead to
%{_datadir}/icons/gnome
- Remove size prefix of icons.
- Remove mimelnkr, mime-info, application-registry from %{_datadir},
because they are legacy.
* Wed Apr 26 2006 - [email protected]
- Fix problem: browser plugins are wrongly linked.
* Thu Apr 20 2006 - [email protected]
- Change broswer from /usr/sfw/lib/mozilla to /usr/lib/firefox.
- Add define browser_name to make it change easier in future.
* Thu Apr 20 2006 - [email protected]
- Add removef in %post to fix bug #6414069.
* Mon Apr 19 2006 - [email protected]
- Initial version created from jds3.1 branch.