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