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