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