2013-04-29 02:49:39 +08:00
#
# Chakra Packages for Chakra, part of chakra-project.org
#
pkgname = chromium
2013-09-23 01:00:16 +08:00
pkgver = 29.0.1547.76
2013-05-23 05:20:15 +08:00
pkgrel = 1
2013-09-23 01:00:16 +08:00
_verbld = ${ pkgver } -223446 # used for libpdf and pepper-flash
_pepperflashver = 11.8.800.170
2013-05-06 05:00:21 +08:00
pkgdesc = "The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser. Include PepperFlash and libpdf plugins"
2013-04-29 02:49:39 +08:00
arch = ( 'x86_64' )
url = "http://www.chromium.org/"
license = ( 'BSD' )
2013-06-23 22:05:11 +08:00
depends = ( 'gtk2' 'dbus-glib' 'nss' 'alsa-lib' 'xdg-utils' 'bzip2' 'libevent' 'libxss' 'libgcrypt' 'ttf-dejavu' 'dbus' 'desktop-file-utils' 'hicolor-icon-theme' 'systemd' 'speech-dispatcher' 'flac' 'opus' 'libxml2' 'libpulse' 'icu' 'filesystem-extra' )
2013-05-06 05:00:21 +08:00
makedepends = ( 'python2' 'perl' 'gperf' 'yasm' 'mesa' 'libgnome-keyring' 'elfutils' 'subversion' 'ninja' )
2013-04-29 02:49:39 +08:00
install = chromium.install
source = ( http://commondatastorage.googleapis.com/chromium-browser-official/$pkgname -$pkgver .tar.xz
http://dl.google.com/linux/chrome/rpm/stable/${ CARCH } /google-chrome-stable-${ _verbld } .${ CARCH } .rpm
license.html::http://www.google.com/chrome/intl/en/eula_text.html
chromium.desktop
chromium.sh
chromium.default
template_url_prepopulate_data.diff
search_engine_type.diff
2013-06-23 22:05:11 +08:00
prepopulated_engines_json.diff)
2013-09-23 01:00:16 +08:00
sha1sums = ( '9dc311ba925ab05cfca3f49df8d71b23d09de57f'
'82cb14f18110cb3dc62f4733cc851b475fe0cf39'
2013-05-23 05:20:15 +08:00
'cdda47faa791d56089f92854957070b1ec135c2e'
2013-04-29 02:49:39 +08:00
'd02e7eaaa5de9407d8744a03a1306c117b659098'
2013-05-06 05:00:21 +08:00
'fa93e2d3d4d52a1a29a1c446092a158f05751fcc'
2013-04-29 02:49:39 +08:00
'3d9663f614113c137016fadb963e150f11f17402'
'90619af5afa000b47ac03ab01b7cba8b6d16daa1'
'f7a705d539361d63fa0e3fe0e276341c87d484fc'
2013-06-23 22:05:11 +08:00
'4ac33284c534b5117741b551cc531589cfa08d75' )
2013-04-29 02:49:39 +08:00
2013-05-06 05:00:21 +08:00
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Chakra Linux use ONLY. For your own distribution, please
# get your own set of keys.
_google_api_key = AIzaSyA33sdKPff0x3KBByOhpzc1i7RS2A1mEpY
_google_default_client_id = 3502044743.apps.googleusercontent.com
_google_default_client_secret = TPvjII_2SwZn_9Ic0kRKqjtG
2013-04-29 02:49:39 +08:00
build( ) {
2013-05-23 05:20:15 +08:00
cd " $srcdir / $pkgname - $pkgver "
2013-05-06 05:00:21 +08:00
# Set DDG as default search
2013-04-29 02:49:39 +08:00
patch -p1 -i " $srcdir /template_url_prepopulate_data.diff "
patch -p1 -i " $srcdir /search_engine_type.diff "
patch -p1 -i " $srcdir /prepopulated_engines_json.diff "
2013-05-06 05:00:21 +08:00
# activate ninja compile method
export GYP_GENERATORS = 'ninja'
2013-04-29 02:49:39 +08:00
build/gyp_chromium --depth= . \
2013-05-06 05:00:21 +08:00
-Dgoogle_api_key= $_google_api_key \
-Dgoogle_default_client_id= $_google_default_client_id \
-Dgoogle_default_client_secret= $_google_default_client_secret \
2013-04-29 02:49:39 +08:00
-Dwerror= \
-Dlinux_sandbox_path= /extra/usr/lib/chromium/chromium-sandbox \
-Dlinux_strip_binary= 1 \
-Dlinux_use_gold_binary= 0 \
-Dlinux_use_gold_flags= 0 \
2013-05-23 05:20:15 +08:00
-Dlinux_link_pulseaudio= 1 \
2013-04-29 02:49:39 +08:00
-Drelease_extra_cflags= " $CFLAGS " \
2013-06-23 22:05:11 +08:00
-Dlibspeechd_h_prefix= speech-dispatcher/ \
2013-04-29 02:49:39 +08:00
-Dffmpeg_branding= Chrome \
-Dproprietary_codecs= 1 \
-Duse_system_bzip2= 1 \
2013-05-06 05:00:21 +08:00
-Duse_system_flac= 1 \
2013-04-29 02:49:39 +08:00
-Duse_system_ffmpeg= 0 \
2013-06-23 22:05:11 +08:00
-Duse_system_icu= 1 \
2013-04-29 02:49:39 +08:00
-Duse_system_libevent= 1 \
-Duse_system_libjpeg= 1 \
-Duse_system_libpng= 1 \
2013-05-06 05:00:21 +08:00
-Duse_system_libxml= 1 \
-Duse_system_opus= 1 \
2013-04-29 02:49:39 +08:00
-Duse_system_ssl= 0 \
2013-05-06 05:00:21 +08:00
-Duse_system_xdg_utils= 1 \
2013-04-29 02:49:39 +08:00
-Duse_system_yasm= 1 \
-Duse_system_zlib= 0 \
-Duse_gconf= 0 \
2013-05-06 05:00:21 +08:00
-Dtarget_arch= x64 \
2013-04-29 02:49:39 +08:00
-Ddisable_nacl= 1
make chrome chrome_sandbox BUILDTYPE = Release
2013-05-06 05:00:21 +08:00
# Build chrome base
#ninja -C out/Release chrome
# Build the required SUID_SANDBOX helper
#ninja -C out/Release chrome_sandbox
2013-04-29 02:49:39 +08:00
}
package( ) {
2013-05-23 05:20:15 +08:00
cd " $srcdir / $pkgname - $pkgver "
2013-04-29 02:49:39 +08:00
install -D out/Release/chrome ${ pkgdir } /extra/usr/lib/chromium/chromium
install -Dm4755 -o root -g root out/Release/chrome_sandbox \
" $pkgdir /extra/usr/lib/chromium/chromium-sandbox "
cp out/Release/{ *.pak,libffmpegsumo.so} \
" $pkgdir /extra/usr/lib/chromium/ "
# override command-line options
install -Dm644 " $srcdir /chromium.default " " $pkgdir /extra/etc/chromium/default "
cp -a out/Release/locales out/Release/resources " $pkgdir /extra/usr/lib/chromium/ "
find " $pkgdir /extra/usr/lib/chromium/ " -name '*.d' -type f -delete
install -Dm644 out/Release/chrome.1 " $pkgdir /extra/usr/share/man/man1/chromium.1 "
install -Dm644 " $srcdir /chromium.desktop " \
" $pkgdir /extra/usr/share/applications/chromium.desktop "
for size in 22 24 48 64 128 256; do
install -Dm644 " chrome/app/theme/chromium/product_logo_ $size .png " \
" $pkgdir /extra/usr/share/icons/hicolor/ ${ size } x ${ size } /apps/chromium.png "
done
2013-05-06 05:00:21 +08:00
for size in 16 32; do
install -Dm644 " chrome/app/theme/default_100_percent/chromium/product_logo_ $size .png " \
" $pkgdir /extra/usr/share/icons/hicolor/ ${ size } x ${ size } /apps/chromium.png "
done
2013-04-29 02:49:39 +08:00
install -D " $srcdir /chromium.sh " " $pkgdir /extra/usr/bin/chromium "
install -Dm644 LICENSE " $pkgdir /extra/usr/share/licenses/chromium/LICENSE "
#### PepperFlash ####
cd " $srcdir "
install -d " $pkgdir /extra/usr/lib/PepperFlash "
install -m644 opt/google/chrome/PepperFlash/* " $pkgdir /extra/usr/lib/PepperFlash "
sed -i " s/flashver=.*/flashver= $_pepperflashver / " " $startdir /chromium.install "
install -Dm644 " $srcdir /license.html " " $pkgdir /extra/usr/share/licenses/ $pkgname /license.html "
#### libpdf ####
install -d " ${ pkgdir } /extra/usr/lib/chromium "
install -m644 opt/google/chrome/libpdf.so " ${ pkgdir } /extra/usr/lib/chromium "
}