mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-01-24 18:12:13 +08:00
142 lines
5.3 KiB
Bash
142 lines
5.3 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
|
|
pkgname=chromium
|
|
pkgver=28.0.1500.52
|
|
pkgrel=1
|
|
_verbld=${pkgver}-207119 # used for libpdf and pepper-flash
|
|
_pepperflashver=11.7.700.203
|
|
pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser. Include PepperFlash and libpdf plugins"
|
|
arch=('x86_64')
|
|
url="http://www.chromium.org/"
|
|
license=('BSD')
|
|
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')
|
|
makedepends=('python2' 'perl' 'gperf' 'yasm' 'mesa' 'libgnome-keyring' 'elfutils' 'subversion' 'ninja')
|
|
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
|
|
prepopulated_engines_json.diff)
|
|
sha1sums=('ea2497fd447726593fc6fe55d31e4f1b3c69f3bb'
|
|
'2fe457c3f92889d2051d7bf452214b80fced6c52'
|
|
'cdda47faa791d56089f92854957070b1ec135c2e'
|
|
'd02e7eaaa5de9407d8744a03a1306c117b659098'
|
|
'fa93e2d3d4d52a1a29a1c446092a158f05751fcc'
|
|
'3d9663f614113c137016fadb963e150f11f17402'
|
|
'90619af5afa000b47ac03ab01b7cba8b6d16daa1'
|
|
'f7a705d539361d63fa0e3fe0e276341c87d484fc'
|
|
'4ac33284c534b5117741b551cc531589cfa08d75')
|
|
|
|
# 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
|
|
|
|
|
|
build() {
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
# Set DDG as default search
|
|
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"
|
|
|
|
# activate ninja compile method
|
|
export GYP_GENERATORS='ninja'
|
|
|
|
build/gyp_chromium --depth=. \
|
|
-Dgoogle_api_key=$_google_api_key \
|
|
-Dgoogle_default_client_id=$_google_default_client_id \
|
|
-Dgoogle_default_client_secret=$_google_default_client_secret \
|
|
-Dwerror= \
|
|
-Dlinux_sandbox_path=/extra/usr/lib/chromium/chromium-sandbox \
|
|
-Dlinux_strip_binary=1 \
|
|
-Dlinux_use_gold_binary=0 \
|
|
-Dlinux_use_gold_flags=0 \
|
|
-Dlinux_link_pulseaudio=1 \
|
|
-Drelease_extra_cflags="$CFLAGS" \
|
|
-Dlibspeechd_h_prefix=speech-dispatcher/ \
|
|
-Dffmpeg_branding=Chrome \
|
|
-Dproprietary_codecs=1 \
|
|
-Duse_system_bzip2=1 \
|
|
-Duse_system_flac=1 \
|
|
-Duse_system_ffmpeg=0 \
|
|
-Duse_system_icu=1 \
|
|
-Duse_system_libevent=1 \
|
|
-Duse_system_libjpeg=1 \
|
|
-Duse_system_libpng=1 \
|
|
-Duse_system_libxml=1 \
|
|
-Duse_system_opus=1 \
|
|
-Duse_system_ssl=0 \
|
|
-Duse_system_xdg_utils=1 \
|
|
-Duse_system_yasm=1 \
|
|
-Duse_system_zlib=0 \
|
|
-Duse_gconf=0 \
|
|
-Dtarget_arch=x64 \
|
|
-Ddisable_nacl=1
|
|
|
|
make chrome chrome_sandbox BUILDTYPE=Release
|
|
|
|
# Build chrome base
|
|
#ninja -C out/Release chrome
|
|
# Build the required SUID_SANDBOX helper
|
|
#ninja -C out/Release chrome_sandbox
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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"
|
|
}
|