mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-test.git
synced 2025-02-24 18:12:47 +00:00
296 lines
10 KiB
RPMSpec
296 lines
10 KiB
RPMSpec
%global _build_pkgcheck_set %{nil}
|
|
|
|
%define crname chromium-browser
|
|
%define _crdir %{_libdir}/%{crname}
|
|
%define _src %{_topdir}/SOURCES
|
|
|
|
Name: chromium-browser-stable
|
|
Version: 39.0.2171.99
|
|
Release: 1
|
|
Summary: A fast webkit-based web browser
|
|
Group: Networking/WWW
|
|
License: BSD, LGPL
|
|
|
|
Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz
|
|
Source1: chromium-wrapper
|
|
Source30: master_preferences
|
|
Source31: default_bookmarks.html
|
|
Source32: chromium.default
|
|
Source2: chromium-browser.desktop
|
|
Source100: icons.tar.bz2
|
|
Source997: depot_tools.tar.xz
|
|
Source998: gn-binaries.tar.xz
|
|
Source999: new-system-icons.tar.xz
|
|
Source1000: README.urpmi
|
|
Patch4: chromium-30.0.1599.66-master-prefs-path.patch
|
|
# PATCH-FIX-OPENSUSE removes build part for courgette
|
|
Patch14: chromium-25.0.1364.172-no-courgette.patch
|
|
# PATCH-FIX-OPENSUSE Compile the sandbox with -fPIE settings
|
|
Patch15: chromium-25.0.1364.172-sandbox-pie.patch
|
|
|
|
Provides: %{crname}
|
|
Conflicts: chromium-browser-unstable
|
|
Conflicts: chromium-browser-beta
|
|
Obsoletes: chromium-browser < 1:9.0.597.94
|
|
BuildRequires: bison, flex, gtk2-devel, atk-devel, libexpat-devel, gperf
|
|
BuildRequires: nspr-devel, nss-devel, libalsa-devel, util-linux, ninja
|
|
BuildRequires: glib2-devel, bzip2-devel, zlib-devel
|
|
BuildRequires: jpeg-devel, pkgconfig(gl), mesaglu-devel
|
|
BuildRequires: libxscrnsaver-devel, dbus-glib-devel, cups-devel
|
|
BuildRequires: libgnome-keyring-devel libvpx-devel libxtst-devel
|
|
BuildRequires: libxslt-devel libxml2-devel
|
|
BuildRequires: libxt-devel pam-devel pkgconfig(libgcrypt)
|
|
BuildRequires: libevent-devel pkgconfig(flac) pulseaudio-devel
|
|
BuildRequires: elfutils-devel udev-devel speex-devel yasm
|
|
BuildRequires: pkgconfig(harfbuzz) pkgconfig(libmtp) pkgconfig(libgpsd)
|
|
BuildRequires: speech-dispatcher-devel pkgconfig(libusb-1.0)
|
|
BuildRequires: pkgconfig(libpci) pkgconfig(gstreamer-plugins-base-1.0), gyp
|
|
BuildRequires: pkgconfig(opus) pkgconfig(libwebp) pkgconfig(minizip)
|
|
BuildRequires: pkgconfig(libexif) cap-devel
|
|
|
|
Suggests: chromium-browser-pepper-flash
|
|
Suggests: chromium-browser-pdf-plugin
|
|
|
|
ExclusiveArch: i586 x86_64 armv7l
|
|
|
|
%description
|
|
Chromium is a browser that combines a minimal design with sophisticated
|
|
technology to make the web faster, safer, and easier.
|
|
|
|
This is the stable channel Chromium browser. It offers a rock solid
|
|
browser which is updated with features and fixes once they have been
|
|
thoroughly tested. If you want the latest features, install the
|
|
chromium-browser-unstable package instead.
|
|
|
|
Note: If you are reverting from unstable to stable or beta channel, you may
|
|
experience tab crashes on startup. This crash only affects tabs restored
|
|
during the first launch due to a change in how tab state is stored.
|
|
See http://bugs.chromium.org/34688. It's always a good idea to back up
|
|
your profile before changing channels.
|
|
|
|
%package -n chromium-browser
|
|
Summary: A fast webkit-based web browser (transition package)
|
|
Epoch: 1
|
|
Group: Networking/WWW
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description -n chromium-browser
|
|
Chromium is a browser that combines a minimal design with sophisticated
|
|
technology to make the web faster, safer, and easier.
|
|
|
|
This is a transition package that installs the stable channel Chromium
|
|
browser. If you prefer the dev channel browser, install the
|
|
chromium-browser-unstable package instead.
|
|
|
|
%package -n chromedriver
|
|
Summary: WebDriver for Google Chrome/Chromium
|
|
Group: Development/Other
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description -n chromedriver
|
|
WebDriver is an open source tool for automated testing of webapps across many
|
|
browsers. It provides capabilities for navigating to web pages, user input,
|
|
JavaScript execution, and more. ChromeDriver is a standalone server which
|
|
implements WebDriver's wire protocol for Chromium. It is being developed by
|
|
members of the Chromium and WebDriver teams.
|
|
|
|
%prep
|
|
%setup -q -n chromium-%{version} -a 998 -a 997 -a 999
|
|
%patch4 -p1 -b .prefs
|
|
|
|
%patch14 -p1
|
|
%patch15 -p1
|
|
|
|
# Hard code extra version
|
|
FILE=chrome/common/chrome_version_info_posix.cc
|
|
sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"%{product_vendor} %{product_version}"/' $FILE
|
|
cmp $FILE $FILE.orig && exit 1
|
|
|
|
%build
|
|
#PARSED_OPT_FLAGS=$(echo \'%{optflags} -D_GNU_SOURCE\' | sed "s/ /',/g" | sed "s/',/', '/g")
|
|
#sed -i "s|'-O<(release_optimize)'|$PARSED_OPT_FLAGS|g" build/common.gypi
|
|
|
|
export GYP_GENERATORS='ninja'
|
|
./build/gyp_chromium build/all.gyp --depth=. \
|
|
-D linux_sandbox_path=%{_crdir}/chrome-sandbox \
|
|
-D linux_sandbox_chrome_path=%{_crdir}/chrome \
|
|
-D linux_link_gnome_keyring=0 \
|
|
-D use_gconf=0 \
|
|
-D werror='' \
|
|
-D use_system_sqlite=0 \
|
|
-D use_system_libxml=1 \
|
|
-D use_system_zlib=0 \
|
|
-D use_system_bzip2=1 \
|
|
-D use_system_libbz2=1 \
|
|
-D use_system_xdg_utils=1 \
|
|
-D use_system_yasm=1 \
|
|
-D use_system_libpng=1 \
|
|
-D use_system_libjpeg=1 \
|
|
-D use_system_libevent=1 \
|
|
-D use_system_speex=1 \
|
|
-D use_system_flac=1 \
|
|
-D use_system_vpx=1 \
|
|
-D use_system_icu=0 \
|
|
-D use_system_libusb=1 \
|
|
-D use_system_libexif=1 \
|
|
-D use_system_libsrtp=0 \
|
|
-D use_system_libmtp=1 \
|
|
-D use_system_opus=1 \
|
|
-D use_system_libwebp=1 \
|
|
-D use_system_harfbuzz=1 \
|
|
-D use_system_minizip=1 \
|
|
-D build_ffmpegsumo=1 \
|
|
-D use_system_ffmpeg=0 \
|
|
-D ffmpeg_branding=Chrome \
|
|
-D proprietary_codecs=1 \
|
|
-D use_pulseaudio=1 \
|
|
-D use_system_v8=0 \
|
|
-D use_system_protobuf=0 \
|
|
-D linux_link_libpci=1 \
|
|
-D linux_link_gsettings=1 \
|
|
-D linux_link_libspeechd=1 \
|
|
-D linux_link_kerberos=1 \
|
|
-D linux_link_libgps=1 \
|
|
-D use_system_libyuv=1 \
|
|
-D use_system_libxslt=1 \
|
|
-D use_system_nspr=1 \
|
|
-D disable_nacl=1 \
|
|
-D logging_like_official_build=1 \
|
|
-D remove_webcore_debug_symbols=1 \
|
|
-D linux_fpic=1 \
|
|
-D use_aura=1 \
|
|
-D linux_use_gold_binary=0 \
|
|
-D linux_use_gold_flags=0 \
|
|
-D clang=0 \
|
|
-Dgoogle_api_key='AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q' \
|
|
-Dgoogle_default_client_id='4139804441.apps.googleusercontent.com' \
|
|
-Dgoogle_default_client_secret='KDTRKEZk2jwT_7CDpcmMA--P' \
|
|
%ifarch i586
|
|
-D disable_sse2=1 \
|
|
-D release_extra_cflags="-march=i586"
|
|
%endif
|
|
|
|
mkdir -p out/Release
|
|
|
|
ninja -C out/Release chrome
|
|
# Build the required SUID_SANDBOX helper
|
|
ninja -C out/Release chrome_sandbox
|
|
# Build the ChromeDriver test suite
|
|
ninja -C out/Release chromedriver
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
mkdir -p %{buildroot}%{_crdir}/locales
|
|
mkdir -p %{buildroot}%{_crdir}/themes
|
|
mkdir -p %{buildroot}%{_crdir}/default_apps
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
install -m 755 %{_src}/chromium-wrapper %{buildroot}%{_crdir}/
|
|
install -m 755 out/Release/chrome %{buildroot}%{_crdir}/
|
|
install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox
|
|
cp -a out/Release/chromedriver %{buildroot}%{_crdir}/chromedriver
|
|
install -m 644 out/Release/chrome.1 %{buildroot}%{_mandir}/man1/%{crname}.1
|
|
install -m 644 out/Release/*.pak %{buildroot}%{_crdir}/
|
|
install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/
|
|
install -m 755 out/Release/libffmpegsumo.so %{buildroot}%{_crdir}/
|
|
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/
|
|
install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/
|
|
install -m 644 chrome/browser/resources/default_apps/* %{buildroot}%{_crdir}/default_apps/
|
|
ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname}
|
|
sed -i "s!@LIBDIR@!%{_libdir}!g" %{buildroot}%{_crdir}/chromium-wrapper
|
|
ln -s %{_crdir}/chromedriver %{buildroot}%{_bindir}/chromedriver
|
|
|
|
# create global config file
|
|
mkdir -p %{buildroot}%{_sysconfdir}/default
|
|
install -m644 %{SOURCE32} %{buildroot}%{_sysconfdir}/default/%{crname}
|
|
|
|
# create pepper dir. talkplugin works fine only if sylinks in pepper
|
|
mkdir -p %{buildroot}%{_crdir}/pepper
|
|
|
|
find out/Release/resources/ -name "*.d" -exec rm {} \;
|
|
cp -r out/Release/resources %{buildroot}%{_crdir}
|
|
|
|
# Strip NaCl IRT
|
|
#%ifarch x86_64
|
|
#./native_client/toolchain/linux_x86_newlib/bin/x86_64-nacl-strip %{buildroot}%{_crdir}/nacl_irt_x86_64.nexe
|
|
#%endif
|
|
#%ifarch i586
|
|
#./native_client/toolchain/linux_x86_newlib/bin/i686-nacl-strip %{buildroot}%{_crdir}/nacl_irt_x86_32.nexe
|
|
#%endif
|
|
|
|
# desktop file
|
|
mkdir -p %{buildroot}%{_datadir}/applications
|
|
install -m 644 %{_src}/%{crname}.desktop %{buildroot}%{_datadir}/applications/
|
|
|
|
# icon
|
|
mkdir -p %{buildroot}%{_iconsdir}/hicolor/
|
|
tar xjf %{SOURCE100} -C %{buildroot}%{_iconsdir}/hicolor/
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/%{crname}
|
|
install -m 0644 %{SOURCE30} %{buildroot}%{_sysconfdir}/%{crname}/
|
|
install -m 0644 %{SOURCE31} %{buildroot}%{_sysconfdir}/%{crname}/
|
|
|
|
find %{buildroot} -name "*.nexe" -exec strip {} \;
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
|
install -p -m755 %{SOURCE1000} %{buildroot}%{_docdir}/%{name}
|
|
|
|
%post
|
|
if [ -e /opt/google/talkplugin/libppgoogletalk.so ]; then
|
|
if [ ! -e %{_crdir}/pepper/libppgoogletalk.so ]; then
|
|
ln -s /opt/google/talkplugin/libppgoogletalk.so \
|
|
%{_crdir}/pepper/libppgoogletalk.so
|
|
fi
|
|
fi
|
|
|
|
if [ -e /opt/google/talkplugin/libppo1d.so ]; then
|
|
if [ ! -e %{_crdir}/pepper/libppo1d.so ]; then
|
|
ln -s /opt/google/talkplugin/libppo1d.so \
|
|
%{_crdir}/pepper/libppo1d.so
|
|
fi
|
|
fi
|
|
|
|
%preun
|
|
if [ $1 -eq 0 ] ; then
|
|
if [ -e %{_crdir}/pepper/libppo1d.so ]; then
|
|
rm -f %{_crdir}/pepper/libppo1d.so
|
|
fi
|
|
|
|
if [ -e %{_crdir}/pepper/libppgoogletalk.so ]; then
|
|
rm -f %{_crdir}/pepper/libppgoogletalk.so
|
|
fi
|
|
|
|
fi
|
|
|
|
%files -n chromium-browser
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%config %{_sysconfdir}/%{crname}
|
|
%config %{_sysconfdir}/default/%{crname}
|
|
%{_bindir}/%{crname}
|
|
%{_crdir}/chromium-wrapper
|
|
%{_crdir}/chrome
|
|
%{_crdir}/chrome-sandbox
|
|
%{_crdir}/icudtl.dat
|
|
%{_crdir}/libffmpegsumo.so
|
|
%{_crdir}/locales
|
|
%{_crdir}/resources.pak
|
|
%{_crdir}/resources
|
|
%{_crdir}/chrome_100_percent.pak
|
|
%{_crdir}/content_resources.pak
|
|
%{_crdir}/keyboard_resources.pak
|
|
%{_crdir}/themes
|
|
%{_crdir}/default_apps
|
|
%dir %{_crdir}/pepper
|
|
%{_mandir}/man1/%{crname}*
|
|
%{_datadir}/applications/*.desktop
|
|
%{_iconsdir}/hicolor/*/apps/%{crname}.*
|
|
%{_docdir}/%{name}/README.urpmi
|
|
|
|
%files -n chromedriver
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE AUTHORS
|
|
%{_bindir}/chromedriver
|
|
%{_crdir}/chromedriver
|
|
|