]> git.pld-linux.org Git - packages/chromium-browser.git/blame - chromium-browser.spec
- inform chromium about wrapper used
[packages/chromium-browser.git] / chromium-browser.spec
CommitLineData
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
a3140cd1 10%bcond_with 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
15%bcond_with system_sqlite # with system sqlite
32a2443e 16%bcond_without system_flac # with system flac
e8e15592 17%bcond_without system_libwebp # with system libwebp
32a2443e 18%bcond_without system_speex # with system speex
c14cd342 19%bcond_with system_v8 # with system v8
32a2443e 20%bcond_without system_vpx # with system vpx
d617ab39 21%bcond_without system_yasm # with system yasm
2108baf2
ER
22%bcond_without system_zlib # with system zlib
23%bcond_with verbose # verbose build (V=1)
0c480b89 24
6d92f81c 25# TODO
f1b276d4 26# - check system sqlite linking problems
2108baf2 27# - find system deps: find -name '*.gyp*' | xargs grep 'use_system.*=='
a3140cd1 28# - use_system_ssl (use_openssl: http://crbug.com/62803)
32a2443e 29# - use_system_ffmpeg && build_ffmpegsumo
d617ab39 30# - use_system_hunspell
32a2443e 31# - use_system_stlport
a3140cd1
ER
32# - other defaults: src/build/common.gypi
33
e53ecfb5 34# NOTES:
4fe038cb
ER
35# - mute BEEP mixer if you do not want to hear horrible system bell when
36# pressing home/end in url bar or more ^F search results on page.
2108baf2
ER
37# - build -bp: 1.2G
38# - build i686: -bc: 2.7G; -bb: ~1.0GB
e8e15592 39# - build x86_64: ~1.9G
f1b276d4 40# - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
84fa20a9 41# - to look for new tarball, use update-source.sh script
f1b276d4 42
e68aa7e7 43# NOTE TO USERS:
a3cc7091
ER
44# To use chromium nightly builds for pld-th save to /etc/poldek/repos.d (as chromium-nightly.conf):
45# http://carme.pld-linux.org/~glen/chromium-browser/th/i686/chromium-nightly.conf
e68aa7e7 46# or:
a3cc7091 47# http://carme.pld-linux.org/~glen/chromium-browser/th/x86_64/chromium-nightly.conf
e68aa7e7 48
a3140cd1 49%define gyp_rev 1014
11ad81c4 50Summary: A WebKit powered web browser
05f72ae2 51Name: chromium-browser
2752f230 52Version: 17.0.963.33
836b1cac 53Release: 1
05f72ae2 54License: BSD, LGPL v2+ (ffmpeg)
e53ecfb5 55Group: X11/Applications/Networking
836b1cac 56Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/beta/%{name}-%{version}.tar.xz
2752f230 57# Source0-md5: e402820a7d57a5f39a8b2428996a5bd0
5e25f560 58#SourceX: http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz
8b53130d
ER
59Source2: %{name}.sh
60Source3: %{name}.desktop
56c6e811
ER
61Source5: find-lang.sh
62Source6: update-source.sh
63Source7: clean-source.sh
836b1cac 64Source8: get-source.sh
48b341f5 65Patch0: system-libs.patch
66Patch1: plugin-searchdirs.patch
67Patch2: gyp-system-minizip.patch
7abc645c 68Patch3: disable_dlog_and_dcheck_in_release_builds.patch
48b341f5 69Patch5: options-support.patch
0e5636cb 70Patch6: get-webkit_revision.patch
5aa5df39 71Patch7: dlopen_sonamed_gl.patch
4765ddf1 72Patch8: chromium_useragent.patch.in
77f32fa3 73Patch9: system-expat.patch
bdbf9a94 74Patch10: dlopen-sonames.patch
750b48f7 75URL: http://www.chromium.org/Home
ae3fe89f 76%{?with_gconf:BuildRequires: GConf2-devel}
f1b276d4 77BuildRequires: OpenGL-GLU-devel
05f72ae2
ER
78BuildRequires: alsa-lib-devel
79BuildRequires: atk-devel
80BuildRequires: bison
11ad81c4 81BuildRequires: bzip2-devel
ae3fe89f 82%{?with_cups:BuildRequires: cups-devel}
2bc5cf47 83BuildRequires: dbus-glib-devel
77f32fa3 84BuildRequires: expat-devel
d617ab39 85%{?with_system_flac:BuildRequires: flac-devel}
11ad81c4 86BuildRequires: flex
11ad81c4 87BuildRequires: fontconfig-devel
f1b276d4 88BuildRequires: glib2-devel
05f72ae2 89BuildRequires: gperf
8b53130d 90BuildRequires: gtk+2-devel
a3140cd1 91%{?with_kerberos:BuildRequires: heimdal-devel}
05f72ae2 92BuildRequires: libevent-devel
7f40f3f4 93%{?with_keyring:BuildRequires: libgnome-keyring-devel}
0b214002 94BuildRequires: libicu-devel >= 4.6
05f72ae2
ER
95BuildRequires: libjpeg-devel
96BuildRequires: libpng-devel
e266589e 97%{?with_selinux:BuildRequires: libselinux-devel}
05f72ae2 98BuildRequires: libstdc++-devel
32a2443e 99%{?with_system_vpx:BuildRequires: libvpx-devel >= 0.9.5-2}
e8e15592 100%{?with_system_libwebp:BuildRequires: libwebp-devel}
f1b276d4 101BuildRequires: libxml2-devel
11ad81c4 102BuildRequires: libxslt-devel
f1b276d4 103BuildRequires: lzma
11ad81c4 104BuildRequires: minizip-devel
164020eb 105%{?with_nacl:BuildRequires: nacl-toolchain-newlib >= 0.6941}
05f72ae2 106BuildRequires: nspr-devel
f1b276d4 107BuildRequires: nss-devel >= 1:3.12.3
35902862 108BuildRequires: pam-devel
f1b276d4 109BuildRequires: pango-devel
48b341f5 110BuildRequires: perl-modules
111BuildRequires: pkgconfig
ae3fe89f 112%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
f1b276d4 113BuildRequires: python
46cdefee 114#BuildRequires: python-gyp >= 1-%{gyp_rev}
48b341f5 115BuildRequires: python-modules
0cad051b 116BuildRequires: rpm >= 4.4.9-56
f1b276d4 117BuildRequires: rpmbuild(macros) >= 1.453
0cad051b 118%{?with_system_speex:BuildRequires: speex-devel >= 1:1.2-rc1}
f1b276d4 119BuildRequires: sqlite3-devel >= 3.6.1
0cad051b 120BuildRequires: tar >= 1:1.22
2303ed45 121BuildRequires: util-linux
c14cd342 122%{?with_system_v8:BuildRequires: v8-devel >= 3.7}
0826c245 123BuildRequires: which
f1b276d4 124BuildRequires: xorg-lib-libXScrnSaver-devel
2bc5cf47
KK
125BuildRequires: xorg-lib-libXt-devel
126BuildRequires: xorg-lib-libXtst-devel
836b1cac 127BuildRequires: xz
a3140cd1 128%{?with_system_yasm:BuildRequires: yasm}
f1b276d4 129%{?with_system_zlib:BuildRequires: zlib-devel}
e53ecfb5 130Requires: browser-plugins >= 2.0
0cad051b 131Requires: desktop-file-utils
32a2443e 132%{?with_system_vpx:Requires: libvpx >= 0.9.5-2}
4dc49133 133Requires: xdg-utils >= 1.0.2-4
e53ecfb5 134Provides: wwwbrowser
c3582150 135Obsoletes: chromium-browser-bookmark_manager < 5.0.388.0
a3140cd1 136Obsoletes: chromium-browser-inspector < 15.0.863.0
2351db3b 137ExclusiveArch: %{ix86} %{x8664} arm
11ad81c4 138BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
11ad81c4 139
589d90ea 140%define find_lang sh find-lang.sh %{buildroot}
e7fa0817
ER
141# Usage: gyp_with BCOND_NAME [OPTION_NAME]
142%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 143
6b113615
ER
144%if %{without debuginfo}
145%define _enable_debug_packages 0
146%endif
147
11ad81c4 148%description
80838854
ER
149Chromium is an open-source browser project that aims to build a safer,
150faster, and more stable way for all Internet users to experience the
151web.
152
153Chromium serves as a base for Google Chrome, which is Chromium
154rebranded (name and logo) with very few additions such as usage
155tracking and an auto-updater system.
156
f1b276d4
ER
157%package l10n
158Summary: chromium-browser language packages
159Group: I18n
160Requires: %{name} = %{version}-%{release}
161
162%description l10n
163Chromium is an open-source browser project that aims to build a safer,
164faster, and more stable way for all Internet users to experience the
165web.
166
167This package contains language packages for 50 languages:
168
e7fa0817
ER
169ar, bg, bn, ca, cs, da, de, el, en-GB, es-LA, es, et, fi, fil, fr, gu,
170he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or, pl,
171pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi, zh-CN,
172zh-TW
f1b276d4
ER
173
174%prep
836b1cac 175%setup -q
589d90ea 176
05f72ae2
ER
177# Google's versioning is interesting. They never reset "BUILD", which is how we jumped
178# from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
0c480b89
ER
179. ./src/chrome/VERSION
180ver=$MAJOR.$MINOR.$BUILD.$PATCH
a3140cd1
ER
181test "$ver" = %{version}
182
183gyp_rev=$(grep googlecode_url.*gyp src/DEPS | cut -d'"' -f6 | cut -d@ -f2)
2d2c8139 184test "$gyp_rev" = %{gyp_rev} || :
05f72ae2 185
836b1cac 186v8_ver=$(awk 'NR=1 {print $NF; exit}' src/v8/ChangeLog || :)
33b04c7d 187
f1b276d4 188# Populate the LASTCHANGE file template as we no longer have the VCS files at this point
836b1cac 189#echo "%{svnver}" > src/build/LASTCHANGE.in
f1b276d4 190
4765ddf1
ER
191# add chromium and pld to useragent
192%define pld_version %(echo %{pld_release} | sed -e 'y/[at]/[AT]/')
193sed -e 's/@BUILD_DIST@/PLD %{pld_version}/g' \
194 -e 's/@BUILD_DIST_NAME@/PLD/g' \
195 -e 's/@BUILD_DIST_VERSION@/%{pld_version}/g' \
74a58b60 196 < %{PATCH8} | %{__patch} -p1
4765ddf1 197
56c6e811
ER
198%{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE5} > find-lang.sh
199ln -s %{SOURCE7} src
f1b276d4 200
05f72ae2
ER
201%patch0 -p1
202%patch1 -p1
203%patch2 -p1
7abc645c 204%patch3 -p1
05f72ae2 205%patch5 -p1
0e5636cb 206%patch6 -p1
5aa5df39 207%patch7 -p1
77f32fa3
ER
208cd src
209%patch9 -p1
210cd ..
bdbf9a94 211%patch10 -p1
0c480b89 212
828bdd1a 213cd src
cd09b941 214sh -x clean-source.sh %{!?with_system_v8:v8=0} %{!?with_nacl:nacl=0}
164020eb 215
e266589e 216%build
f1b276d4 217cd src
164020eb 218test -e Makefile || %{__python} build/gyp_chromium --format=make build/all.gyp \
f1b276d4
ER
219%ifarch %{ix86}
220 -Dtarget_arch=ia32 \
221%endif
222%ifarch %{x8664}
0c480b89
ER
223 -Dtarget_arch=x64 \
224%endif
7b454a31
AM
225%if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0"
226 -Dno_strict_aliasing=1 -Dgcc_version=44 \
f1b276d4
ER
227%endif
228%if %{with sandboxing}
229 -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
230 -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
231%endif
232 %{!?debug:-Dwerror=} \
c980b122 233 %{!?debuginfo:-Dfastbuild=1 -Dremove_webcore_debug_symbols=1} \
f1b276d4 234 %{?with_shared_libs:-Dlibrary=shared_library} \
37b05e5e 235 -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \
a3140cd1
ER
236 -Dffmpeg_branding=Chrome \
237 -Dproprietary_codecs=1 \
5a6de706 238 %{!?with_nacl:-Ddisable_nacl=1} \
a3140cd1
ER
239 %{!?with_sse2:-Ddisable_sse2=1} \
240 %{?with_selinux:-Dselinux=1} \
e7fa0817
ER
241 %{gyp_with cups} \
242 %{gyp_with flac} \
243 %{gyp_with gconf} \
244 %{gyp_with kerberos} -Dlinux_link_kerberos=0 \
245 %{gyp_with keyring gnome_keyring} -Dlinux_link_gnome_keyring=0 \
246 %{gyp_with pulseaudio} \
e8e15592 247 %{gyp_with system_libwebp} \
e7fa0817
ER
248 %{gyp_with system_speex} \
249 %{gyp_with system_sqlite} \
250 %{gyp_with system_v8} \
32a2443e 251 %{gyp_with system_vpx} \
e7fa0817
ER
252 %{gyp_with system_yasm} \
253 %{gyp_with system_zlib} \
0c480b89 254 -Duse_system_bzip2=1 \
0b214002 255 -Duse_system_icu=1 \
f1b276d4 256 -Duse_system_libevent=1 \
0c480b89 257 -Duse_system_libjpeg=1 \
f1b276d4
ER
258 -Duse_system_libpng=1 \
259 -Duse_system_libxml=1 \
260 -Duse_system_libxslt=1 \
7f40f3f4 261 -Duse_system_xdg_utils=1 \
11ad81c4 262
f1b276d4
ER
263%{__make} chrome %{?with_sandboxing:chrome_sandbox} \
264 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
265 %{?with_verbose:V=1} \
266 CC="%{__cc}" \
267 CXX="%{__cxx}" \
b7adf6b1 268 LDFLAGS="%{rpmldflags} -fuse-ld=gold" \
f1b276d4
ER
269 CC.host="%{__cc}" \
270 CXX.host="%{__cxx}" \
b7adf6b1 271 LDFLAGS.host="%{rpmldflags}" \
7b454a31
AM
272 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
273 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}"
11ad81c4
AM
274
275%install
276rm -rf $RPM_BUILD_ROOT
56c6e811 277install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/{themes,plugins,extensions} \
7be10938 278 $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
e266589e 279
f1b276d4 280cd src/out/%{!?debug:Release}%{?debug:Debug}
f1b276d4
ER
281install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
282%{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
97fac491 283cp -a *.pak locales resources $RPM_BUILD_ROOT%{_libdir}/%{name}
7f40f3f4 284cp -p chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
f1b276d4 285install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
e53ecfb5 286install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
d561483d 287%if %{with ffmpegsumo}
f1b276d4 288install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
dd46de65 289%endif
e7fa0817 290cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
164020eb
ER
291
292%if %{with nacl}
293# Install Native Client files on platforms that support it.
294install -p nacl_helper{,_bootstrap} $RPM_BUILD_ROOT%{_libdir}/%{name}
295install -p libppGoogleNaClPluginChrome.so $RPM_BUILD_ROOT%{_libdir}/%{name}
296%ifarch %{x8664}
297install -p nacl_irt_x86_64.nexe $RPM_BUILD_ROOT%{_libdir}/%{name}
298%endif
299%ifarch %{ix86}
300install -p nacl_irt_x86_32.nexe $RPM_BUILD_ROOT%{_libdir}/%{name}
301%endif
302%endif
303
0c480b89
ER
304cd -
305
7f40f3f4
ER
306cp -p src/chrome/app/theme/chromium/product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
307
13840bc2
AM
308%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
309# http://code.google.com/p/chromium/issues/detail?id=24507
310gecko-mediaplayer*.so
311EOF
11ad81c4 312
589d90ea
ER
313# find locales
314%find_lang %{name}.lang
e7fa0817 315# always package en-US
f1b276d4 316%{__sed} -i -e '/en-US.pak/d' %{name}.lang
589d90ea 317
11ad81c4
AM
318%clean
319rm -rf $RPM_BUILD_ROOT
320
f1b276d4 321%post
b7a6e4ee 322%update_desktop_database
f1b276d4
ER
323%update_browser_plugins
324
325%postun
326if [ "$1" = 0 ]; then
327 %update_browser_plugins
328fi
329
589d90ea 330%files -f %{name}.lang
11ad81c4 331%defattr(644,root,root,755)
f1b276d4
ER
332%{_browserpluginsconfdir}/browsers.d/%{name}.*
333%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
334%attr(755,root,root) %{_bindir}/%{name}
335%{_mandir}/man1/%{name}.1*
336%{_pixmapsdir}/%{name}.png
11ad81c4 337%{_desktopdir}/*.desktop
0c480b89
ER
338%dir %{_libdir}/%{name}
339%{_libdir}/%{name}/chrome.pak
c14cd342 340%{_libdir}/%{name}/content_resources.pak
97fac491 341%{_libdir}/%{name}/resources.pak
589d90ea 342%dir %{_libdir}/%{name}/locales
f1b276d4
ER
343%{_libdir}/%{name}/locales/en-US.pak
344%dir %{_libdir}/%{name}/resources
a3140cd1 345%{_libdir}/%{name}/resources/inspector
f1b276d4
ER
346%dir %{_libdir}/%{name}/themes
347%dir %{_libdir}/%{name}/extensions
348%dir %{_libdir}/%{name}/plugins
349%attr(755,root,root) %{_libdir}/%{name}/%{name}
0c480b89 350# These unique permissions are intentional and necessary for the sandboxing
e53ecfb5 351%attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
f1b276d4
ER
352
353# ffmpeg libs
d561483d 354%if %{with ffmpegsumo}
f1b276d4 355%attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
dd46de65 356%endif
f1b276d4 357
164020eb
ER
358%if %{with nacl}
359%attr(755,root,root) %{_libdir}/%{name}/libppGoogleNaClPluginChrome.so
360%attr(755,root,root) %{_libdir}/%{name}/nacl_helper
361%attr(755,root,root) %{_libdir}/%{name}/nacl_helper_bootstrap
362%attr(755,root,root) %{_libdir}/%{name}/nacl_irt_x86_*.nexe
363%endif
364
f1b276d4
ER
365%files l10n -f %{name}.lang
366%defattr(644,root,root,755)
This page took 0.129689 seconds and 4 git commands to generate.