]> git.pld-linux.org Git - packages/RealPlayer.git/blob - RealPlayer.spec
87b682212e6e3174645cccf3379122b135373304
[packages/RealPlayer.git] / RealPlayer.spec
1 #
2 # Todo:
3 #       - add the licence agreement mechanism
4 #       - check if this works in opera/konqueror
5 #
6 %define         _name   realplay
7 Summary:        RealPlayer - RealAudio and RealVideo player
8 Summary(pl):    RealPlayer - odtwarzacz RealAudio i RealVideo
9 Name:           RealPlayer
10 %ifarch %{ix86}
11 %define         minor_ver       7
12 %else
13 %define         minor_ver       5
14 %endif
15 Version:        10.0.%{minor_ver}
16 Release:        1
17 License:        Helix DNA Technology Binary Research Use License (not distributable, see LICENSE)
18 Group:          X11/Applications/Multimedia
19 # download from https://helixcommunity.org/project/showfiles.php?group_id=154
20 %ifarch %{ix86}
21 Source0:        RealPlayer10GOLD.rpm
22 # NoSource0-md5:        3de2e377fd6f00ea1de8f3016469fe5e
23 NoSource:       0
24 %endif
25 %ifarch ppc
26 Source1:        https://helixcommunity.org/download.php/1346/realplay-%{version}.756-linux-2.2-libc6-gcc32-powerpc.bin
27 # NoSource1-md5:        d87d35617f07ab9435341f37229dd3ae
28 NoSource:       1
29 %endif
30 URL:            http://www.real.com/linux/
31 BuildRequires:  cpio
32 BuildRequires:  rpmbuild(macros) >= 1.312
33 BuildRequires:  sed >= 4.0
34 Provides:       helix-core
35 Requires:       sed >= 4.0
36 Obsoletes:      G2player
37 Obsoletes:      RealPlayer-gnome
38 Conflicts:      realplayer
39 ExclusiveArch:  %{ix86} ppc
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _plugindir      %{_libdir}/browser-plugins
43 %define         browsers        mozilla, mozilla-firefox, netscape, seamonkey
44
45 %description
46 Streaming audio/video/flash/pix/text player.
47
48 %description -l pl
49 Odtwarzacz strumieni audio/video/flash/pix/tekst.
50
51 %package -n browser-plugin-%{name}
52 Summary:        RealPlayer plugin for WWW browsers
53 Summary(pl):    Wtyczka RealPlayer do przegl±darek WWW
54 Group:          X11/Applications/Multimedia
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       browser-plugins(%{_target_base_arch})
57
58 %description -n browser-plugin-%{name}
59 RealPlayer plugin for WWW browsers.
60
61 Supported browsers: %{browsers}.
62
63 %description -n browser-plugin-%{name} -l pl
64 Wtyczka RealPlayer dla przegl±darek WWW.
65
66 Obs³ugiwane przegl±darki: %{browsers}.
67
68 %prep
69 %setup -q -c -T
70 %ifarch %{ix86}
71 rpm2cpio %{SOURCE0} | cpio -dimu
72 mv -f usr/local/RealPlayer/* .
73 %endif
74 %ifarch ppc
75 dd if=%{SOURCE1} bs=1 skip=158895 | tar xjf -
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{_desktopdir} \
81         $RPM_BUILD_ROOT%{_plugindir} \
82         $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{_name},%{_datadir}/locale} \
83         $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{48x48,128x128}/mimetypes \
84         $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,32x32,48x48,128x128}/apps
85
86 cp -a codecs common plugins lib $RPM_BUILD_ROOT%{_libdir}/%{_name}
87
88 icons="mime-application-generic \
89 mime-application-ogg \
90 mime-application-ram \
91 mime-application-rpm \
92 mime-application-smil \
93 mime-audio-aiff \
94 mime-audio-au \
95 mime-audio-generic \
96 mime-audio-mp3 \
97 mime-audio-mp4 \
98 mime-audio-ogg \
99 mime-audio-ra \
100 mime-audio-wav \
101 mime-text-realtext \
102 mime-video-avi \
103 mime-video-generic \
104 mime-video-mov \
105 mime-video-ogg \
106 mime-video-rv \
107 mime-video-swf"
108
109 cd share/icons
110 for i in $icons; 
111 do
112 install ${i}_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/mimetypes/${i}.png
113 # SIC! there is no 192 size defined in hicolor, therefore use 128
114 install ${i}_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/mimetypes/${i}.png
115 done
116 install realplay_16x16.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/16x16/apps/realplay.png
117 install realplay_32x32.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/apps/realplay.png
118 install realplay_48x48.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/realplay.png
119 install realplay_192x192.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/128x128/apps/realplay.png
120 cd -
121
122 cp -rf share/locale/* $RPM_BUILD_ROOT%{_datadir}/locale
123
124 install mozilla/*.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
125
126 install realplay* $RPM_BUILD_ROOT%{_libdir}/%{_name}
127 ln -sf ../lib/%{_name}/realplay $RPM_BUILD_ROOT%{_bindir}/realplay
128
129 install share/realplay.desktop $RPM_BUILD_ROOT%{_desktopdir}
130
131 install -d $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/{default,realplay}
132
133 install share/realplay/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/realplay
134 install share/default/* $RPM_BUILD_ROOT%{_libdir}/%{_name}/share/default
135 install share/*.html $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
136 install share/*.css $RPM_BUILD_ROOT%{_libdir}/%{_name}/share
137
138 %{__sed} -i -e 's&#[ \t]*HELIX_LIBS[ \t]*=.*$&HELIX_LIBS=%{_libdir}/%{_name} ; export HELIX_LIBS&' \
139         $RPM_BUILD_ROOT%{_libdir}/realplay/realplay
140
141 # "player" and "widget" domains
142 %find_lang %{name} --all-name
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %post
148 umask 022
149 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
150 %update_icon_cache hicolor
151
152 %postun
153 umask 022
154 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1
155 %update_icon_cache hicolor
156
157 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
158 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
159
160 %triggerun -n browser-plugin-%{name} -- mozilla-firefox
161 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
162
163 %triggerin -n browser-plugin-%{name} -- mozilla
164 %nsplugin_install -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
165
166 %triggerun -n browser-plugin-%{name} -- mozilla
167 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
168
169 #triggerin -n browser-plugin-%{name} -- konqueror
170 #nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nphelix.so
171
172 #triggerun -n browser-plugin-%{name} -- konqueror
173 #nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nphelix.so
174
175 #triggerin -n browser-plugin-%{name} -- opera
176 #nsplugin_install -d %{_libdir}/opera/plugins nphelix.so
177
178 #triggerun -n browser-plugin-%{name} -- opera
179 #nsplugin_uninstall -d %{_libdir}/opera/plugins nphelix.so
180
181 %triggerin -n browser-plugin-%{name} -- seamonkey
182 %nsplugin_install -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
183
184 %triggerun -n browser-plugin-%{name} -- seamonkey
185 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nphelix.so nphelix.xpt
186
187 # as rpm removes the old obsoleted package files after the triggers
188 # above are ran, add another trigger to make the links there.
189 %triggerpostun -n browser-plugin-%{name} -- mozilla-firefox-plugin-RealPlaer
190 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins nphelix.so nphelix.xpt
191
192 %triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-RealPlayer
193 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nphelix.so nphelix.xpt
194
195 %files -f %{name}.lang
196 %defattr(644,root,root,755)
197 %doc LICENSE README 
198 %attr(755,root,root) %{_bindir}/realplay
199 %dir %{_libdir}/%{_name}
200 %dir %{_libdir}/%{_name}/codecs
201 %attr(755,root,root) %{_libdir}/%{_name}/codecs/*.so*
202 %dir %{_libdir}/%{_name}/common
203 %attr(755,root,root) %{_libdir}/%{_name}/common/*.so*
204 %dir %{_libdir}/%{_name}/lib
205 %attr(755,root,root) %{_libdir}/%{_name}/lib/*.so*
206 %dir %{_libdir}/%{_name}/plugins
207 %attr(755,root,root) %{_libdir}/%{_name}/plugins/*.so*
208 %attr(755,root,root) %{_libdir}/%{_name}/realplay
209 %attr(755,root,root) %{_libdir}/%{_name}/realplay.bin
210
211 %{_libdir}/%{_name}/share
212
213 %{_iconsdir}/hicolor/*/*/*.png
214 %{_desktopdir}/*.desktop
215
216 %files -n browser-plugin-%{name}
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_plugindir}/*.so
219 %{_plugindir}/*.xpt
This page took 0.049864 seconds and 2 git commands to generate.