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