%bcond_without keyring # with keyring support (gnome-keyring dlopened, kwalletd via dbus)
%bcond_with gps # with gps support (linked), if enabled must use exactly same gpsd as shm structures may change leading to unexpected results (crash)
%bcond_without libjpegturbo # use libjpeg-turbo features
-%bcond_without nacl # build Native Client support
+%bcond_with nacl # build Native Client support, disabled: http://crbug.com/269560
%bcond_without pulseaudio # with pulseaudio
%bcond_without sandboxing # with sandboxing
%bcond_with selinux # with SELinux (need policy first)
%bcond_without system_jsoncpp # system jsoncpp
%bcond_without system_libexif # system libexif
%bcond_without system_libmtp # system libmtp
-%bcond_without system_libusb # system libusb-1
-%bcond_without system_libwebp # system libwebp
+%bcond_with system_libusb # system libusb-1, disabled: http://crbug.com/266149
+%bcond_with system_libwebp # system libwebp, disabled: http://crbug.com/288019
%bcond_without system_libxnvctrl # system libxnvctrl
-%bcond_without system_mesa # system Mesa
+%bcond_with system_mesa # system Mesa
%bcond_without system_minizip # system minizip
%bcond_without system_opus # system opus codec support, http://www.opus-codec.org/examples/
%bcond_without system_protobuf # system protobuf
%bcond_without system_re2 # system re2
+%bcond_without system_snappy # system snappy
%bcond_without system_speex # system speex
-%bcond_without system_sqlite # system sqlite WebSQL (http://www.w3.org/TR/webdatabase/) will not work
+%bcond_with system_sqlite # system sqlite WebSQL (http://www.w3.org/TR/webdatabase/) will not work
%bcond_without system_libsrtp # system srtp (can be used if using bundled libjingle)
%bcond_with system_v8 # system v8
%bcond_without system_libvpx # system libvpx
# - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
# - to look for new tarball, use update-source.sh script
-# NOTE TO USERS:
-# To use chromium nightly beta builds for pld-th save to /etc/poldek/repos.d (as chromium-nightly.conf):
-# http://carme.pld-linux.org/~glen/chromium-browser/th/x86_64/chromium-nightly.conf
-# http://carme.pld-linux.org/~glen/chromium-browser/th/i686/chromium-nightly.conf
-
-%define branch 27.0.1453
-%define basever 6
-#define patchver 70
+%define branch 32.0.1700
+%define basever 77
+#define patchver 63
%define gyp_rev 1014
Summary: A WebKit powered web browser
Name: chromium-browser
%else
Version: %{branch}.%{basever}
%endif
-Release: 0.4
-License: BSD, LGPL v2+ (ffmpeg)
+Release: 0.2
+License: BSD%{!?with_system_ffmpeg:, LGPL v2+ (ffmpeg)}
Group: X11/Applications/Networking
-Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/dev/%{name}-%{branch}.%{basever}.tar.gz
-# Source0-md5: eafd6a919faadc8a7446cd673f460c4c
+Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{branch}.%{basever}.tar.xz
+# Source0-md5: 80f2651040917887c8a7b42010c2ba6c
%if "%{?patchver}" != ""
Patch0: http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{version}.patch.xz
-# Patch0-md5: 7e2f26d76ca6241961276a328a9230cf
+# Patch0-md5: f17f75a65414167cf822c6aaf409a537
%endif
Source1: %{name}.default
Source2: %{name}.sh
Source8: get-source.sh
Source9: master_preferences.json
Patch1: plugin-searchdirs.patch
-Patch3: disable_dlog_and_dcheck_in_release_builds.patch
Patch4: path-libpdf.patch
-Patch6: get-webkit_revision.patch
Patch7: dlopen_sonamed_gl.patch
Patch8: chromium_useragent.patch.in
Patch10: system-libxnvctrl.patch
Patch24: nacl-verbose.patch
Patch25: gnome3-volume-control.patch
Patch26: master-prefs-path.patch
-Patch27: tcmalloc-glibc2.16.patch
Patch28: system-mesa.patch
-Patch29: speechd-0.8.patch
+Patch30: system-ply.patch
+Patch31: system-jinja.patch
+Patch32: remove_bundled_libraries-stale.patch
URL: http://www.chromium.org/Home
%{?with_gconf:BuildRequires: GConf2-devel}
%{?with_system_mesa:BuildRequires: Mesa-libGL-devel >= 9.1}
-%{?with_system_mesa:BuildRequires: Mesa-libGLES-devel >= 9.1}
+BuildRequires: Mesa-libGLES-devel >= 9.1
%{?with_system_mesa:BuildRequires: Mesa-libGLU-devel}
%{?with_system_mesa:BuildRequires: Mesa-libOSMesa-devel >= 9.1}
BuildRequires: alsa-lib-devel
BuildRequires: gtest-devel
BuildRequires: gtk+2-devel
%{?with_system_harfbuzz:BuildRequires: harfbuzz-devel}
+%{?with_system_harfbuzz:BuildRequires: harfbuzz-icu-devel}
%{?with_kerberos:BuildRequires: heimdal-devel}
BuildRequires: hicolor-icon-theme
%{?with_system_jsoncpp:BuildRequires: jsoncpp-devel}
BuildRequires: pam-devel
BuildRequires: pango-devel
BuildRequires: pciutils-devel
+BuildRequires: perl-JSON
BuildRequires: perl-modules
BuildRequires: pkgconfig
%{?with_system_protobuf:BuildRequires: protobuf-devel}
%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
BuildRequires: python
#BuildRequires: python-gyp >= 1-%{gyp_rev}
+BuildRequires: python-jinja2 >= 2.7
BuildRequires: python-modules
-BuildRequires: python-ply
+BuildRequires: python-ply >= 3.4
%{?with_system_re2:BuildRequires: re2-devel >= 20130115-2}
BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpmbuild(macros) >= 1.453
+%{?with_system_snappy:BuildRequires: snappy-devel}
BuildRequires: speech-dispatcher-devel >= 0.8
%{?with_system_speex:BuildRequires: speex-devel >= 1:1.2-rc1}
-BuildRequires: sqlite3-devel >= 3.6.1
+%{?with_system_sqlite:BuildRequires: sqlite3-devel >= 3.7}
%{?with_system_libsrtp:BuildRequires: srtp-devel >= 1.4.4}
-BuildRequires: subversion
BuildRequires: tar >= 1:1.22
BuildRequires: udev-devel
BuildRequires: usbutils
%{?with_system_v8:BuildRequires: v8-devel >= 3.7}
BuildRequires: which
BuildRequires: xorg-lib-libXScrnSaver-devel
+BuildRequires: xorg-lib-libXtst-devel
BuildRequires: xz
%{?with_system_yasm:BuildRequires: yasm}
%{?with_system_zlib:BuildRequires: zlib-devel}
Requires: lsb-release
%{?with_system_re2:Requires: re2 >= 20130115-2}
Requires: shared-mime-info
+%{?with_system_sqlite:Requires: sqlite3(icu)}
Requires: xdg-utils >= 1.0.2-4
Requires: xorg-lib-libX11 >= 1.4.99.1
Provides: wwwbrowser
ExclusiveArch: %{ix86} %{x8664} arm
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define find_lang sh find-lang.sh %{buildroot}
+# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
+# Note: these are for PLD Linux use ONLY.
+# For your own distribution, please get your own set of keys.
+%define google_api_key AIzaSyD1tTgDbP-N6BGXKZ7VqSos_IU1QflGbyg
+%define google_default_client_id 724288223830.apps.googleusercontent.com
+%define google_default_client_secret rHmKOPygcI6G-clFHb-RfuHb
+
+%define find_lang sh find-lang.sh %{buildroot}
# Usage: gyp_with BCOND_NAME [OPTION_NAME]
%define gyp_with() %{expand:%%{?with_%{1}:-D%{?2:use_%{2}}%{!?2:use_%{1}}=1}%%{!?with_%{1}:-D%{?2:use_%{2}}%{!?2:use_%{1}}=0}}
Summary: chromium-browser language packages
Group: I18n
Requires: %{name} = %{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description l10n
Chromium is an open-source browser project that aims to build a safer,
# Google's versioning is interesting. They never reset "BUILD", which is how we jumped
# from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
. ./chrome/VERSION
-ver=$MAJOR.$MINOR.$BUILD.$PATCH
-test "$ver" = %{version}
+chrome=$MAJOR.$MINOR.$BUILD.$PATCH
+test "$chrome" = %{version}
gyp_rev=$(grep googlecode_url.*gyp DEPS | cut -d'"' -f6 | cut -d@ -f2)
test "$gyp_rev" = %{gyp_rev} || :
-v8_ver=$(awk 'NR=1 {print $NF; exit}' v8/ChangeLog || :)
+. ./v8.sh
+v8=$MAJOR_VERSION.$MINOR_VERSION.$BUILD_NUMBER.$PATCH_LEVEL
# add chromium and pld to useragent
%define pld_version %(echo %{pld_release} | sed -e 'y/[at]/[AT]/')
sed -e 's/@BUILD_DIST@/PLD %{pld_version}/g' \
-e 's/@BUILD_DIST_NAME@/PLD/g' \
-e 's/@BUILD_DIST_VERSION@/%{pld_version}/g' \
- < %{PATCH8} | %{__patch} -p2
+ < %{PATCH8} | %{__patch} -p1
-%{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE5} > find-lang.sh
+%{__sed} -e 's,@localedir@,%{_datadir}/%{name},' %{SOURCE5} > find-lang.sh
ln -s %{SOURCE7} .
-%patch1 -p2
-%patch3 -p2
+%patch1 -p1
%patch4 -p3
-%patch6 -p2
-%patch7 -p2
-%patch10 -p2
+%patch7 -p1
+%patch10 -p1
%patch15 -p2
%{!?with_libjpegturbo:%patch11 -p0}
%patch12 -p1
%patch16 -p1
-%patch27 -p1
%patch28 -p1
%patch25 -p2
-%patch18 -p2
+%{?with_nacl:%patch18 -p1}
%patch24 -p2
%patch26 -p2
-%patch29 -p2
+%patch30 -p1
+%patch31 -p0
+%patch32 -p1
sh -x clean-source.sh \
%{!?with_nacl:nacl=0} \
%{!?with_system_mesa:mesa=0} \
%{!?with_system_protobuf:protobuf=0} \
%{!?with_system_re2:re2=0} \
+ %{!?with_system_snappy:snappy=0} \
+ %{!?with_system_sqlite:sqlite=0} \
%{!?with_system_v8:v8=0} \
+ %{!?with_system_libwebp:libwebp=0} \
%{!?with_system_zlib:zlib=0} \
%{nil}
ln -s %{_bindir}/x86_64-nacl-ranlib ranlib
ln -s %{_bindir}/x86_64-nacl-strip .
ln -s %{_bindir}/x86_64-nacl-strip strip
+ln -s %{_bindir}/x86_64-nacl-objcopy .
ln -s %{_prefix}/x86_64-nacl/lib ../lib
ln -s %{_prefix}/x86_64-nacl/lib32 ../lib32
ln -s %{_prefix}/x86_64-nacl/include ../nacl/include
fi
%endif
-test %{_specdir}/%{name}.spec -nt Makefile && %{__rm} -f Makefile
-test -e Makefile || \
- CC="%{__cc}" \
- CXX="%{__cxx}" \
- LDFLAGS="%{rpmldflags} -fuse-ld=gold" \
- CFLAGS="%{rpmcflags} %{rpmcppflags}" \
- CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
-%{__python} build/gyp_chromium \
- --format=make \
- --depth=. \
- build/all.gyp \
+flags="
%ifarch %{ix86}
-Dtarget_arch=ia32 \
+ -Dpython_arch=ia32 \
%endif
%ifarch %{x8664}
-Dtarget_arch=x64 \
+ -Dpython_arch=x64 \
%endif
+ -Dsystem_libdir=%{_lib} \
+ -Dpython_ver=2.7 \
%if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0"
-Dno_strict_aliasing=1 -Dgcc_version=44 \
-%endif
-%if %{with sandboxing}
- -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
- -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
%endif
%{!?debug:-Dwerror=} \
%{!?debuginfo:-Dfastbuild=1 -Dremove_webcore_debug_symbols=1} \
%{?with_selinux:-Dselinux=1} \
-Dusb_ids_path=$(pkg-config --variable usbids usbutils) \
-Dlinux_link_libpci=1 \
- -Dlinux_link_libspeechd=1 \
+ -Dlinux_link_libspeechd=1 -Dlibspeechd_h_prefix=speech-dispatcher/ \
%{!?with_tcmalloc:-Dlinux_use_tcmalloc=0} \
%{?with_gps:-Dlinux_use_libgps=1 -Dlinux_link_libgps=1} \
-Dlinux_use_gold_binary=0 \
-Dlinux_use_gold_flags=0 \
+ -Dlogging_like_official_build=1 \
+ -Dgoogle_api_key=%{google_api_key} \
+ -Dgoogle_default_client_id=%{google_default_client_id} \
+ -Dgoogle_default_client_secret=%{google_default_client_secret} \
%{gyp_with cups} \
%{gyp_with gconf} -Dlinux_link_gsettings=0 \
%{gyp_with kerberos} -Dlinux_link_kerberos=1 \
%{gyp_with system_opus} \
%{gyp_with system_protobuf} \
%{gyp_with system_re2} \
+ %{gyp_with system_snappy} \
%{gyp_with system_speex} \
%{gyp_with system_sqlite} %{?with_system_sqlite:-Denable_sql_database=0} \
%{gyp_with system_v8} \
-Duse_system_libxslt=1 \
-Duse_system_nspr=1 \
-Duse_system_xdg_utils=1 \
+"
+
+build/linux/unbundle/replace_gyp_files.py $flags
+
+test %{_specdir}/%{name}.spec -nt Makefile && %{__rm} -f Makefile
+test -e Makefile || \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ LDFLAGS="%{rpmldflags} -fuse-ld=gold" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+ CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
+ CC_host="%{__cc}" \
+ CXX_host="%{__cxx}" \
+ LD_host="%{__cxx}" \
+%{__python} build/gyp_chromium \
+ --format=make \
+ --depth=. \
+ build/all.gyp \
+ $flags
# need {CC/CXX/LDFLAGS}.host overrides for v8 build
%{__make} -r chrome %{?with_sandboxing:chrome_sandbox} \
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/{themes,plugins,extensions} \
+install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/{locales,resources} \
$RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/%{name},%{_mandir}/man1,%{_desktopdir}}
cd out/%{!?debug:Release}%{?debug:Debug}
d
}
' $RPM_BUILD_ROOT%{_bindir}/%{name}
-cp -a *.pak locales resources $RPM_BUILD_ROOT%{_libdir}/%{name}
+cp -a locales resources $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a *.pak $RPM_BUILD_ROOT%{_libdir}/%{name}
+ln -s %{_datadir}/%{name}/locales $RPM_BUILD_ROOT%{_libdir}/%{name}/locales
+ln -s %{_datadir}/%{name}/resources $RPM_BUILD_ROOT%{_libdir}/%{name}/resources
cp -p chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
-install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
+install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome-sandbox
%if %{without system_ffmpeg}
install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
%endif
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/master_preferences
-%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/resources/extension/demo
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/extension/demo
%if %{with nacl}
# Install Native Client files on platforms that support it.
%clean
rm -rf $RPM_BUILD_ROOT
+%pretrans
+for d in locales resources; do
+ if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
+ install -d %{_datadir}/%{name}
+ mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
+ fi
+done
+exit 0
+
%post
%update_icon_cache hicolor
%update_desktop_database
%{_libdir}/%{name}/chrome*.pak
%{_libdir}/%{name}/content_resources.pak
%{_libdir}/%{name}/resources.pak
-%dir %{_libdir}/%{name}/locales
-%{_libdir}/%{name}/locales/en-US.pak
-%dir %{_libdir}/%{name}/resources
-%{_libdir}/%{name}/resources/inspector
-%dir %{_libdir}/%{name}/themes
-%dir %{_libdir}/%{name}/extensions
+%{_libdir}/%{name}/locales
+%{_libdir}/%{name}/resources
+
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/locales
+%{_datadir}/%{name}/locales/en-US.pak
+%dir %{_datadir}/%{name}/resources
+%{_datadir}/%{name}/resources/inspector
+
%dir %{_libdir}/%{name}/plugins
%attr(755,root,root) %{_libdir}/%{name}/%{name}
# These unique permissions are intentional and necessary for the sandboxing
-%attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
+%attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
# ffmpeg libs
%if %{without system_ffmpeg}