# Contributor: Mikhail Vorozhtsov # Maintainer: Gustavo Alvarez # ALARM changes were made to the GYP_DEFINES and CFLAGS and to the # target architecture. plugrel=2 noautobuild=1 pkgname=chromium-dev pkgver=14.0.835.8 pkgrel=1 _buildtype=Release test "x${DEBUG}" = "xyes" && _buildtype=Debug pkgdesc='The open-source project behind Google Chrome (Dev channel)' arch=('armv7h') url='http://www.chromium.org/' license=('BSD') depends=('alsa-lib' 'xdg-utils' 'hicolor-icon-theme' 'bzip2' 'libevent' 'libxss' 'libpng' 'libjpeg' 'cairo' 'dbus-glib' 'glib2' 'gtk2' 'nss' 'nspr' 'ffmpeg' 'libvpx' 'libxml2' 'libxslt' 'libxtst' 'icu') makedepends=('git' 'python2' 'gperf' 'yasm' 'mesa' 'gcc>=4.5.0-6' 'libgnome-keyring') optdepends=('libgnome-keyring') options=() test ${_buildtype} = Debug && options[${#options[@]}]=!strip install="${pkgname}.install" source=(http://build.chromium.org/official/chromium-${pkgver}.tar.bz2 ${pkgname}.desktop ${pkgname}.sh) md5sums=('775b1253214a64fc9eced614870ec374' '4d3824048614dd10fcd83d7e5c8ea091' 'eaeaf4a71707d8a767be9a7d467bb809') _use_gconf=0 if test -x /usr/bin/gconftool-2; then _use_gconf=1 depends[${#depends[@]}]=gconf fi # Build "ffmpegsumo.so" (0) / Use system ffmpeg (1) _use_ffmpeg_system_libs=0 if test $_use_ffmpeg_system_libs = 1; then use_system_ffmpeg="use_system_ffmpeg=1" build_ffmpegsumo="build_ffmpegsumo=0" else use_system_ffmpeg="use_system_ffmpeg=0" build_ffmpegsumo="build_ffmpegsumo=1" fi build() { cd "${srcdir}/chromium-${pkgver}" msg "Patching sources..." msg "Save configuration in ~/.config/${pkgname}" sed -e "s/'filename': 'chromium-browser'/'filename': '${pkgname}'/" -e "s/'confdir': 'chromium'/'confdir': '${pkgname}'/" -i chrome/chrome_exe.gypi sed \ -e "s/config_dir\.Append(\"chromium\")/config_dir.Append(\"${pkgname}\")/" \ -e "s/config_dir\.Append(\"chrome-frame\")/config_dir.Append(\"chrome-frame-${pkgname#chromium-}\")/" \ -i chrome/common/chrome_paths_linux.cc msg2 "Done" msg "Force usage of python2" #find -type f -a -name '*.py' -exec sed -i -e 's|#![ ]*/usr/bin/python$|#!/usr/bin/python2|' -e 's|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' {} \; #find -type f -a -name '*.gyp*' -exec sed -i -e 's| current.config if test -f "last.config"; then if cmp last.config current.config; then msg2 "Configuration has not changed, reusing output files..." else msg2 "Configuration has changed, removing output files..." rm -rf out fi fi mv current.config last.config python2 build/gyp_chromium -f make --depth=. build/all.gyp make BUILDTYPE=${_buildtype} ${MAKEFLAGS} chrome chrome_sandbox } package() { cd "${srcdir}/chromium-${pkgver}" chromium_home="${pkgdir}/usr/lib/${pkgname}" install -Dm755 -D out/${_buildtype}/chrome "${chromium_home}/chromium" install -Dm4555 -o root -g root -D out/${_buildtype}/chrome_sandbox "${chromium_home}/chromium-sandbox" install -Dm644 out/${_buildtype}/chrome.pak "${chromium_home}/chrome.pak" install -Dm644 out/${_buildtype}/resources.pak "${chromium_home}/resources.pak" if test ${_use_ffmpeg_system_libs} = 1; then for n in avcodec avdevice avfilter avformat avutil postproc swscale; do if test -e /usr/lib/lib${n}.so.[0-9]; then f=`echo /usr/lib/lib${n}.so.[0-9]` else f=`echo /usr/lib/lib${n}.so.[0-9][0-9]` fi f=`basename "$f"` ln -s ../$f "${chromium_home}/${f}" done else if test -e out/${_buildtype}/libffmpegsumo.so; then install -Dm644 out/${_buildtype}/libffmpegsumo.so "${chromium_home}/libffmpegsumo.so" fi fi cp -a out/${_buildtype}/locales out/${_buildtype}/resources "${chromium_home}/" find "${chromium_home}" -type f -name '*.d' -delete install -Dm644 out/${_buildtype}/chrome.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1" install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" for size in 16 22 24 32 48 64 128 256; do install -Dm644 chrome/app/theme/chromium/product_logo_${size}.png "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname}.png" done install -Dm755 ${srcdir}/${pkgname}.sh "${pkgdir}/usr/bin/${pkgname}" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }