]>
Commit | Line | Data |
---|---|---|
0c480b89 ER |
1 | # |
2 | # Conditional build: | |
2108baf2 ER |
3 | %bcond_without debuginfo # disable debuginfo creation (it is huge) |
4 | %bcond_without ffmpegsumo # build with ffmpegsumo | |
8171fe68 | 5 | %bcond_without kerberos # build with kerberos support (dlopened if support compiled, library names in src/net/http/http_auth_gssapi_posix.cc) |
2108baf2 | 6 | %bcond_without keyring # with keyring support (gnome-keyring dlopened, kwalletd via dbus) |
ae3fe89f ER |
7 | %bcond_without cups # with cups |
8 | %bcond_without gconf # with GConf | |
9 | %bcond_without pulseaudio # with pulseaudio | |
5997e180 | 10 | %bcond_without nacl # build Native Client support |
2108baf2 ER |
11 | %bcond_without sandboxing # with sandboxing |
12 | %bcond_with selinux # with SELinux (need policy first) | |
13 | %bcond_with shared_libs # with shared libs | |
14 | %bcond_with sse2 # use SSE2 instructions | |
d8ba130c | 15 | %bcond_with tcmalloc # use tcmalloc |
2108baf2 | 16 | %bcond_with system_sqlite # with system sqlite |
32a2443e | 17 | %bcond_without system_flac # with system flac |
e8e15592 | 18 | %bcond_without system_libwebp # with system libwebp |
32a2443e | 19 | %bcond_without system_speex # with system speex |
c14cd342 | 20 | %bcond_with system_v8 # with system v8 |
32a2443e | 21 | %bcond_without system_vpx # with system vpx |
d617ab39 | 22 | %bcond_without system_yasm # with system yasm |
4c272135 ER |
23 | # system zlib disabled because of mixed-source.patch |
24 | # https://code.google.com/p/chromium/issues/detail?id=143623 | |
25 | %bcond_with system_zlib # with system zlib | |
5997e180 | 26 | %bcond_without libjpegturbo # use libjpeg-turbo features |
2108baf2 | 27 | %bcond_with verbose # verbose build (V=1) |
0c480b89 | 28 | |
c6325ea2 ER |
29 | %if %{with nacl} |
30 | # temporary hack as seems this does not work: http://codereview.chromium.org/8890043 | |
31 | # nacl_bootstrap.c:(.text.load_elf_file+0x707): undefined reference to `__stack_chk_fail' | |
32 | #14:08:04 @baggins> glen: yes, I added SSP in rpm5, add -lssp to link flags to fix it | |
33 | #14:19:42 @baggins> it doesn't hurt to add -lssp here and there, and we'll be a bit more secure | |
34 | #14:51:06 @baggins> as-needed will take care of unneeded lib | |
35 | #14:52:03 @baggins> -lssp comes with gcc | |
107b55fe | 36 | %define _ssp_cflags %{nil} |
c6325ea2 ER |
37 | %endif |
38 | ||
6d92f81c | 39 | # TODO |
f1b276d4 | 40 | # - check system sqlite linking problems |
2108baf2 | 41 | # - find system deps: find -name '*.gyp*' | xargs grep 'use_system.*==' |
a3140cd1 | 42 | # - use_system_ssl (use_openssl: http://crbug.com/62803) |
32a2443e | 43 | # - use_system_ffmpeg && build_ffmpegsumo |
d617ab39 | 44 | # - use_system_hunspell |
32a2443e | 45 | # - use_system_stlport |
a3140cd1 ER |
46 | # - other defaults: src/build/common.gypi |
47 | ||
e53ecfb5 | 48 | # NOTES: |
4fe038cb ER |
49 | # - mute BEEP mixer if you do not want to hear horrible system bell when |
50 | # pressing home/end in url bar or more ^F search results on page. | |
2108baf2 ER |
51 | # - build -bp: 1.2G |
52 | # - build i686: -bc: 2.7G; -bb: ~1.0GB | |
e8e15592 | 53 | # - build x86_64: ~1.9G |
f1b276d4 | 54 | # - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites |
84fa20a9 | 55 | # - to look for new tarball, use update-source.sh script |
f1b276d4 | 56 | |
e68aa7e7 | 57 | # NOTE TO USERS: |
c8b02491 | 58 | # To use chromium nightly beta builds for pld-th save to /etc/poldek/repos.d (as chromium-nightly.conf): |
a3cc7091 | 59 | # http://carme.pld-linux.org/~glen/chromium-browser/th/x86_64/chromium-nightly.conf |
c8b02491 | 60 | # http://carme.pld-linux.org/~glen/chromium-browser/th/i686/chromium-nightly.conf |
e68aa7e7 | 61 | |
a3140cd1 | 62 | %define gyp_rev 1014 |
11ad81c4 | 63 | Summary: A WebKit powered web browser |
05f72ae2 | 64 | Name: chromium-browser |
d11f565e | 65 | Version: 22.0.1229.94 |
64a233ce | 66 | Release: 1 |
05f72ae2 | 67 | License: BSD, LGPL v2+ (ffmpeg) |
e53ecfb5 | 68 | Group: X11/Applications/Networking |
daa4a66c | 69 | Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{version}.tar.xz |
d11f565e | 70 | # Source0-md5: cdcdd11480178f0f823e54bf490db408 |
37ceaf05 | 71 | Source1: %{name}.default |
8b53130d ER |
72 | Source2: %{name}.sh |
73 | Source3: %{name}.desktop | |
56c6e811 ER |
74 | Source5: find-lang.sh |
75 | Source6: update-source.sh | |
76 | Source7: clean-source.sh | |
836b1cac | 77 | Source8: get-source.sh |
48b341f5 | 78 | Patch0: system-libs.patch |
79 | Patch1: plugin-searchdirs.patch | |
80 | Patch2: gyp-system-minizip.patch | |
7abc645c | 81 | Patch3: disable_dlog_and_dcheck_in_release_builds.patch |
72cb20c1 | 82 | Patch4: path-libpdf.patch |
48b341f5 | 83 | Patch5: options-support.patch |
0e5636cb | 84 | Patch6: get-webkit_revision.patch |
5aa5df39 | 85 | Patch7: dlopen_sonamed_gl.patch |
4765ddf1 | 86 | Patch8: chromium_useragent.patch.in |
c0808220 | 87 | Patch9: chromium-ppapi.patch |
1347c76c AM |
88 | # https://bugs.gentoo.org/show_bug.cgi?id=393471 |
89 | # libjpeg-turbo >= 1.1.90 supports that feature | |
f4a8da6a | 90 | Patch11: chromium-revert-jpeg-swizzle-r2.patch |
5997e180 ER |
91 | Patch15: nacl-build-irt.patch |
92 | Patch16: nacl-linkingfix.patch | |
750b48f7 | 93 | URL: http://www.chromium.org/Home |
ae3fe89f | 94 | %{?with_gconf:BuildRequires: GConf2-devel} |
f1b276d4 | 95 | BuildRequires: OpenGL-GLU-devel |
05f72ae2 ER |
96 | BuildRequires: alsa-lib-devel |
97 | BuildRequires: atk-devel | |
98 | BuildRequires: bison | |
11ad81c4 | 99 | BuildRequires: bzip2-devel |
5997e180 ER |
100 | %{?with_nacl:BuildRequires: crossnacl-binutils >= 2.20.1} |
101 | %{?with_nacl:BuildRequires: crossnacl-gcc >= 4.4.3} | |
102 | %{?with_nacl:BuildRequires: crossnacl-gcc-c++ >= 4.4.3} | |
103 | %{?with_nacl:BuildRequires: crossnacl-newlib >= 1.18.0} | |
ae3fe89f | 104 | %{?with_cups:BuildRequires: cups-devel} |
2bc5cf47 | 105 | BuildRequires: dbus-glib-devel |
77f32fa3 | 106 | BuildRequires: expat-devel |
d617ab39 | 107 | %{?with_system_flac:BuildRequires: flac-devel} |
11ad81c4 | 108 | BuildRequires: flex |
11ad81c4 | 109 | BuildRequires: fontconfig-devel |
f1b276d4 | 110 | BuildRequires: glib2-devel |
05f72ae2 | 111 | BuildRequires: gperf |
8b53130d | 112 | BuildRequires: gtk+2-devel |
a3140cd1 | 113 | %{?with_kerberos:BuildRequires: heimdal-devel} |
0eb19b0b | 114 | BuildRequires: hicolor-icon-theme |
05f72ae2 | 115 | BuildRequires: libevent-devel |
7f40f3f4 | 116 | %{?with_keyring:BuildRequires: libgnome-keyring-devel} |
0b214002 | 117 | BuildRequires: libicu-devel >= 4.6 |
39c71b4c | 118 | %{!?with_libjpegturbo:BuildRequires: libjpeg-devel} |
f4a8da6a | 119 | %{?with_libjpegturbo:BuildRequires: libjpeg-turbo-devel >= 1.2.0} |
05f72ae2 | 120 | BuildRequires: libpng-devel |
e266589e | 121 | %{?with_selinux:BuildRequires: libselinux-devel} |
05f72ae2 | 122 | BuildRequires: libstdc++-devel |
32a2443e | 123 | %{?with_system_vpx:BuildRequires: libvpx-devel >= 0.9.5-2} |
dd1509bd | 124 | %{?with_system_libwebp:BuildRequires: libwebp-devel >= 0.1.99} |
f1b276d4 | 125 | BuildRequires: libxml2-devel |
11ad81c4 | 126 | BuildRequires: libxslt-devel |
f1b276d4 | 127 | BuildRequires: lzma |
11ad81c4 | 128 | BuildRequires: minizip-devel |
05f72ae2 | 129 | BuildRequires: nspr-devel |
f1b276d4 | 130 | BuildRequires: nss-devel >= 1:3.12.3 |
35902862 | 131 | BuildRequires: pam-devel |
f1b276d4 | 132 | BuildRequires: pango-devel |
48b341f5 | 133 | BuildRequires: perl-modules |
134 | BuildRequires: pkgconfig | |
ae3fe89f | 135 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel} |
f1b276d4 | 136 | BuildRequires: python |
46cdefee | 137 | #BuildRequires: python-gyp >= 1-%{gyp_rev} |
48b341f5 | 138 | BuildRequires: python-modules |
0cad051b | 139 | BuildRequires: rpm >= 4.4.9-56 |
f1b276d4 | 140 | BuildRequires: rpmbuild(macros) >= 1.453 |
0cad051b | 141 | %{?with_system_speex:BuildRequires: speex-devel >= 1:1.2-rc1} |
f1b276d4 | 142 | BuildRequires: sqlite3-devel >= 3.6.1 |
89f0dde4 | 143 | BuildRequires: subversion |
0cad051b | 144 | BuildRequires: tar >= 1:1.22 |
0a424ee2 | 145 | BuildRequires: udev-devel |
2303ed45 | 146 | BuildRequires: util-linux |
c14cd342 | 147 | %{?with_system_v8:BuildRequires: v8-devel >= 3.7} |
0826c245 | 148 | BuildRequires: which |
f1b276d4 | 149 | BuildRequires: xorg-lib-libXScrnSaver-devel |
2bc5cf47 KK |
150 | BuildRequires: xorg-lib-libXt-devel |
151 | BuildRequires: xorg-lib-libXtst-devel | |
836b1cac | 152 | BuildRequires: xz |
a3140cd1 | 153 | %{?with_system_yasm:BuildRequires: yasm} |
f1b276d4 | 154 | %{?with_system_zlib:BuildRequires: zlib-devel} |
e53ecfb5 | 155 | Requires: browser-plugins >= 2.0 |
0cad051b | 156 | Requires: desktop-file-utils |
0eb19b0b | 157 | Requires: hicolor-icon-theme |
c1edaafa | 158 | %{?with_libjpegturbo:Requires: libjpeg-turbo >= 1.2.0} |
32a2443e | 159 | %{?with_system_vpx:Requires: libvpx >= 0.9.5-2} |
4dc49133 | 160 | Requires: xdg-utils >= 1.0.2-4 |
e53ecfb5 | 161 | Provides: wwwbrowser |
c3582150 | 162 | Obsoletes: chromium-browser-bookmark_manager < 5.0.388.0 |
a3140cd1 | 163 | Obsoletes: chromium-browser-inspector < 15.0.863.0 |
2351db3b | 164 | ExclusiveArch: %{ix86} %{x8664} arm |
11ad81c4 | 165 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
11ad81c4 | 166 | |
589d90ea | 167 | %define find_lang sh find-lang.sh %{buildroot} |
2446ebb3 | 168 | |
e7fa0817 ER |
169 | # Usage: gyp_with BCOND_NAME [OPTION_NAME] |
170 | %define gyp_with() %{expand:%%{?with_%{1}:-D%{?2:use_%{2}}%{!?2:use_%{1}}=1}%%{!?with_%{1}:-D%{?2:use_%{2}}%{!?2:use_%{1}}=0}} | |
589d90ea | 171 | |
6b113615 ER |
172 | %if %{without debuginfo} |
173 | %define _enable_debug_packages 0 | |
174 | %endif | |
175 | ||
11ad81c4 | 176 | %description |
80838854 ER |
177 | Chromium is an open-source browser project that aims to build a safer, |
178 | faster, and more stable way for all Internet users to experience the | |
179 | web. | |
180 | ||
181 | Chromium serves as a base for Google Chrome, which is Chromium | |
182 | rebranded (name and logo) with very few additions such as usage | |
183 | tracking and an auto-updater system. | |
184 | ||
f1b276d4 ER |
185 | %package l10n |
186 | Summary: chromium-browser language packages | |
187 | Group: I18n | |
188 | Requires: %{name} = %{version}-%{release} | |
189 | ||
190 | %description l10n | |
191 | Chromium is an open-source browser project that aims to build a safer, | |
192 | faster, and more stable way for all Internet users to experience the | |
193 | web. | |
194 | ||
195 | This package contains language packages for 50 languages: | |
196 | ||
e7fa0817 ER |
197 | ar, bg, bn, ca, cs, da, de, el, en-GB, es-LA, es, et, fi, fil, fr, gu, |
198 | he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or, pl, | |
199 | pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi, zh-CN, | |
200 | zh-TW | |
f1b276d4 ER |
201 | |
202 | %prep | |
836b1cac | 203 | %setup -q |
589d90ea | 204 | |
05f72ae2 ER |
205 | # Google's versioning is interesting. They never reset "BUILD", which is how we jumped |
206 | # from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch | |
0c480b89 ER |
207 | . ./src/chrome/VERSION |
208 | ver=$MAJOR.$MINOR.$BUILD.$PATCH | |
a3140cd1 ER |
209 | test "$ver" = %{version} |
210 | ||
211 | gyp_rev=$(grep googlecode_url.*gyp src/DEPS | cut -d'"' -f6 | cut -d@ -f2) | |
2d2c8139 | 212 | test "$gyp_rev" = %{gyp_rev} || : |
05f72ae2 | 213 | |
836b1cac | 214 | v8_ver=$(awk 'NR=1 {print $NF; exit}' src/v8/ChangeLog || :) |
33b04c7d | 215 | |
4765ddf1 ER |
216 | # add chromium and pld to useragent |
217 | %define pld_version %(echo %{pld_release} | sed -e 'y/[at]/[AT]/') | |
218 | sed -e 's/@BUILD_DIST@/PLD %{pld_version}/g' \ | |
219 | -e 's/@BUILD_DIST_NAME@/PLD/g' \ | |
220 | -e 's/@BUILD_DIST_VERSION@/%{pld_version}/g' \ | |
74a58b60 | 221 | < %{PATCH8} | %{__patch} -p1 |
4765ddf1 | 222 | |
56c6e811 ER |
223 | %{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE5} > find-lang.sh |
224 | ln -s %{SOURCE7} src | |
f1b276d4 | 225 | |
05f72ae2 ER |
226 | %patch0 -p1 |
227 | %patch1 -p1 | |
228 | %patch2 -p1 | |
7abc645c | 229 | %patch3 -p1 |
72cb20c1 | 230 | %patch4 -p1 |
05f72ae2 | 231 | %patch5 -p1 |
0e5636cb | 232 | %patch6 -p1 |
5aa5df39 | 233 | %patch7 -p1 |
77f32fa3 | 234 | cd src |
c0808220 | 235 | %patch9 -p0 |
f4a8da6a | 236 | %{!?with_libjpegturbo:%patch11 -p0} |
5997e180 ER |
237 | %patch15 -p1 |
238 | %patch16 -p1 | |
1347c76c | 239 | cd .. |
0c480b89 | 240 | |
828bdd1a | 241 | cd src |
4c272135 | 242 | sh -x clean-source.sh %{!?with_system_v8:v8=0} %{!?with_nacl:nacl=0} libxml=0 %{!?with_system_zlib:zlib=0} |
164020eb | 243 | |
e266589e | 244 | %build |
f1b276d4 | 245 | cd src |
5997e180 ER |
246 | |
247 | %if %{with nacl} | |
248 | rm -rf native_client/toolchain/linux_x86_newlib | |
249 | # Make symlinks for nacl | |
250 | cd native_client/toolchain | |
251 | install -d linux_x86_newlib/x86_64-nacl/bin | |
252 | install -d linux_x86_newlib/x86_64-nacl/lib | |
253 | install -d linux_x86_newlib/x86_64-nacl/lib32 | |
254 | install -d linux_x86_newlib/x86_64-nacl/nacl/include/bits | |
255 | install -d linux_x86_newlib/x86_64-nacl/nacl/include/machine | |
256 | install -d linux_x86_newlib/x86_64-nacl/nacl/include/sys | |
c0808220 ER |
257 | # link newlib toolchain to glibc as well, see gentoo bug #417019 |
258 | #ln -s linux_x86_newlib linux_x86 | |
5997e180 ER |
259 | cd linux_x86_newlib/x86_64-nacl/bin |
260 | ln -s %{_bindir}/x86_64-nacl-gcc gcc | |
261 | ln -s %{_bindir}/x86_64-nacl-g++ g++ | |
262 | ln -s %{_bindir}/x86_64-nacl-ar ar | |
263 | ln -s %{_bindir}/x86_64-nacl-as as | |
264 | ln -s %{_bindir}/x86_64-nacl-ranlib ranlib | |
265 | ln -s %{_bindir}/x86_64-nacl-strip x86-64-nacl-strip | |
266 | ln -s %{_bindir}/x86_64-nacl-strip strip | |
267 | ln -s %{_prefix}/x86_64-nacl/lib/*.a ../lib/ | |
268 | ln -s %{_prefix}/x86_64-nacl/lib/32/*.a ../lib32/ | |
269 | cd ../nacl/include | |
270 | for i in $(find %{_prefix}/x86_64-nacl/include -type f | grep -v "c++"); do | |
271 | ln -s $i ${i#%{_prefix}/x86_64-nacl/include/} | |
272 | done | |
273 | cd ../../../../../.. | |
274 | %endif | |
275 | ||
164020eb | 276 | test -e Makefile || %{__python} build/gyp_chromium --format=make build/all.gyp \ |
f1b276d4 ER |
277 | %ifarch %{ix86} |
278 | -Dtarget_arch=ia32 \ | |
279 | %endif | |
280 | %ifarch %{x8664} | |
0c480b89 ER |
281 | -Dtarget_arch=x64 \ |
282 | %endif | |
7b454a31 AM |
283 | %if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0" |
284 | -Dno_strict_aliasing=1 -Dgcc_version=44 \ | |
f1b276d4 ER |
285 | %endif |
286 | %if %{with sandboxing} | |
287 | -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \ | |
288 | -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \ | |
289 | %endif | |
290 | %{!?debug:-Dwerror=} \ | |
c980b122 | 291 | %{!?debuginfo:-Dfastbuild=1 -Dremove_webcore_debug_symbols=1} \ |
f1b276d4 | 292 | %{?with_shared_libs:-Dlibrary=shared_library} \ |
37b05e5e | 293 | -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \ |
a3140cd1 ER |
294 | -Dffmpeg_branding=Chrome \ |
295 | -Dproprietary_codecs=1 \ | |
c0808220 ER |
296 | %if %{with nacl} |
297 | %{?_:# Disable glibc Native Client toolchain, we don't need it (gentoo bug #417019).} \ | |
298 | -Ddisable_glibc=1 \ | |
038f76b9 | 299 | -Dnaclsdk_mode=custom:/usr/x86_64-nacl \ |
c0808220 ER |
300 | %else |
301 | -Ddisable_nacl=1 \ | |
302 | %endif | |
a3140cd1 ER |
303 | %{!?with_sse2:-Ddisable_sse2=1} \ |
304 | %{?with_selinux:-Dselinux=1} \ | |
e7fa0817 ER |
305 | %{gyp_with cups} \ |
306 | %{gyp_with flac} \ | |
307 | %{gyp_with gconf} \ | |
308 | %{gyp_with kerberos} -Dlinux_link_kerberos=0 \ | |
309 | %{gyp_with keyring gnome_keyring} -Dlinux_link_gnome_keyring=0 \ | |
310 | %{gyp_with pulseaudio} \ | |
e8e15592 | 311 | %{gyp_with system_libwebp} \ |
e7fa0817 ER |
312 | %{gyp_with system_speex} \ |
313 | %{gyp_with system_sqlite} \ | |
314 | %{gyp_with system_v8} \ | |
32a2443e | 315 | %{gyp_with system_vpx} \ |
e7fa0817 ER |
316 | %{gyp_with system_yasm} \ |
317 | %{gyp_with system_zlib} \ | |
0c480b89 | 318 | -Duse_system_bzip2=1 \ |
0b214002 | 319 | -Duse_system_icu=1 \ |
f1b276d4 | 320 | -Duse_system_libevent=1 \ |
0c480b89 | 321 | -Duse_system_libjpeg=1 \ |
f1b276d4 ER |
322 | -Duse_system_libpng=1 \ |
323 | -Duse_system_libxml=1 \ | |
324 | -Duse_system_libxslt=1 \ | |
7f40f3f4 | 325 | -Duse_system_xdg_utils=1 \ |
d8ba130c | 326 | %{!?with_tcmalloc:-Dlinux_use_tcmalloc=0} \ |
44f353ec AM |
327 | -Dlinux_use_gold_binary=0 \ |
328 | -Dlinux_use_gold_flags=0 | |
11ad81c4 | 329 | |
f1b276d4 ER |
330 | %{__make} chrome %{?with_sandboxing:chrome_sandbox} \ |
331 | BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \ | |
332 | %{?with_verbose:V=1} \ | |
333 | CC="%{__cc}" \ | |
334 | CXX="%{__cxx}" \ | |
b7adf6b1 | 335 | LDFLAGS="%{rpmldflags} -fuse-ld=gold" \ |
f1b276d4 ER |
336 | CC.host="%{__cc}" \ |
337 | CXX.host="%{__cxx}" \ | |
b7adf6b1 | 338 | LDFLAGS.host="%{rpmldflags}" \ |
7b454a31 AM |
339 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
340 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" | |
11ad81c4 AM |
341 | |
342 | %install | |
343 | rm -rf $RPM_BUILD_ROOT | |
56c6e811 | 344 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/{themes,plugins,extensions} \ |
37ceaf05 | 345 | $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/%{name},%{_mandir}/man1,%{_desktopdir}} |
e266589e | 346 | |
f1b276d4 | 347 | cd src/out/%{!?debug:Release}%{?debug:Debug} |
37ceaf05 | 348 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default |
f1b276d4 ER |
349 | install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name} |
350 | %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name} | |
97fac491 | 351 | cp -a *.pak locales resources $RPM_BUILD_ROOT%{_libdir}/%{name} |
7f40f3f4 | 352 | cp -p chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 |
f1b276d4 | 353 | install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name} |
e53ecfb5 | 354 | install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox |
d561483d | 355 | %if %{with ffmpegsumo} |
f1b276d4 | 356 | install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name} |
dd46de65 | 357 | %endif |
e7fa0817 | 358 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir} |
164020eb | 359 | |
c0808220 ER |
360 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/resources/extension/demo |
361 | ||
164020eb ER |
362 | %if %{with nacl} |
363 | # Install Native Client files on platforms that support it. | |
364 | install -p nacl_helper{,_bootstrap} $RPM_BUILD_ROOT%{_libdir}/%{name} | |
365 | install -p libppGoogleNaClPluginChrome.so $RPM_BUILD_ROOT%{_libdir}/%{name} | |
366 | %ifarch %{x8664} | |
367 | install -p nacl_irt_x86_64.nexe $RPM_BUILD_ROOT%{_libdir}/%{name} | |
368 | %endif | |
369 | %ifarch %{ix86} | |
370 | install -p nacl_irt_x86_32.nexe $RPM_BUILD_ROOT%{_libdir}/%{name} | |
371 | %endif | |
372 | %endif | |
373 | ||
0c480b89 ER |
374 | cd - |
375 | ||
0eb19b0b ER |
376 | for icon in src/chrome/app/theme/chromium/product_logo_[0-9]*.png; do |
377 | size=${icon##*/product_logo_} | |
378 | size=${size%.png} | |
379 | ||
380 | # this will skip non-numeric (22_mono_invert, 22_mono) | |
381 | dir=%{_iconsdir}/hicolor/${size}x${size}/apps | |
382 | test -d "$dir" || continue | |
383 | ||
384 | install -d $RPM_BUILD_ROOT$dir | |
385 | cp -p $icon $RPM_BUILD_ROOT$dir/%{name}.png | |
386 | done | |
7f40f3f4 | 387 | |
13840bc2 AM |
388 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF' |
389 | # http://code.google.com/p/chromium/issues/detail?id=24507 | |
390 | gecko-mediaplayer*.so | |
391 | EOF | |
11ad81c4 | 392 | |
589d90ea ER |
393 | # find locales |
394 | %find_lang %{name}.lang | |
e7fa0817 | 395 | # always package en-US |
f1b276d4 | 396 | %{__sed} -i -e '/en-US.pak/d' %{name}.lang |
589d90ea | 397 | |
11ad81c4 AM |
398 | %clean |
399 | rm -rf $RPM_BUILD_ROOT | |
400 | ||
f1b276d4 | 401 | %post |
0eb19b0b | 402 | %update_icon_cache hicolor |
b7a6e4ee | 403 | %update_desktop_database |
f1b276d4 ER |
404 | %update_browser_plugins |
405 | ||
406 | %postun | |
407 | if [ "$1" = 0 ]; then | |
0eb19b0b | 408 | %update_icon_cache hicolor |
f1b276d4 ER |
409 | %update_browser_plugins |
410 | fi | |
411 | ||
1d2b9616 | 412 | %files |
11ad81c4 | 413 | %defattr(644,root,root,755) |
f1b276d4 ER |
414 | %{_browserpluginsconfdir}/browsers.d/%{name}.* |
415 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
37ceaf05 ER |
416 | %dir %{_sysconfdir}/%{name} |
417 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default | |
f1b276d4 ER |
418 | %attr(755,root,root) %{_bindir}/%{name} |
419 | %{_mandir}/man1/%{name}.1* | |
11ad81c4 | 420 | %{_desktopdir}/*.desktop |
0eb19b0b | 421 | %{_iconsdir}/hicolor/*/apps/%{name}.png |
0c480b89 ER |
422 | %dir %{_libdir}/%{name} |
423 | %{_libdir}/%{name}/chrome.pak | |
c14cd342 | 424 | %{_libdir}/%{name}/content_resources.pak |
97fac491 | 425 | %{_libdir}/%{name}/resources.pak |
64a233ce ER |
426 | %{_libdir}/%{name}/theme_resources_*.pak |
427 | %{_libdir}/%{name}/ui_resources_*.pak | |
589d90ea | 428 | %dir %{_libdir}/%{name}/locales |
f1b276d4 ER |
429 | %{_libdir}/%{name}/locales/en-US.pak |
430 | %dir %{_libdir}/%{name}/resources | |
a3140cd1 | 431 | %{_libdir}/%{name}/resources/inspector |
f1b276d4 ER |
432 | %dir %{_libdir}/%{name}/themes |
433 | %dir %{_libdir}/%{name}/extensions | |
434 | %dir %{_libdir}/%{name}/plugins | |
435 | %attr(755,root,root) %{_libdir}/%{name}/%{name} | |
0c480b89 | 436 | # These unique permissions are intentional and necessary for the sandboxing |
e53ecfb5 | 437 | %attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox |
f1b276d4 ER |
438 | |
439 | # ffmpeg libs | |
d561483d | 440 | %if %{with ffmpegsumo} |
f1b276d4 | 441 | %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so |
dd46de65 | 442 | %endif |
f1b276d4 | 443 | |
164020eb ER |
444 | %if %{with nacl} |
445 | %attr(755,root,root) %{_libdir}/%{name}/libppGoogleNaClPluginChrome.so | |
446 | %attr(755,root,root) %{_libdir}/%{name}/nacl_helper | |
447 | %attr(755,root,root) %{_libdir}/%{name}/nacl_helper_bootstrap | |
448 | %attr(755,root,root) %{_libdir}/%{name}/nacl_irt_x86_*.nexe | |
449 | %endif | |
450 | ||
f1b276d4 ER |
451 | %files l10n -f %{name}.lang |
452 | %defattr(644,root,root,755) |