]>
Commit | Line | Data |
---|---|---|
4833ef5f | 1 | # NOTE |
0f2fa0e4 | 2 | # - to look and update to new version, use update-source.sh script |
f90488f9 ER |
3 | # |
4 | # Conditional build: | |
8fb7d086 | 5 | %bcond_with ffmpegsumo # using ffmpegsumo |
a054d194 | 6 | |
ccf1ba3b | 7 | %define state stable |
c7941520 AM |
8 | %if "%{state}" == "beta" || "%{state}" == "unstable" |
9 | %define gcsuffix -%{state} | |
10 | %endif | |
b678fd32 | 11 | Summary: Google Chrome |
20c9b3eb | 12 | Name: google-chrome%{?gcsuffix} |
67ca4792 | 13 | Version: 115.0.5790.170 |
b6c0552a | 14 | Release: 1 |
b678fd32 ER |
15 | License: Multiple, see http://chrome.google.com/ |
16 | Group: Applications/Networking | |
20c9b3eb | 17 | Source0: http://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-%{state}-%{version}-%{release}.x86_64.rpm |
67ca4792 | 18 | # NoSource0-md5: 6e67d1c0a8f0b5862da0aa3ba27344cd |
4676ea31 | 19 | NoSource: 0 |
20c9b3eb | 20 | Source1: google-chrome.sh |
4676ea31 | 21 | Source2: find-lang.sh |
b678fd32 ER |
22 | URL: http://chrome.google.com/ |
23 | BuildRequires: rpm-utils | |
24 | BuildRequires: rpmbuild(macros) >= 1.453 | |
fb2a0216 | 25 | BuildRequires: sed >= 4.0 |
b678fd32 | 26 | Requires: browser-plugins >= 2.0 |
a7060f55 | 27 | Requires: cpuinfo(sse2) |
95e0f74d ER |
28 | # crashes if no fontconfig font present |
29 | Requires: fonts-Type1-urw | |
0372c07e | 30 | Requires: hicolor-icon-theme |
3b9c390e AM |
31 | # https://www.phoronix.com/scan.php?page=news_item&px=Google-Chrome-TSYNC-Kernel |
32 | Requires: uname(release) >= 3.17 | |
a7060f55 | 33 | Requires: xdg-utils >= 1.0.2-4 |
e5492c1c | 34 | Provides: wwwbrowser |
e2396458 | 35 | ExclusiveArch: %{x8664} |
b678fd32 ER |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
548b2cd3 ER |
38 | %{expand:%%define crver %{version}} |
39 | ||
b678fd32 ER |
40 | %define find_lang sh find-lang.sh %{buildroot} |
41 | ||
42 | %define _enable_debug_packages 0 | |
43 | %define no_install_post_strip 1 | |
44 | ||
b678fd32 ER |
45 | %define ffmpeg_caps libffmpegsumo.so |
46 | ||
47 | # list of script capabilities (regexps) not to be used in Provides | |
58e6ccff | 48 | %define _noautoprov %{ffmpeg_caps} |
b678fd32 ER |
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 | ||
e086d25f ZU |
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 | ||
7d308590 ER |
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 | ||
b678fd32 ER |
78 | %prep |
79 | %setup -qcT | |
f87433fa | 80 | SOURCE=%{S:0} |
b678fd32 | 81 | |
4833ef5f ER |
82 | V=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE) |
83 | R=$(rpm -qp --nodigest --nosignature --qf '%{R}' $SOURCE) | |
b6c0552a | 84 | if [ version:$V != version:%{crver} -o release:$R != release:%{release} ]; then |
f87433fa ER |
85 | exit 1 |
86 | fi | |
87 | rpm2cpio $SOURCE | cpio -i -d | |
88 | ||
c7941520 | 89 | mv opt/google/chrome%{?gcsuffix} . |
b678fd32 ER |
90 | mv usr/share/man/man1/* . |
91 | mv usr/share/gnome-control-center/default-apps . | |
c7941520 AM |
92 | mv chrome%{?gcsuffix}/default-app-block . |
93 | mv chrome%{?gcsuffix}/product_logo_*.{png,xpm} . | |
94 | mv usr/share/applications/google-chrome%{?gcsuffix}.desktop . | |
95 | mv chrome%{?gcsuffix}/google-chrome* . | |
2ce91f51 | 96 | mv chrome%{?gcsuffix}/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so chrome%{?gcsuffix}/ |
c7941520 | 97 | chmod a+x chrome%{?gcsuffix}/lib*.so* |
b678fd32 | 98 | |
15e0d90c | 99 | # included in gnome-control-center-2.28.1-3 |
c7941520 | 100 | rm default-app-block default-apps/google-chrome%{?gcsuffix}.xml |
15e0d90c | 101 | |
13034b9f | 102 | # xdg-utils snapshot required |
c7941520 AM |
103 | rm chrome%{?gcsuffix}/xdg-settings |
104 | rm chrome%{?gcsuffix}/xdg-mime | |
13034b9f | 105 | |
d5e076ee AM |
106 | if [ -n "$(ls *.1.gz)" ]; then |
107 | for file in *.1.gz; do | |
108 | [ -f "$file" ] && gzip -d "$file" | |
109 | done | |
110 | fi | |
b678fd32 | 111 | |
4676ea31 | 112 | %{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE2} > find-lang.sh |
c7941520 AM |
113 | %{__sed} -i 's;/opt/google/chrome/product_logo_48.png;%{name}.png;' google-chrome%{?gcsuffix}.desktop |
114 | %{__sed} -i 's;/opt/google/chrome;%{_bindir};' google-chrome%{?gcsuffix}.desktop | |
115 | %{__sed} -i 's;xhtml_xml;xhtml+xml;' google-chrome%{?gcsuffix}.desktop | |
116 | %{__sed} -i 's#google-chrome-\(stable\|beta\|unstable\)#google-chrome#g' google-chrome%{?gcsuffix}.desktop | |
b678fd32 | 117 | |
548b2cd3 | 118 | %build |
770f0756 | 119 | |
b678fd32 ER |
120 | %install |
121 | rm -rf $RPM_BUILD_ROOT | |
58e6ccff | 122 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_desktopdir},%{_libdir}/%{name}/themes} \ |
d47bc555 | 123 | $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions |
b678fd32 | 124 | |
4676ea31 | 125 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name} |
3594c02f AM |
126 | sed -i -e 's#RPM_STATE#%{state}#g' $RPM_BUILD_ROOT%{_bindir}/%{name} |
127 | ||
b678fd32 | 128 | %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name} |
c7941520 | 129 | cp -a chrome%{?gcsuffix}/* $RPM_BUILD_ROOT%{_libdir}/%{name} |
20c9b3eb | 130 | cp -p google-chrome-%{state}.1 $RPM_BUILD_ROOT%{_mandir}/man1/google-chrome%{?gcsuffix}.1 |
b48d09d7 | 131 | # for google-chrome --help |
20c9b3eb AM |
132 | echo ".so google-chrome%{?gcsuffix}.1" > $RPM_BUILD_ROOT%{_mandir}/man1/chrome%{?gcsuffix}.1 |
133 | cp -p google-chrome%{?gcsuffix}.desktop $RPM_BUILD_ROOT%{_desktopdir}/google-chrome%{?gcsuffix}.desktop | |
0372c07e ER |
134 | |
135 | for icon in product_logo_*.png; do | |
136 | size=${icon##product_logo_} | |
137 | size=${size%.png} | |
d5e076ee | 138 | size=${size%_%{state}} |
0372c07e ER |
139 | |
140 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps | |
141 | cp -p $icon $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps/%{name}.png | |
142 | done | |
b678fd32 ER |
143 | |
144 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins | |
145 | ||
0c3918d7 ER |
146 | # binary needs to be at that specific location, or it will abort: |
147 | # [1070:1070:3265429789299:FATAL:zygote_host_linux.cc(130)] The SUID sandbox helper binary is missing: /opt/google/chrome/chrome-sandbox Aborting now. | |
148 | # Aborted | |
149 | install -d $RPM_BUILD_ROOT/opt/google | |
b3bb2938 ER |
150 | # see if CHROME_DEVEL_SANDBOX env var helps |
151 | # content/browser/browser_main_loop.cc | |
c7941520 | 152 | ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT/opt/google/chrome%{?gcsuffix} |
0c3918d7 | 153 | |
b678fd32 ER |
154 | # find locales |
155 | %find_lang %{name}.lang | |
7d308590 ER |
156 | # always package en-US (in main package) |
157 | %{__sed} -i -e '/en-US.pak/d' %{name}.lang | |
b678fd32 ER |
158 | |
159 | %clean | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
162 | %post | |
0372c07e | 163 | %update_icon_cache hicolor |
b678fd32 ER |
164 | %update_browser_plugins |
165 | ||
166 | %postun | |
167 | if [ "$1" = 0 ]; then | |
0372c07e | 168 | %update_icon_cache hicolor |
b678fd32 ER |
169 | %update_browser_plugins |
170 | fi | |
171 | ||
bbdd4bed | 172 | %files |
b678fd32 ER |
173 | %defattr(644,root,root,755) |
174 | ||
175 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
176 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
177 | ||
178 | %attr(755,root,root) %{_bindir}/%{name} | |
179 | %{_mandir}/man1/*.1* | |
b678fd32 | 180 | %{_desktopdir}/*.desktop |
0372c07e ER |
181 | %{_iconsdir}/hicolor/*/apps/%{name}.png |
182 | ||
b678fd32 | 183 | %dir %{_libdir}/%{name} |
d5e076ee | 184 | %{_libdir}/%{name}/MEIPreload |
7d599979 | 185 | %{_libdir}/%{name}/icudtl.dat |
94ca265e | 186 | %{_libdir}/%{name}/chrome_*_percent.pak |
b6ea4d22 | 187 | %{_libdir}/%{name}/chrome-management-service |
7d599979 | 188 | %{_libdir}/%{name}/resources.pak |
789623f0 | 189 | %{_libdir}/%{name}/v8_context_snapshot.bin |
e2396458 KM |
190 | %{_libdir}/%{name}/libEGL.so |
191 | %{_libdir}/%{name}/libGLESv2.so | |
b6ea4d22 KM |
192 | %{_libdir}/%{name}/liboptimization_guide_internal.so |
193 | %{_libdir}/%{name}/libqt5_shim.so | |
35e045c4 | 194 | %{_libdir}/%{name}/libqt6_shim.so |
de4f4afd | 195 | %{_libdir}/%{name}/libvulkan.so.1 |
b678fd32 | 196 | %dir %{_libdir}/%{name}/locales |
7d308590 | 197 | %{_libdir}/%{name}/locales/en-US.pak |
2a04befa | 198 | #%{_libdir}/%{name}/locales/fake-bidi.pak |
b678fd32 | 199 | %dir %{_libdir}/%{name}/plugins |
c6e13b17 | 200 | %dir %{_datadir}/%{name} |
d47bc555 ER |
201 | # The path to the external extension <id>.json files. |
202 | # see https://chromium.googlesource.com/chromium/chromium/+/trunk/chrome/common/chrome_paths.cc | |
c6e13b17 | 203 | %dir %{_datadir}/%{name}/extensions |
46df17af | 204 | %{_libdir}/%{name}/default_apps |
b678fd32 ER |
205 | %{_libdir}/%{name}/themes |
206 | %attr(755,root,root) %{_libdir}/%{name}/chrome | |
207 | # These unique permissions are intentional and necessary for the sandboxing | |
208 | %attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox | |
209 | ||
245a67c4 | 210 | %attr(755,root,root) %{_libdir}/%{name}/chrome_crashpad_handler |
e2568d37 | 211 | |
1bb896c1 ER |
212 | # nacl |
213 | %attr(755,root,root) %{_libdir}/%{name}/nacl_helper | |
214 | %attr(755,root,root) %{_libdir}/%{name}/nacl_helper_bootstrap | |
215 | %attr(755,root,root) %{_libdir}/%{name}/nacl_irt_x86_*.nexe | |
5622b044 AM |
216 | |
217 | # DRM | |
218 | %attr(755,root,root) %{_libdir}/%{name}/libwidevinecdm.so | |
1bb896c1 | 219 | |
b678fd32 | 220 | # ffmpeg libs |
f90488f9 | 221 | %if %{with ffmpegsumo} |
b678fd32 | 222 | %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so |
f90488f9 | 223 | %endif |
0c3918d7 | 224 | |
914b1cee KM |
225 | %attr(755,root,root) %{_libdir}/%{name}/libvk_swiftshader.so |
226 | %{_libdir}/%{name}/vk_swiftshader_icd.json | |
227 | ||
e2568d37 | 228 | %{_libdir}/%{name}/WidevineCdm |
0c3918d7 | 229 | # hack |
ebfaf44a | 230 | %dir /opt/google |
c7941520 | 231 | /opt/google/chrome%{?gcsuffix} |
f6b3cf39 | 232 | |
7d308590 ER |
233 | %files l10n -f %{name}.lang |
234 | %defattr(644,root,root,755) |