void-packages/srcpkgs/chromium/template

103 lines
4.2 KiB
Text

# Template file for 'chromium'
pkgname=chromium
#See http://www.chromium.org/developers/calendar for the latest version
version=26.0.1410.63
revision=3
short_desc="Google's attempt at creating a safer, faster, and more stable browser"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.chromium.org/"
license="BSD"
_url_base="http://commondatastorage.googleapis.com"
distfiles="${_url_base}/${pkgname}-browser-official/${pkgname}-${version}.tar.xz"
checksum="7af8f70745992afdee0196039b5beab1b86b6de7fa70ca4f4a04dc335f034b3f"
long_desc="
Chromium is an open-source browser project that aims to build a safer,
faster, and more stable way for all Internet users to experience the web.
Chromium serves as a base for Google Chrome, which is Chromium rebranded
(name and logo) with very few additions such as usage tracking and an
auto-updater system."
disable_debug=yes
hostmakedepends="python pkg-config perl gperf bison"
makedepends="libpng-devel>=1.6 gtk+-devel nss-devel GConf-devel pciutils-devel
libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel
libXScrnSaver-devel alsa-lib-devel icu-devel which protobuf-devel
libxml2-devel libxslt-devel sqlite-devel yasm opus-devel ffmpeg-devel
libvpx-devel libflac-devel speex-devel libusb-devel libmtp-devel
libjpeg-turbo-devel libevent-devel v8-devel json-c-devel re2-devel
libwebp-devel minizip-devel libsrtp-devel jsoncpp-devel"
do_configure() {
unset LD LDFLAGS
# TODO
# See https://crbug.com/28287
# use_system_libsrtp=1 (check if https://bugs.gentoo.org/show_bug.cgi?id=459932 reproducible)
# use_system_libvpx=1 (http://crbug.com/174287 fixed for chromium-27)
# use_system_v8=1 (http://crbug.com/29050 fixed for chromium-27)
# use_system_ffmpeg=1 (most likely libvpx-related, check on chromium-27)
# use_system_mesa=1 (http://crbug.com/161389 fixed for chromium-27)
# disable_pnacl=0 (http://crbug.com/224169)
# use_system_sqlite=1 (http://crbug.com/22208)
# use_system_ssl=1 (http://crbug.com/58087)
# use_system_tcmalloc=1 (https://crbug.com/174634 WontFix?)
# use_system_hyphen=1 (http://crbug.com/176285)
# use_system_hunspell=1 (likely https://crbug.com/24517)
build/gyp_chromium -f make build/all.gyp --depth=. -Dwerror= \
-Dlinux_use_gold_binary=0 -Dlinux_use_gold_flags=0 \
-Dlinux_sandbox_path=/usr/lib/chromium/chromium-sandbox \
-Ddisable_sse2=1 -Drelease_extra_cflags="$CFLAGS" \
-Dffmpeg_branding=Chrome -Dproprietary_codecs=1 \
-Duse_gconf=0 -Dlinux_use_tcmalloc=0 -Dlinux_link_gsettings=1 \
-Ddisable_nacl=1 -Duse_system_bzip2=1 -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_libexif=1 \
-Duse_system_libjpeg=1 -Duse_system_libmtp=1 -Duse_system_libpng=1 \
-Duse_system_libsrtp=1 -Duse_system_libusb=1 -Duse_system_libwebp=1 \
-Duse_system_libxml=1 -Duse_system_minizip=1 \
-Duse_system_nspr=1 -Duse_system_opus=1 -Duse_system_protobuf=1 \
-Duse_system_re2=1 -Duse_system_speex=1 -Duse_system_stlport=1 \
-Duse_system_yasm=1 -Duse_system_zlib=1 -Duse_system_xdg=1
}
do_build() {
make BUILDTYPE=Release ${makejobs} chrome chrome_sandbox
}
do_install() {
vinstall out/Release/chrome 755 usr/lib/${pkgname} ${pkgname}
vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} ${pkgname}-sandbox
cp out/Release/{*.pak,libffmpegsumo.so} ${DESTDIR}/usr/lib/chromium
cp -a out/Release/locales ${DESTDIR}/usr/lib/chromium
vinstall out/Release/chrome.1 644 usr/share/man/man1 chromium.1
vinstall ${FILESDIR}/chromium.desktop 644 usr/share/applications
for size in 22 24 48 64 128 256; do
install -Dm644 "chrome/app/theme/chromium/product_logo_${size}.png" \
${DESTDIR}/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" \
${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png
done
vinstall ${FILESDIR}/chromium.sh 755 usr/bin chromium
vinstall LICENSE 644 usr/share/licenses/${pkgname}
}
chromium_package() {
depends="desktop-file-utils hicolor-icon-theme"
pkg_install() {
vmove all
}
}