3 %bcond_with verbose # verbose build (V=1)
4 %bcond_with selinux # with SELinux (need policy first)
5 %bcond_with shared_libs # with shared libs
6 %bcond_with sse2 # use SSE2 instructions
7 %bcond_with system_sqlite # with system sqlite
8 %bcond_with system_v8 # with system v8
9 %bcond_without ffmpegsumo # build with ffmpegsumo
10 %bcond_without sandboxing # with sandboxing
11 %bcond_without system_zlib # with system zlib
12 %bcond_without debuginfo # disable debuginfo creation (it is huge)
15 # - check system sqlite linking problems
18 # - mute BEEP mixer if you do not want to hear horrible system bell when
19 # pressing home/end in url bar or more ^F search results on page.
20 # - build i686: -bp: ~570MB; bc: ~928MB; -bb: ~1.0GB
21 # - build x86_64: -bp: ~570MB; bc: ~990MB; -bb: ~1.0GB
22 # - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
23 # - to look for new tarball, use update-source.sh script
25 %define svndate 20110123
29 Summary: A WebKit powered web browser
30 Name: chromium-browser
32 Release: 0.%{svnver}.%{rel}
33 License: BSD, LGPL v2+ (ffmpeg)
34 Group: X11/Applications/Networking
35 Source0: http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz
36 # Source0-md5: 3c7c17645ac1d573b81487fd90aa9208
38 Source3: %{name}.desktop
40 Source5: update-source.sh
41 Patch0: system-libs.patch
42 Patch1: plugin-searchdirs.patch
43 Patch2: gyp-system-minizip.patch
44 Patch3: disable_dlog_and_dcheck_in_release_builds.patch.diff
45 # http://aur.archlinux.org/packages/chromium-browser-svn/chromium-browser-svn/search-workaround.patch
46 Patch4: search-workaround.patch
47 Patch5: options-support.patch
48 Patch6: get-webkit_revision.patch
49 Patch7: chromium-system-vpx.patch
50 URL: http://code.google.com/chromium/
51 BuildRequires: GConf2-devel
52 BuildRequires: OpenGL-GLU-devel
53 BuildRequires: alsa-lib-devel
54 BuildRequires: atk-devel
56 BuildRequires: bzip2-devel
57 BuildRequires: cups-devel
58 BuildRequires: dbus-glib-devel
60 BuildRequires: fontconfig-devel
61 BuildRequires: glib2-devel
63 BuildRequires: gtk+2-devel
64 BuildRequires: libevent-devel
65 BuildRequires: libgnome-keyring-devel
66 BuildRequires: libjpeg-devel
67 BuildRequires: libpng-devel
68 %{?with_selinux:BuildRequires: libselinux-devel}
69 BuildRequires: libstdc++-devel
70 BuildRequires: libvpx-devel >= 0.9.5-2
71 BuildRequires: libxml2-devel
72 BuildRequires: libxslt-devel
74 BuildRequires: minizip-devel
75 BuildRequires: nspr-devel
76 BuildRequires: nss-devel >= 1:3.12.3
77 BuildRequires: pango-devel
78 BuildRequires: perl-modules
79 BuildRequires: pkgconfig
81 # grep gyp.googlecode.com src/DEPS | cut -d'"' -f2 | cut -d@ -f2
82 BuildRequires: python-gyp >= 1-840
83 BuildRequires: python-modules
84 BuildRequires: rpmbuild(macros) >= 1.453
85 BuildRequires: sqlite3-devel >= 3.6.1
86 BuildRequires: util-linux
87 %{?with_system_v8:BuildRequires: v8-devel}
89 BuildRequires: xorg-lib-libXScrnSaver-devel
90 BuildRequires: xorg-lib-libXt-devel
91 BuildRequires: xorg-lib-libXtst-devel
93 %{?with_system_zlib:BuildRequires: zlib-devel}
94 Requires: browser-plugins >= 2.0
95 Requires: libvpx >= 0.9.5-2
96 Requires: xdg-utils >= 1.0.2-4
98 Obsoletes: chromium-browser-bookmark_manager
99 ExclusiveArch: %{ix86} %{x8664} arm
100 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
102 %define find_lang sh find-lang.sh %{buildroot}
104 %if %{without debuginfo}
105 %define _enable_debug_packages 0
109 Chromium is an open-source browser project that aims to build a safer,
110 faster, and more stable way for all Internet users to experience the
113 Chromium serves as a base for Google Chrome, which is Chromium
114 rebranded (name and logo) with very few additions such as usage
115 tracking and an auto-updater system.
117 This package contains the Chromium browser.
120 Summary: Page inspector for the chromium-browser
121 Group: Development/Tools
122 Requires: %{name} = %{version}-%{release}
124 %description inspector
125 Chromium is an open-source browser project that aims to build a safer,
126 faster, and more stable way for all Internet users to experience the
129 This package contains 'inspector', allowing web developpers to inspect
130 any element of a web page at runtime (html, javascript, css, ..)
133 Summary: chromium-browser language packages
135 Requires: %{name} = %{version}-%{release}
138 Chromium is an open-source browser project that aims to build a safer,
139 faster, and more stable way for all Internet users to experience the
142 This package contains language packages for 50 languages:
144 ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr,
145 gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or,
146 pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi,
150 %setup -q -n %{name}-%{version}~svn%{svndate}r%{svnver}
151 lzma -dc %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | tar x
152 rm -f %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma
154 # Google's versioning is interesting. They never reset "BUILD", which is how we jumped
155 # from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
156 . ./src/chrome/VERSION
157 ver=$MAJOR.$MINOR.$BUILD.$PATCH
158 if [ "$ver" != %{version} ]; then
162 # Populate the LASTCHANGE file template as we no longer have the VCS files at this point
163 echo "%{svnver}" > src/build/LASTCHANGE.in
165 %{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
178 # drop bundled libs, from gentoo
179 remove_bundled_lib() {
180 echo "Removing bundled library $1 ..."
182 out=$(find $1 -mindepth 1 ! -iname '*.gyp' -print -delete)
183 if [ -z "$out" ]; then
184 echo >&2 "No files matched when removing bundled library $1"
190 remove_bundled_lib "third_party/bzip2"
191 remove_bundled_lib "third_party/libevent"
192 remove_bundled_lib "third_party/libjpeg"
193 remove_bundled_lib "third_party/libpng"
194 remove_bundled_lib "third_party/libvpx"
195 remove_bundled_lib "third_party/libxml"
196 remove_bundled_lib "third_party/libxslt"
197 remove_bundled_lib "third_party/zlib"
201 %{__python} build/gyp_chromium --format=make build/all.gyp \
208 %if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0"
209 -Dno_strict_aliasing=1 -Dgcc_version=44 \
211 %if %{with sandboxing}
212 -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
213 -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
215 %{!?debug:-Dwerror=} \
216 %{!?debuginfo:-Dfastbuild=1} \
217 %{?with_shared_libs:-Dlibrary=shared_library} \
218 -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \
219 -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \
220 -Duse_system_bzip2=1 \
221 -Duse_system_libevent=1 \
222 -Duse_system_libjpeg=1 \
223 -Duse_system_libpng=1 \
224 -Duse_system_libxml=1 \
225 -Duse_system_libxslt=1 \
226 -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \
227 -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \
229 -Duse_system_yasm=1 \
230 -Dffmpeg_branding=Chrome \
231 -Dproprietary_codecs=1 \
232 %{!?with_sse2:-Ddisable_sse2=1} \
237 %{__make} chrome %{?with_sandboxing:chrome_sandbox} \
238 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
239 %{?with_verbose:V=1} \
243 CXX.host="%{__cxx}" \
244 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
245 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}"
248 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
251 cd src/out/%{!?debug:Release}%{?debug:Debug}
253 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
254 %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
255 cp -a *.pak locales resources $RPM_BUILD_ROOT%{_libdir}/%{name}
256 cp -a chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
257 cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
258 install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
259 install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
260 %if %{with ffmpegsumo}
261 install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
263 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
266 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
267 # http://code.google.com/p/chromium/issues/detail?id=24507
268 gecko-mediaplayer*.so
272 %find_lang %{name}.lang
273 %{__sed} -i -e '/en-US.pak/d' %{name}.lang
276 rm -rf $RPM_BUILD_ROOT
279 %update_browser_plugins
282 if [ "$1" = 0 ]; then
283 %update_browser_plugins
286 %files -f %{name}.lang
287 %defattr(644,root,root,755)
288 %{_browserpluginsconfdir}/browsers.d/%{name}.*
289 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
290 %attr(755,root,root) %{_bindir}/%{name}
291 %{_mandir}/man1/%{name}.1*
292 %{_pixmapsdir}/%{name}.png
293 %{_desktopdir}/*.desktop
294 %dir %{_libdir}/%{name}
295 %{_libdir}/%{name}/chrome.pak
296 %{_libdir}/%{name}/resources.pak
297 %dir %{_libdir}/%{name}/locales
298 %{_libdir}/%{name}/locales/en-US.pak
299 %dir %{_libdir}/%{name}/resources
300 %dir %{_libdir}/%{name}/themes
301 %dir %{_libdir}/%{name}/extensions
302 %dir %{_libdir}/%{name}/plugins
303 %attr(755,root,root) %{_libdir}/%{name}/%{name}
304 # These unique permissions are intentional and necessary for the sandboxing
305 %attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
308 %if %{with ffmpegsumo}
309 %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
313 %defattr(644,root,root,755)
314 %{_libdir}/%{name}/resources/inspector
316 %files l10n -f %{name}.lang
317 %defattr(644,root,root,755)