3 %bcond_with verbose # verbose build (V=1)
4 %bcond_with selinux # with SELinux (need policy first)
5 %bcond_with system_v8 # with system v8
6 %bcond_without system_zlib # with system zlib
7 %bcond_with system_sqlite # with system sqlite
8 %bcond_without ffmpegsumo # build with ffmpegsumo
9 %bcond_without sandboxing # with sandboxing
10 %bcond_with shared_libs # with shared libs
11 %bcond_without debuginfo # disable debuginfo creation (it is huge)
14 # - check system sqlite linking problems
17 # - mute BEEP mixer if you do not want to hear horrible system bell when
18 # pressing home/end in url bar or more ^F search results on page.
19 # - build i686: -bp: ~570MB; bc: ~928MB; -bb: ~1.0GB
20 # - build x86_64: -bp: ~570MB; bc: ~990MB; -bb: ~1.0GB
21 # - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
22 # - to look for new tarball, use update-source.sh script
24 %define svndate 20100529
28 Summary: A WebKit powered web browser
29 Name: chromium-browser
31 Release: %{svnver}.%{rel}
32 License: BSD, LGPL v2+ (ffmpeg)
33 Group: X11/Applications/Networking
34 Source0: http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz
35 # Source0-md5: 2cdccd5693ba1f1efc79042e90c179fd
37 Source3: %{name}.desktop
39 Source5: update-source.sh
40 Patch0: system-libs.patch
41 Patch1: plugin-searchdirs.patch
42 Patch2: gyp-system-minizip.patch
43 Patch5: options-support.patch
44 Patch11: memory_details-iceweasel.patch
45 URL: http://code.google.com/chromium/
46 BuildRequires: GConf2-devel
47 BuildRequires: OpenGL-GLU-devel
48 BuildRequires: alsa-lib-devel
49 BuildRequires: atk-devel
51 BuildRequires: bzip2-devel
52 BuildRequires: cups-devel
53 BuildRequires: dbus-devel
55 BuildRequires: fontconfig-devel
56 BuildRequires: glib2-devel
58 BuildRequires: gtk+2-devel
59 BuildRequires: libevent-devel
60 BuildRequires: libjpeg-devel
61 BuildRequires: libpng-devel
62 %{?with_selinux:BuildRequires: libselinux-devel}
63 BuildRequires: libstdc++-devel
64 BuildRequires: libvpx-devel
65 BuildRequires: libxml2-devel
66 BuildRequires: libxslt-devel
68 BuildRequires: minizip-devel
69 BuildRequires: nspr-devel
70 BuildRequires: nss-devel >= 1:3.12.3
71 BuildRequires: pango-devel
72 BuildRequires: perl-modules
73 BuildRequires: pkgconfig
75 # grep gyp.googlecode.com src/DEPS | cut -d'"' -f2 | cut -d@ -f2
76 BuildRequires: python-gyp >= 0.1-795
77 BuildRequires: python-modules
78 BuildRequires: rpmbuild(macros) >= 1.453
79 BuildRequires: sqlite3-devel >= 3.6.1
80 %{?with_system_v8:BuildRequires: v8-devel}
82 BuildRequires: xorg-lib-libXScrnSaver-devel
84 %{?with_system_zlib:BuildRequires: zlib-devel}
85 Requires: browser-plugins >= 2.0
88 Obsoletes: chromium-browser-bookmark_manager
89 ExclusiveArch: %{ix86} %{x8664} arm
90 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92 %define find_lang sh find-lang.sh %{buildroot}
94 %if %{without debuginfo}
95 %define _enable_debug_packages 0
99 Chromium is an open-source browser project that aims to build a safer,
100 faster, and more stable way for all Internet users to experience the
103 Chromium serves as a base for Google Chrome, which is Chromium
104 rebranded (name and logo) with very few additions such as usage
105 tracking and an auto-updater system.
107 This package contains the Chromium browser.
110 Summary: Page inspector for the chromium-browser
111 Group: Development/Tools
112 Requires: %{name} = %{version}-%{release}
114 %description inspector
115 Chromium is an open-source browser project that aims to build a safer,
116 faster, and more stable way for all Internet users to experience the
119 This package contains 'inspector', allowing web developpers to inspect
120 any element of a web page at runtime (html, javascript, css, ..)
123 Summary: chromium-browser language packages
125 Requires: %{name} = %{version}-%{release}
128 Chromium is an open-source browser project that aims to build a safer,
129 faster, and more stable way for all Internet users to experience the
132 This package contains language packages for 50 languages:
134 ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr,
135 gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or,
136 pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi,
140 %setup -q -n %{name}-%{version}~svn%{svndate}r%{svnver}
141 lzma -dc %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | tar x
142 rm -f %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma
144 # Google's versioning is interesting. They never reset "BUILD", which is how we jumped
145 # from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
146 . ./src/chrome/VERSION
147 ver=$MAJOR.$MINOR.$BUILD.$PATCH
148 if [ "$ver" != %{version} ]; then
152 # Populate the LASTCHANGE file template as we no longer have the VCS files at this point
153 echo "%{svnver}" > src/build/LASTCHANGE.in
155 sed -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
165 %{__python} build/gyp_chromium --format=make build/all.gyp \
172 %if "%{cc_version}" >= "4.4.0"
173 -Dno_strict_aliasing=1 -Dgcc_version=$(echo %{cc_version} | cut -d. -f1-2 | tr -d .) \
175 %if %{with sandboxing}
176 -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
177 -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
179 %{!?debug:-Dwerror=} \
180 %{?with_shared_libs:-Dlibrary=shared_library} \
181 -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \
182 -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \
183 -Duse_system_bzip2=1 \
184 -Duse_system_libevent=1 \
185 -Duse_system_libjpeg=1 \
186 -Duse_system_libpng=1 \
187 -Duse_system_libxml=1 \
188 -Duse_system_libxslt=1 \
189 -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \
190 -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \
192 -Duse_system_yasm=1 \
193 -Dffmpeg_branding=Chrome \
194 -Dproprietary_codecs=1 \
199 %{__make} chrome %{?with_sandboxing:chrome_sandbox} \
200 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
201 %{?with_verbose:V=1} \
205 CXX.host="%{__cxx}" \
206 CFLAGS="%{rpmcflags}" \
207 CXXFLAGS="%{rpmcxxflags}"
210 rm -rf $RPM_BUILD_ROOT
211 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
213 cd src/out/%{!?debug:Release}%{?debug:Debug}
215 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
216 %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
217 cp -a chrome.pak $RPM_BUILD_ROOT%{_libdir}/%{name}
218 cp -a locales/*.pak $RPM_BUILD_ROOT%{_libdir}/%{name}/locales
219 cp -a resources/* $RPM_BUILD_ROOT%{_libdir}/%{name}/resources
220 cp -a chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
221 cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
222 install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
223 install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
224 install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
225 install -p xdg-settings $RPM_BUILD_ROOT%{_libdir}/%{name}
226 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
229 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
230 # http://code.google.com/p/chromium/issues/detail?id=24507
231 gecko-mediaplayer*.so
235 %find_lang %{name}.lang
236 %{__sed} -i -e '/en-US.pak/d' %{name}.lang
239 rm -rf $RPM_BUILD_ROOT
242 %update_browser_plugins
245 if [ "$1" = 0 ]; then
246 %update_browser_plugins
249 %files -f %{name}.lang
250 %defattr(644,root,root,755)
251 %{_browserpluginsconfdir}/browsers.d/%{name}.*
252 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
253 %attr(755,root,root) %{_bindir}/%{name}
254 %{_mandir}/man1/%{name}.1*
255 %{_pixmapsdir}/%{name}.png
256 %{_desktopdir}/*.desktop
257 %dir %{_libdir}/%{name}
258 %{_libdir}/%{name}/chrome.pak
259 %dir %{_libdir}/%{name}/locales
260 %{_libdir}/%{name}/locales/en-US.pak
261 %dir %{_libdir}/%{name}/resources
262 %dir %{_libdir}/%{name}/themes
263 %dir %{_libdir}/%{name}/extensions
264 %dir %{_libdir}/%{name}/plugins
265 %attr(755,root,root) %{_libdir}/%{name}/%{name}
266 # These unique permissions are intentional and necessary for the sandboxing
267 %attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
270 %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
272 # bundle this copy until xdg-utils will have this itself
273 %attr(755,root,root) %{_libdir}/%{name}/xdg-settings
275 %{_libdir}/%{name}/resources/bookmark_manager
276 %{_libdir}/%{name}/resources/calendar_app
277 %{_libdir}/%{name}/resources/docs_app
278 %{_libdir}/%{name}/resources/gmail_app
279 %{_libdir}/%{name}/resources/net_internals
280 %{_libdir}/%{name}/resources/shared
283 %defattr(644,root,root,755)
284 %{_libdir}/%{name}/resources/inspector
286 %files l10n -f %{name}.lang
287 %defattr(644,root,root,755)