]> git.pld-linux.org Git - packages/google-chrome.git/blob - google-chrome.spec
- fix 64bit build
[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.2.202.235
5 %define         svnrev  138391
6 #define         rel             %{nil}
7 %define         state   stable
8 Summary:        Google Chrome
9 Name:           google-chrome
10 Version:        19.0.1084.52
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 # Source0-md5:  113c4fe26c9ffda69b695d3e4c7a638f
16 Source1:        http://dl.google.com/linux/chrome/rpm/stable/x86_64/%{name}-%{state}-%{version}-%{svnrev}.x86_64.rpm
17 # Source1-md5:  c6e08d3019a42499f999e8f18a2e8ea4
18 Source2:        %{name}.sh
19 Source4:        find-lang.sh
20 Patch0:         chrome-desktop.patch
21 URL:            http://chrome.google.com/
22 BuildRequires:  rpm-utils
23 BuildRequires:  rpmbuild(macros) >= 1.453
24 BuildRequires:  sed >= 4.0
25 Requires:       browser-plugins >= 2.0
26 Requires:       hicolor-icon-theme
27 Requires:       xdg-utils >= 1.0.2-4
28 Provides:       wwwbrowser
29 %ifarch %{ix86}
30 Suggests:       browser-plugin-adobe-flash
31 %endif
32 Suggests:       browser-plugin-chrome-pdf
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         jpeg_caps       libpng12.so.0(PNG12_0)
45 %define         flash_caps      libflashplayer.so
46 %define         chrome_caps     libpdf.so libppGoogleNaClPluginChrome.so
47
48 # list of script capabilities (regexps) not to be used in Provides
49 %define         _noautoprov             %{ffmpeg_caps} %{jpeg_caps} %{flash_caps} %{chrome_caps}
50 # do not require them either
51 %define         _noautoreq              %{_noautoprov}
52
53 %description
54 The web browser from Google
55
56 Google Chrome is a browser that combines a minimal design with
57 sophisticated technology to make the web faster, safer, and easier.
58
59 %description -l hu.UTF-8
60 Webböngésző a Google-től.
61
62 Google Chrome egy böngésző, amely a minimalista külsőt házasítja össze
63 a kifinomult technológiával, hogy a webböngészés gyorsabb,
64 biztonságosabb és könnyebb legyen.
65
66 %package -n browser-plugin-chrome-pdf
67 Summary:        Chrome PDF Viewer
68 Summary(pl.UTF-8):      Wtyczka PDF z Google Chrome
69 Group:          X11/Applications/Graphics
70 Requires:       browser-plugins >= 2.0
71
72 %description -n browser-plugin-chrome-pdf
73 Google Chrome PDF Viewer.
74
75 %description -n browser-plugin-chrome-pdf -l pl.UTF-8
76 Wtyczka PDF z Google Chrome.
77
78 # IMPORTANT: keep flash plugin defined as last package
79 %package -n browser-plugin-adobe-flash
80 Summary:        Adobe Flash plugin from Google Chrome
81 Summary(pl.UTF-8):      Wtyczka Adobe Flash z Google Chrome
82 Version:        %{flashv}
83 Release:        %{!?rel:1}%{?rel:%{rel}}
84 License:        Free to use, non-distributable
85 Group:          X11/Applications/Multimedia
86 Requires:       browser-plugins >= 2.0
87
88 %description -n browser-plugin-adobe-flash
89 Adobe Flash plugin from Google Chrome, which is not available in
90 Chromium.
91
92 %description -n browser-plugin-adobe-flash -l pl.UTF-8
93 Wtyczka Adobe Flash z Google Chrome, która nie jest dostępna w
94 Chromium.
95
96
97 %prep
98 %setup -qcT
99 %ifarch %{ix86}
100 SOURCE=%{S:0}
101 %endif
102 %ifarch %{x8664}
103 SOURCE=%{S:1}
104 %endif
105
106 V=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE)
107 R=$(rpm -qp --nodigest --nosignature --qf '%{R}' $SOURCE)
108 if [ version:$V != version:%{crver} -o svnrev:$R != svnrev:%{svnrev} ]; then
109         exit 1
110 fi
111 rpm2cpio $SOURCE | cpio -i -d
112
113 mv opt/google/chrome .
114 mv usr/share/man/man1/* .
115 mv usr/share/gnome-control-center/default-apps .
116 mv chrome/default-app-block .
117 mv chrome/product_logo_*.{png,xpm} .
118 mv chrome/google-chrome.desktop .
119 mv chrome/google-chrome .
120 chmod a+x chrome/lib*.so*
121
122 # separate to subpackage
123 install -d browser-plugins
124 mv chrome/libpdf.so browser-plugins
125 %ifarch %{ix86}
126 mv chrome/libgcflashplayer.so browser-plugins
127 %endif
128
129 # included in gnome-control-center-2.28.1-3
130 rm default-app-block default-apps/google-chrome.xml
131
132 # xdg-utils snapshot required
133 rm chrome/xdg-settings
134 rm chrome/xdg-mime
135
136 [ -f *.1.gz ] && gzip -d *.1.gz
137
138 %patch0 -p1
139
140 %{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
141 %{__sed} -i 's;/opt/google/chrome/product_logo_48.png;%{name}.png;' google-chrome.desktop
142 %{__sed} -i 's;/opt/google/chrome;%{_bindir};' google-chrome.desktop
143
144 %build
145 %ifarch %{ix86}
146 s=$(echo 'LNX %{flashv}' | tr . ,)
147 v=$(strings browser-plugins/libgcflashplayer.so | grep '^LNX ')
148 if [ "$v" != "$s" ]; then
149         : wrong version
150         exit 1
151 fi
152 %endif
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_desktopdir},%{_libdir}/%{name}/themes}
157
158 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
159 %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
160 cp -a chrome/* $RPM_BUILD_ROOT%{_libdir}/%{name}
161 cp -p google-chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1
162 # for google-chrome --help
163 echo ".so google-chrome.1" > $RPM_BUILD_ROOT%{_mandir}/man1/chrome.1
164 cp -p google-chrome.desktop $RPM_BUILD_ROOT%{_desktopdir}
165
166 for icon in product_logo_*.png; do
167         size=${icon##product_logo_}
168         size=${size%.png}
169
170         install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps
171         cp -p $icon $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps/%{name}.png
172 done
173
174 install -d $RPM_BUILD_ROOT%{_browserpluginsdir}
175 install -p browser-plugins/*.so $RPM_BUILD_ROOT%{_browserpluginsdir}
176
177 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
178
179 # binary needs to be at that specific location, or it will abort:
180 # [1070:1070:3265429789299:FATAL:zygote_host_linux.cc(130)] The SUID sandbox helper binary is missing: /opt/google/chrome/chrome-sandbox Aborting now.
181 # Aborted
182 install -d $RPM_BUILD_ROOT/opt/google
183 ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT/opt/google/chrome
184
185 # find locales
186 %find_lang %{name}.lang
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %post
192 %update_icon_cache hicolor
193 %update_browser_plugins
194
195 %postun
196 if [ "$1" = 0 ]; then
197         %update_icon_cache hicolor
198         %update_browser_plugins
199 fi
200
201 %post -n browser-plugin-adobe-flash
202 %update_browser_plugins
203
204 %postun -n browser-plugin-adobe-flash
205 if [ "$1" = 0 ]; then
206         %update_browser_plugins
207 fi
208
209 %post -n browser-plugin-chrome-pdf
210 %update_browser_plugins
211
212 %postun -n browser-plugin-chrome-pdf
213 if [ "$1" = 0 ]; then
214         %update_browser_plugins
215 fi
216
217 # FIXME: chrome *needs* it to be in application dir. add symlink until it can load from other places
218 # for chromium, we could likely patch source
219 %triggerin -n browser-plugin-chrome-pdf -- google-chrome
220 test -L %{_libdir}/google-chrome/libpdf.so || ln -s plugins/libpdf.so %{_libdir}/google-chrome/libpdf.so
221
222 %triggerun -n browser-plugin-chrome-pdf -- google-chrome
223 rm -f %{_libdir}/google-chrome/libpdf.so
224
225 %triggerin -n browser-plugin-chrome-pdf -- chromium-browser
226 test -L %{_libdir}/chromium-browser/libpdf.so || ln -s plugins/libpdf.so %{_libdir}/chromium-browser/libpdf.so
227
228 %triggerun -n browser-plugin-chrome-pdf -- chromium-browser
229 rm -f %{_libdir}/chromium-browser/libpdf.so
230
231 %triggerin -n browser-plugin-chrome-pdf -- chromium-browser-bin
232 test -L %{_libdir}/chromium-browser-bin/libpdf.so || ln -s plugins/libpdf.so %{_libdir}/chromium-browser-bin/libpdf.so
233
234 %triggerun -n browser-plugin-chrome-pdf -- chromium-browser-bin
235 rm -f %{_libdir}/chromium-browser-bin/libpdf.so
236
237 %files -f %{name}.lang
238 %defattr(644,root,root,755)
239
240 %{_browserpluginsconfdir}/browsers.d/%{name}.*
241 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
242
243 %attr(755,root,root) %{_bindir}/%{name}
244 %{_mandir}/man1/*.1*
245 %{_desktopdir}/*.desktop
246 %{_iconsdir}/hicolor/*/apps/%{name}.png
247
248 %dir %{_libdir}/%{name}
249 %{_libdir}/%{name}/chrome.pak
250 %{_libdir}/%{name}/resources.pak
251 %dir %{_libdir}/%{name}/locales
252 %dir %{_libdir}/%{name}/plugins
253 %{_libdir}/%{name}/default_apps
254 %{_libdir}/%{name}/themes
255 %attr(755,root,root) %{_libdir}/%{name}/chrome
256 # These unique permissions are intentional and necessary for the sandboxing
257 %attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
258
259 # Native Client plugin, to use launch with --enable-nacl
260 %attr(755,root,root) %{_libdir}/%{name}/libppGoogleNaClPluginChrome.so
261
262 # nacl
263 %attr(755,root,root) %{_libdir}/%{name}/nacl_helper
264 %attr(755,root,root) %{_libdir}/%{name}/nacl_helper_bootstrap
265 %attr(755,root,root) %{_libdir}/%{name}/nacl_irt_x86_*.nexe
266
267 # ffmpeg libs
268 %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
269
270 # hack
271 %dir /opt/google
272 /opt/google/chrome
273
274 %files -n browser-plugin-chrome-pdf
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_browserpluginsdir}/libpdf.so
277
278 %ifarch %{ix86}
279 %files -n browser-plugin-adobe-flash
280 %defattr(644,root,root,755)
281 %{_libdir}/%{name}/plugin.vch
282 %attr(755,root,root) %{_browserpluginsdir}/libgcflashplayer.so
283 %endif
This page took 0.08742 seconds and 4 git commands to generate.