From 745e148f7e3fc83c9b23edc2991491ddafccae7f Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Fri, 2 Jan 2015 21:19:21 +0800 Subject: chromium: Chromium 39.0.2171.95 --- chromium/INSTALL.md | 5 + chromium/README.md | 3 + chromium/chromium/chromium-browser.desktop | 140 ++++++++++++++++++++ chromium/chromium/chromium-browser.sh | 109 ++++++++++++++++ chromium/chromium/chromium.spec | 199 +++++++++++++++++++++++++++++ 5 files changed, 456 insertions(+) create mode 100644 chromium/INSTALL.md create mode 100644 chromium/README.md create mode 100644 chromium/chromium/chromium-browser.desktop create mode 100755 chromium/chromium/chromium-browser.sh create mode 100644 chromium/chromium/chromium.spec diff --git a/chromium/INSTALL.md b/chromium/INSTALL.md new file mode 100644 index 0000000..8130791 --- /dev/null +++ b/chromium/INSTALL.md @@ -0,0 +1,5 @@ +`yum install chromium` + +If you find that all hardware acceleration is disabled in `chrome://gpu`, it +is likely that you DRI3 support is broken. Please add `LIBGL_DRI3_DISABLE=1` +to your environment variables to workaround it. diff --git a/chromium/README.md b/chromium/README.md new file mode 100644 index 0000000..d9a03af --- /dev/null +++ b/chromium/README.md @@ -0,0 +1,3 @@ +[Chromium](https://www.chromium.org) web browser packages for Fedora. + +This package may conflict with chromium packages found in other repositories. diff --git a/chromium/chromium/chromium-browser.desktop b/chromium/chromium/chromium-browser.desktop new file mode 100644 index 0000000..f532848 --- /dev/null +++ b/chromium/chromium/chromium-browser.desktop @@ -0,0 +1,140 @@ +[Desktop Entry] +Version=1.0 +Name=Chromium Web Browser +Name[ast]=Restolador web Chromium +Name[ca]=Navegador web Chromium +Name[de]=Chromium-Webbrowser +Name[es]=Navegador web Chromium +Name[fr]=Navigateur Web Chromium +Name[gl]=Navegador web Chromium +Name[he]=דפדפן האינטרנט Chromium +Name[hr]=Chromium web preglednik +Name[hu]=Chromium webböngésző +Name[id]=Peramban Web Chromium +Name[it]=Browser web Chromium +Name[ja]=Chromium ウェブ・ブラウザ +Name[ko]=Chromium 웹 브라우저 +Name[pt_BR]=Chromium Navegador da Internet +Name[ru]=Веб-браузер Chromium +Name[sl]=Chromium spletni brskalnik +Name[sv]=Webbläsaren Chromium +Name[ug]=Chromium توركۆرگۈ +Name[zh_CN]=Chromium 网页浏览器 +Name[zh_HK]=Chromium 網頁瀏覽器 +Name[zh_TW]=Chromium 網頁瀏覽器 +Comment=Access the Internet +Comment[ar]=الدخول إلى الإنترنت +Comment[ast]=Accesu a Internet +Comment[bg]=Достъп до интернет +Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন +Comment[ca]=Accediu a Internet +Comment[cs]=Přístup k internetu +Comment[da]=Få adgang til internettet +Comment[de]=Internetzugriff +Comment[el]=Πρόσβαση στο Διαδίκτυο +Comment[en_GB]=Access the Internet +Comment[es]=Acceda a Internet +Comment[et]=Pääs Internetti +Comment[fi]=Käytä internetiä +Comment[fil]=I-access ang Internet +Comment[fr]=Explorer le Web +Comment[gl]=Acceda a Internet +Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો +Comment[he]=גישה לאינטרנט +Comment[hi]=इंटरनेट तक पहुंच स्थापित करें +Comment[hr]=Pristupite Internetu +Comment[hu]=Az internet elérése +Comment[id]=Akses Internet +Comment[it]=Accesso a Internet +Comment[ja]=インターネットにアクセス +Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿs +Comment[ko]=인터넷에 연결합니다 +Comment[lt]=Interneto prieiga +Comment[lv]=Piekļūt internetam +Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക +Comment[mr]=इंटरनेटमध्ये प्रवेश करा +Comment[nb]=Gå til Internett +Comment[nl]=Verbinding maken met internet +Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ +Comment[pl]=Skorzystaj z internetu +Comment[pt]=Aceder à Internet +Comment[pt_BR]=Acessar a internet +Comment[ro]=Accesaţi Internetul +Comment[ru]=Доступ в Интернет +Comment[sk]=Prístup do siete Internet +Comment[sl]=Dostop do interneta +Comment[sr]=Приступите Интернету +Comment[sv]=Surfa på Internet +Comment[ta]=இணையத்தை அணுகுதல் +Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి +Comment[th]=เข้าถึงอินเทอร์เน็ต +Comment[tr]=İnternet'e erişin +Comment[ug]=ئىنتېرنېتنى زىيارەت قىلىش +Comment[uk]=Доступ до Інтернету +Comment[vi]=Truy cập Internet +Comment[zh_CN]=访问互联网 +Comment[zh_HK]=連線到網際網路 +Comment[zh_TW]=連線到網際網路 +GenericName=Web Browser +GenericName[ar]=متصفح الشبكة +GenericName[ast]=Restolador web +GenericName[bg]=Уеб браузър +GenericName[bn]=ওয়েব ব্রাউজার +GenericName[ca]=Navegador web +GenericName[cs]=WWW prohlížeč +GenericName[da]=Browser +GenericName[de]=Web-Browser +GenericName[el]=Περιηγητής ιστού +GenericName[en_GB]=Web Browser +GenericName[es]=Navegador web +GenericName[et]=Veebibrauser +GenericName[fi]=WWW-selain +GenericName[fil]=Web Browser +GenericName[fr]=Navigateur Web +GenericName[gl]=Navegador web +GenericName[gu]=વેબ બ્રાઉઝર +GenericName[he]=דפדפן אינטרנט +GenericName[hi]=वेब ब्राउज़र +GenericName[hr]=Web preglednik +GenericName[hu]=Webböngésző +GenericName[id]=Peramban Web +GenericName[it]=Browser web +GenericName[ja]=ウェブ・ブラウザ +GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ +GenericName[ko]=웹 브라우저 +GenericName[lt]=Žiniatinklio naršyklė +GenericName[lv]=Tīmekļa pārlūks +GenericName[ml]=വെബ് ബ്രൌസര്‍ +GenericName[mr]=वेब ब्राऊजर +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador da Internet +GenericName[ro]=Navigator de Internet +GenericName[ru]=Веб-браузер +GenericName[sk]=WWW prehliadač +GenericName[sl]=Spletni brskalnik +GenericName[sr]=Интернет прегледник +GenericName[sv]=Webbläsare +GenericName[ta]=இணைய உலாவி +GenericName[te]=మహాతల అన్వేషి +GenericName[th]=เว็บเบราว์เซอร์ +GenericName[tr]=Web Tarayıcı +GenericName[ug]=توركۆرگۈ +GenericName[uk]=Навігатор Тенет +GenericName[vi]=Bộ duyệt Web +GenericName[zh_CN]=网页浏览器 +GenericName[zh_HK]=網頁瀏覽器 +GenericName[zh_TW]=網頁瀏覽器 +Exec=/usr/bin/chromium-browser %U +Terminal=false +X-MultipleArgs=false +Type=Application +Icon=chromium-browser +Categories=Network;WebBrowser; +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp; +StartupWMClass=Chromium-browser +StartupNotify=true + diff --git a/chromium/chromium/chromium-browser.sh b/chromium/chromium/chromium-browser.sh new file mode 100755 index 0000000..fbbb4df --- /dev/null +++ b/chromium/chromium/chromium-browser.sh @@ -0,0 +1,109 @@ +#!/bin/sh + +# Chromium launcher + +# Authors: +# Fabien Tassin +# License: GPLv2 or later + +# This file is obtained from https://repos.fedorapeople.org/repos/spot/chromium/ +# and modified by Ting-Wei Lan . All modifications are also +# licensed under GPLv2 or later. + +APPNAME=chrome +LIBDIR=@@CHROMIUMDIR@@ +GDB=/usr/bin/gdb + +usage () { + echo "chromium-browser [-h|--help] [-g|--debug] [options] [URL]" + echo + echo " -g or --debug Start within $GDB" + echo " -h or --help This help screen" + echo " --temp-profile Start with a new and temporary profile" + echo + echo " Other supported options are:" + MANWIDTH=80 man chromium-browser | sed -e '1,/OPTIONS/d; /ENVIRONMENT/,$d' + echo " See 'man chromium-browser' for more details" +} + +CHROMIUM_FLAGS="" + +# Prefer user defined CHROMIUM_USER_FLAGS (fron env) over system +# default CHROMIUM_FLAGS +CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"} + +# FFmpeg needs to know where its libs are located +if [ "Z$LD_LIBRARY_PATH" != Z ] ; then + LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH +else + LD_LIBRARY_PATH=$LIBDIR +fi + +export LD_LIBRARY_PATH + +# For the Default Browser detection to work, we need to give access +# to xdg-settings. Also set CHROME_WRAPPER in case xdg-settings is +# not able to do anything useful +export PATH="$LIBDIR:$PATH" +export CHROME_WRAPPER="`readlink -f "$0"`" +export CHROME_DESKTOP=$APPNAME.desktop + +# Set CHROME_VERSION_EXTRA visible in the About dialog and in about:version +export CHROME_VERSION_EXTRA="Built from source for @@BUILDTARGET@@" + +want_debug=0 +want_temp_profile=0 +while [ $# -gt 0 ]; do + case "$1" in + -h | --help | -help ) + usage + exit 0 ;; + -g | --debug ) + want_debug=1 + shift ;; + --temp-profile ) + want_temp_profile=1 + shift ;; + -- ) # Stop option prcessing + shift + break ;; + * ) + break ;; + esac +done + +if [ $want_temp_profile -eq 1 ] ; then + TEMP_PROFILE=`mktemp -d` + CHROMIUM_FLAGS="$CHROMIUM_FLAGS --user-data-dir=$TEMP_PROFILE" +fi + +if [ $want_debug -eq 1 ] ; then + if [ ! -x $GDB ] ; then + echo "Sorry, can't find usable $GDB. Please install it." + exit 1 + fi + tmpfile=`mktemp /tmp/chromiumargs.XXXXXX` || { echo "Cannot create temporary file" >&2; exit 1; } + trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15 + echo "set args $CHROMIUM_FLAGS ${1+"$@"}" > $tmpfile + echo "# Env:" + echo "# LD_LIBRARY_PATH=$LD_LIBRARY_PATH" + echo "# PATH=$PATH" + echo "# GTK_PATH=$GTK_PATH" + echo "# CHROMIUM_USER_FLAGS=$CHROMIUM_USER_FLAGS" + echo "# CHROMIUM_FLAGS=$CHROMIUM_FLAGS $@" + echo "$GDB $LIBDIR/$APPNAME -x $tmpfile" + $GDB "$LIBDIR/$APPNAME" -x $tmpfile + if [ $want_temp_profile -eq 1 ] ; then + rm -rf $TEMP_PROFILE + fi + exit $? +else + if [ $want_temp_profile -eq 0 ] ; then + exec $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" + else + # we can't exec here as we need to clean-up the temporary profile + $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" + rm -rf $TEMP_PROFILE + fi +fi + diff --git a/chromium/chromium/chromium.spec b/chromium/chromium/chromium.spec new file mode 100644 index 0000000..9b6da4b --- /dev/null +++ b/chromium/chromium/chromium.spec @@ -0,0 +1,199 @@ +# This spec file is based on other spec files and PKGBUILDs available from +# [1] https://repos.fedorapeople.org/repos/spot/chromium/ +# [2] https://copr.fedoraproject.org/coprs/churchyard/chromium-russianfedora-tested/ +# [3] https://www.archlinux.org/packages/extra/x86_64/chromium/ + +# Get the version number of latest stable version +# $ curl -s 'http://omahaproxy.appspot.com/all?os=linux&channel=stable' | sed 1d | cut -d , -f 3 + +Name: chromium +Version: 39.0.2171.95 +Release: 1%{?dist} +Summary: An open-source project that aims to build a safer, faster, and more stable browser + +Group: Applications/Internet +License: BSD and LGPLv2+ +URL: http://www.chromium.org +Source0: http://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz + +# The following two source files are copied and modified from +# https://repos.fedorapeople.org/repos/spot/chromium/ +Source1: chromium-browser.sh +Source2: chromium-browser.desktop + +# I don't have time to test whether it work on other architectures +ExclusiveArch: x86_64 + +# Basic tools and libraries +BuildRequires: ninja-build, bison, gperf +BuildRequires: libgcc(x86-32), glibc(x86-32) +BuildRequires: libcap-devel, cups-devel, minizip-devel, alsa-lib-devel +BuildRequires: pkgconfig(gtk+-2.0), pkgconfig(libexif), pkgconfig(nss) +BuildRequires: pkgconfig(xtst), pkgconfig(xscrnsaver) +BuildRequires: pkgconfig(dbus-1), pkgconfig(libudev) +BuildRequires: pkgconfig(gnome-keyring-1) +# use_system_* +BuildRequires: expat-devel +BuildRequires: flac-devel +BuildRequires: harfbuzz-devel +BuildRequires: libicu-devel +BuildRequires: jsoncpp-devel +BuildRequires: libevent-devel +BuildRequires: libjpeg-turbo-devel +BuildRequires: libpng-devel +# libvpx 1.3.0 is still too old to build chromium +# BuildRequires: libvpx-devel +BuildRequires: libwebp-devel +BuildRequires: openssl-devel +BuildRequires: opus-devel +BuildRequires: snappy-devel +BuildRequires: speex-devel +BuildRequires: zlib-devel +# linux_link_* +BuildRequires: brlapi-devel +BuildRequires: gpsd-devel +BuildRequires: pciutils-devel +BuildRequires: speech-dispatcher-devel +BuildRequires: pulseaudio-libs-devel +# install desktop files +BuildRequires: desktop-file-utils +Requires: desktop-file-utils +Requires: hicolor-icon-theme + + +%description + + +%prep +%setup -q + + +%build +./build/linux/unbundle/replace_gyp_files.py \ + -Duse_system_expat=1 \ + -Duse_system_flac=1 \ + -Duse_system_harfbuzz=1 \ + -Duse_system_icu=1 \ + -Duse_system_jsoncpp=1 \ + -Duse_system_libevent=1 \ + -Duse_system_libjpeg=1 \ + -Duse_system_libpng=1 \ + -Duse_system_libvpx=0 \ + -Duse_system_libwebp=1 \ + -Duse_system_opus=1 \ + -Duse_system_snappy=1 \ + -Duse_system_speex=1 \ + -Duse_system_zlib=1 + +GYP_GENERATORS=ninja ./build/gyp_chromium --depth=. \ + -Duse_system_expat=1 \ + -Duse_system_flac=1 \ + -Duse_system_harfbuzz=1 \ + -Duse_system_icu=1 \ + -Duse_system_jsoncpp=1 \ + -Duse_system_libevent=1 \ + -Duse_system_libjpeg=1 \ + -Duse_system_libpng=1 \ + -Duse_system_libvpx=0 \ + -Duse_system_libwebp=1 \ + -Duse_system_opus=1 \ + -Duse_system_snappy=1 \ + -Duse_system_speex=1 \ + -Duse_system_zlib=1 \ + -Duse_gconf=0 \ + -Dlinux_use_bundled_gold=0 \ + -Dlinux_use_bundled_binutils=0 \ + -Dlinux_link_gsettings=1 \ + -Dlinux_link_kerberos=1 \ + -Dlinux_link_libbrlapi=1 \ + -Dlinux_link_libgps=1 \ + -Dlinux_link_libpci=1 \ + -Dlinux_link_libspeechd=1 \ + -Dlinux_link_pulseaudio=1 \ + -Dicu_use_data_file_flag=0 \ + -Dlibspeechd_h_prefix=speech-dispatcher/ \ + -Dclang=0 \ + -Dwerror= \ + -Ddisable_fatal_linker_warnings=1 \ + -Dgoogle_api_key=AIzaSyCcK3laItm4Ik9bm6IeGFC6tVgy4eut0_o \ + -Dgoogle_default_client_id=82546407293.apps.googleusercontent.com \ + -Dgoogle_default_client_secret=GuvPB069ONrHxN7Y_y0txLKn \ + +./build/download_nacl_toolchains.py --packages \ + nacl_x86_glibc,nacl_x86_newlib,pnacl_newlib,pnacl_translator + +ninja-build -C out/Release chrome chrome_sandbox chromedriver + + +%install +%define chromiumdir %{_libdir}/chromium-browser +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{chromiumdir}/locales +mkdir -p %{buildroot}%{_mandir}/man1 +mkdir -p %{buildroot}%{_datadir}/applications +sed -e "s|@@CHROMIUMDIR@@|%{chromiumdir}|" -e "s|@@BUILDTARGET@@|`cat /etc/redhat-release`|" \ + %{SOURCE1} > chromium-browser.sh +install -m 755 chromium-browser.sh %{buildroot}%{_bindir}/chromium-browser +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2} +install -m 644 out/Release/chrome.1 %{buildroot}%{_mandir}/man1/chromium-browser.1 +install -m 755 out/Release/chrome %{buildroot}%{chromiumdir}/ +install -m 4755 out/Release/chrome_sandbox %{buildroot}%{chromiumdir}/chrome-sandbox +install -m 755 out/Release/chromedriver %{buildroot}%{chromiumdir}/ +install -m 755 out/Release/libffmpegsumo.so %{buildroot}%{chromiumdir}/ +install -m 755 out/Release/libpdf.so %{buildroot}%{chromiumdir}/ +install -m 755 out/Release/nacl_helper %{buildroot}%{chromiumdir}/ +install -m 755 out/Release/nacl_helper_bootstrap %{buildroot}%{chromiumdir}/ +install -m 644 out/Release/nacl_irt_x86_64.nexe %{buildroot}%{chromiumdir}/ +install -m 644 out/Release/*.pak %{buildroot}%{chromiumdir}/ +install -m 644 out/Release/locales/*.pak %{buildroot}%{chromiumdir}/locales/ +for i in 22 24 32 48 64 128 256; do + if [ ${i} = 32 ]; then ext=xpm; else ext=png; fi + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps + install -m 644 chrome/app/theme/chromium/product_logo_$i.${ext} \ + %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/chromium-browser.${ext} +done + + +%post +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +update-desktop-database &> /dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi +update-desktop-database &> /dev/null || : + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%files +%{_bindir}/chromium-browser +%{_datadir}/applications/chromium-browser.desktop +%{_datadir}/icons/hicolor/22x22/apps/chromium-browser.png +%{_datadir}/icons/hicolor/24x24/apps/chromium-browser.png +%{_datadir}/icons/hicolor/32x32/apps/chromium-browser.xpm +%{_datadir}/icons/hicolor/48x48/apps/chromium-browser.png +%{_datadir}/icons/hicolor/64x64/apps/chromium-browser.png +%{_datadir}/icons/hicolor/128x128/apps/chromium-browser.png +%{_datadir}/icons/hicolor/256x256/apps/chromium-browser.png +%{_mandir}/man1/chromium-browser.1.gz +%{chromiumdir}/chrome +%{chromiumdir}/chrome-sandbox +%{chromiumdir}/chromedriver +%{chromiumdir}/libffmpegsumo.so +%{chromiumdir}/libpdf.so +%{chromiumdir}/nacl_helper +%{chromiumdir}/nacl_helper_bootstrap +%{chromiumdir}/nacl_irt_x86_64.nexe +%{chromiumdir}/*.pak +%{chromiumdir}/locales/*.pak +%doc LICENSE AUTHORS + + + +%changelog +* Fri Jan 02 2015 - Ting-Wei Lan - 39.0.2171.95-1 +- Initial packaging -- cgit v1.2.3