]> git.pld-linux.org Git - packages/google-chrome.git/blob - google-chrome.spec
up to 21.0.1180.89, adobe flash 11.3.31.232
[packages/google-chrome.git] / google-chrome.spec
1 # NOTE
2 # - to look and update to new version, use update-source.sh script
3
4 %define         flashv  11.3.31.232
5 %define         svnrev  154005
6 #define         rel             %{nil}
7 %define         state   stable
8 Summary:        Google Chrome
9 Name:           google-chrome
10 Version:        21.0.1180.89
11 Release:        %{svnrev}%{?rel:.%{rel}}
12 License:        Multiple, see http://chrome.google.com/
13 Group:          Applications/Networking
14 Source0:        http://dl.google.com/linux/chrome/rpm/stable/i386/%{name}-%{state}-%{version}-%{svnrev}.i386.rpm
15 # NoSource0-md5:        8b65abb5ec81e03d8365a22eaf68a953
16 NoSource:       0
17 Source1:        http://dl.google.com/linux/chrome/rpm/stable/x86_64/%{name}-%{state}-%{version}-%{svnrev}.x86_64.rpm
18 # NoSource1-md5:        1c729bc2e378d229966c90159a73fdc9
19 NoSource:       1
20 Source2:        %{name}.sh
21 Source4:        find-lang.sh
22 Patch0:         chrome-desktop.patch
23 URL:            http://chrome.google.com/
24 BuildRequires:  rpm-utils
25 BuildRequires:  rpmbuild(macros) >= 1.453
26 BuildRequires:  sed >= 4.0
27 Requires:       browser-plugins >= 2.0
28 Requires:       hicolor-icon-theme
29 Requires:       xdg-utils >= 1.0.2-4
30 Suggests:       browser-plugin-adobe-flash
31 Suggests:       browser-plugin-chrome-pdf
32 Provides:       wwwbrowser
33 ExclusiveArch:  %{ix86} %{x8664}
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %{expand:%%define       crver %{version}}
37
38 %define         find_lang       sh find-lang.sh %{buildroot}
39
40 %define         _enable_debug_packages  0
41 %define         no_install_post_strip   1
42
43 %define         ffmpeg_caps     libffmpegsumo.so
44 %define         flash_caps      libpepflashplayer.so
45 %define         chrome_caps     libpdf.so libppGoogleNaClPluginChrome.so
46
47 # list of script capabilities (regexps) not to be used in Provides
48 %define         _noautoprov             %{ffmpeg_caps} %{flash_caps} %{chrome_caps}
49 # do not require them either
50 %define         _noautoreq              %{_noautoprov}
51
52 %description
53 The web browser from Google
54
55 Google Chrome is a browser that combines a minimal design with
56 sophisticated technology to make the web faster, safer, and easier.
57
58 %description -l hu.UTF-8
59 Webböngésző a Google-től.
60
61 Google Chrome egy böngésző, amely a minimalista külsőt házasítja össze
62 a kifinomult technológiával, hogy a webböngészés gyorsabb,
63 biztonságosabb és könnyebb legyen.
64
65 %package l10n
66 Summary:        google chrome language packages
67 Group:          I18n
68 Requires:       %{name} = %{version}-%{release}
69
70 %description l10n
71 This package contains language packages for 50 languages:
72
73 ar, bg, bn, ca, cs, da, de, el, en-GB, es-LA, es, et, fi, fil, fr, gu,
74 he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or, pl,
75 pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi, zh-CN,
76 zh-TW
77
78 %package -n browser-plugin-chrome-pdf
79 Summary:        Chrome PDF Viewer
80 Summary(pl.UTF-8):      Wtyczka PDF z Google Chrome
81 Group:          X11/Applications/Graphics
82 Requires:       browser-plugins >= 2.0
83 Conflicts:      google-chrome < 19.0.1084.52
84
85 %description -n browser-plugin-chrome-pdf
86 Google Chrome PDF Viewer.
87
88 %description -n browser-plugin-chrome-pdf -l pl.UTF-8
89 Wtyczka PDF z Google Chrome.
90
91 # IMPORTANT: keep flash plugin defined as last package
92 %package -n browser-plugin-adobe-flash
93 Summary:        Adobe Flash plugin from Google Chrome
94 Summary(pl.UTF-8):      Wtyczka Adobe Flash z Google Chrome
95 Version:        %{flashv}
96 Release:        %{!?rel:1}%{?rel:%{rel}}
97 License:        Free to use, non-distributable
98 Group:          X11/Applications/Multimedia
99 Requires:       browser-plugins >= 2.0
100 Conflicts:      google-chrome < 19.0.1084.52
101
102 %description -n browser-plugin-adobe-flash
103 Adobe Flash plugin from Google Chrome, which is not available in
104 Chromium.
105
106 %description -n browser-plugin-adobe-flash -l pl.UTF-8
107 Wtyczka Adobe Flash z Google Chrome, która nie jest dostępna w
108 Chromium.
109
110 %prep
111 %setup -qcT
112 %ifarch %{ix86}
113 SOURCE=%{S:0}
114 %endif
115 %ifarch %{x8664}
116 SOURCE=%{S:1}
117 %endif
118
119 V=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE)
120 R=$(rpm -qp --nodigest --nosignature --qf '%{R}' $SOURCE)
121 if [ version:$V != version:%{crver} -o svnrev:$R != svnrev:%{svnrev} ]; then
122         exit 1
123 fi
124 rpm2cpio $SOURCE | cpio -i -d
125
126 mv opt/google/chrome .
127 mv usr/share/man/man1/* .
128 mv usr/share/gnome-control-center/default-apps .
129 mv chrome/default-app-block .
130 mv chrome/product_logo_*.{png,xpm} .
131 mv chrome/google-chrome.desktop .
132 mv chrome/google-chrome .
133 chmod a+x chrome/lib*.so*
134
135 # separate to subpackage
136 install -d browser-plugins
137 mv chrome/libpdf.so browser-plugins
138 mv chrome/PepperFlash browser-plugins
139 chmod a+rx browser-plugins/PepperFlash/*.so
140
141 # included in gnome-control-center-2.28.1-3
142 rm default-app-block default-apps/google-chrome.xml
143
144 # xdg-utils snapshot required
145 rm chrome/xdg-settings
146 rm chrome/xdg-mime
147
148 [ -f *.1.gz ] && gzip -d *.1.gz
149
150 %patch0 -p1
151
152 %{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
153 %{__sed} -i 's;/opt/google/chrome/product_logo_48.png;%{name}.png;' google-chrome.desktop
154 %{__sed} -i 's;/opt/google/chrome;%{_bindir};' google-chrome.desktop
155
156 %build
157 v=$(awk -F'"' '/version/{print $4}' browser-plugins/PepperFlash/manifest.json)
158 if [ "$v" != "%{flashv}" ]; then
159         : wrong version
160         exit 1
161 fi
162
163 # create extra file, for simplier scripting in chromium-browser.sh
164 echo "version=%{flashv}" > browser-plugins/PepperFlash/manifest.ver
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_desktopdir},%{_libdir}/%{name}/themes}
169
170 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
171 %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
172 cp -a chrome/* $RPM_BUILD_ROOT%{_libdir}/%{name}
173 cp -p google-chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1
174 # for google-chrome --help
175 echo ".so google-chrome.1" > $RPM_BUILD_ROOT%{_mandir}/man1/chrome.1
176 cp -p google-chrome.desktop $RPM_BUILD_ROOT%{_desktopdir}
177
178 for icon in product_logo_*.png; do
179         size=${icon##product_logo_}
180         size=${size%.png}
181
182         install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps
183         cp -p $icon $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps/%{name}.png
184 done
185
186 install -d $RPM_BUILD_ROOT%{_browserpluginsdir}
187 cp -a browser-plugins/* $RPM_BUILD_ROOT%{_browserpluginsdir}
188
189 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
190
191 # binary needs to be at that specific location, or it will abort:
192 # [1070:1070:3265429789299:FATAL:zygote_host_linux.cc(130)] The SUID sandbox helper binary is missing: /opt/google/chrome/chrome-sandbox Aborting now.
193 # Aborted
194 install -d $RPM_BUILD_ROOT/opt/google
195 ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT/opt/google/chrome
196
197 # find locales
198 %find_lang %{name}.lang
199 # always package en-US (in main package)
200 %{__sed} -i -e '/en-US.pak/d' %{name}.lang
201
202 %clean
203 rm -rf $RPM_BUILD_ROOT
204
205 %post
206 %update_icon_cache hicolor
207 %update_browser_plugins
208
209 %postun
210 if [ "$1" = 0 ]; then
211         %update_icon_cache hicolor
212         %update_browser_plugins
213 fi
214
215 %post -n browser-plugin-adobe-flash
216 %update_browser_plugins
217
218 %postun -n browser-plugin-adobe-flash
219 if [ "$1" = 0 ]; then
220         %update_browser_plugins
221 fi
222
223 %post -n browser-plugin-chrome-pdf
224 %update_browser_plugins
225
226 %postun -n browser-plugin-chrome-pdf
227 if [ "$1" = 0 ]; then
228         %update_browser_plugins
229 fi
230
231 # FIXME: chrome *needs* it to be in application dir. add symlink until it can load from other places
232 # FIXME: link PepperFlash, browser-plugins ignores subdirs, and currently nothing else than chrome browsers can do pepper
233 %triggerin -n browser-plugin-adobe-flash -- google-chrome
234 test -L %{_libdir}/google-chrome/PepperFlash || ln -sf %{_browserpluginsdir}/PepperFlash %{_libdir}/google-chrome/PepperFlash
235
236 %triggerun -n browser-plugin-adobe-flash -- google-chrome
237 if [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L %{_libdir}/google-chrome/PepperFlash ]; then
238         rm -f %{_libdir}/google-chrome/PepperFlash
239 fi
240
241 %triggerin -n browser-plugin-chrome-pdf -- google-chrome
242 test -L %{_libdir}/google-chrome/libpdf.so || ln -sf plugins/libpdf.so %{_libdir}/google-chrome/libpdf.so
243
244 %triggerun -n browser-plugin-chrome-pdf -- google-chrome
245 if [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L %{_libdir}/google-chrome/libpdf.so ]; then
246         rm -f %{_libdir}/google-chrome/libpdf.so
247 fi
248
249 %triggerin -n browser-plugin-adobe-flash -- chromium-browser-bin
250 test -L %{_libdir}/chromium-browser-bin/PepperFlash || ln -sf %{_browserpluginsdir}/PepperFlash %{_libdir}/chromium-browser-bin/PepperFlash
251
252 %triggerun -n browser-plugin-adobe-flash -- chromium-browser-bin
253 if [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L %{_libdir}/chromium-browser-bin/PepperFlash ]; then
254         rm -f %{_libdir}/chromium-browser-bin/PepperFlash
255 fi
256
257 %triggerin -n browser-plugin-chrome-pdf -- chromium-browser-bin
258 test -L %{_libdir}/chromium-browser-bin/libpdf.so || ln -sf plugins/libpdf.so %{_libdir}/chromium-browser-bin/libpdf.so
259
260 %triggerun -n browser-plugin-chrome-pdf -- chromium-browser-bin
261 if [ "$1" = "0" ] || [ "$2" = "0" ] && [-L %{_libdir}/chromium-browser-bin/libpdf.so ]; then
262         rm -f %{_libdir}/chromium-browser-bin/libpdf.so
263 fi
264
265 %files -f %{name}.lang
266 %defattr(644,root,root,755)
267
268 %{_browserpluginsconfdir}/browsers.d/%{name}.*
269 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
270
271 %attr(755,root,root) %{_bindir}/%{name}
272 %{_mandir}/man1/*.1*
273 %{_desktopdir}/*.desktop
274 %{_iconsdir}/hicolor/*/apps/%{name}.png
275
276 %dir %{_libdir}/%{name}
277 %{_libdir}/%{name}/chrome.pak
278 %{_libdir}/%{name}/resources.pak
279 %{_libdir}/%{name}/theme_resources_standard.pak
280 %{_libdir}/%{name}/ui_resources_standard.pak
281 %dir %{_libdir}/%{name}/locales
282 %{_libdir}/%{name}/locales/en-US.pak
283 %dir %{_libdir}/%{name}/plugins
284 %{_libdir}/%{name}/default_apps
285 %{_libdir}/%{name}/themes
286 %attr(755,root,root) %{_libdir}/%{name}/chrome
287 # These unique permissions are intentional and necessary for the sandboxing
288 %attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
289
290 # Native Client plugin, to use launch with --enable-nacl
291 %attr(755,root,root) %{_libdir}/%{name}/libppGoogleNaClPluginChrome.so
292
293 # nacl
294 %attr(755,root,root) %{_libdir}/%{name}/nacl_helper
295 %attr(755,root,root) %{_libdir}/%{name}/nacl_helper_bootstrap
296 %attr(755,root,root) %{_libdir}/%{name}/nacl_irt_x86_*.nexe
297
298 # ffmpeg libs
299 %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
300
301 # hack
302 %dir /opt/google
303 /opt/google/chrome
304
305 %files l10n -f %{name}.lang
306 %defattr(644,root,root,755)
307
308 %files -n browser-plugin-chrome-pdf
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_browserpluginsdir}/libpdf.so
311
312 %files -n browser-plugin-adobe-flash
313 %defattr(644,root,root,755)
314 %dir %{_browserpluginsdir}/PepperFlash
315 %{_browserpluginsdir}/PepperFlash/manifest.json
316 %{_browserpluginsdir}/PepperFlash/manifest.ver
317 %attr(755,root,root) %{_browserpluginsdir}/PepperFlash/libpepflashplayer.so
This page took 0.101534 seconds and 3 git commands to generate.