56 lines
1.6 KiB
Bash
56 lines
1.6 KiB
Bash
# Template file for 'google-chrome'
|
|
pkgname=google-chrome
|
|
version=92.0.4515.107.1
|
|
revision=1
|
|
_chromeVersion="${version%.*}"
|
|
_chromeRevision="${version##*.}"
|
|
_channel=stable
|
|
archs="x86_64"
|
|
hostmakedepends="curl tar xz python3 python3-html2text python3-setuptools"
|
|
short_desc="Attempt at creating a safer, faster, and more stable browser"
|
|
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
|
license="custom:chrome"
|
|
homepage="https://www.google.com/chrome/"
|
|
nostrip=yes
|
|
restricted=yes
|
|
repository=nonfree
|
|
|
|
_baseUrl="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable"
|
|
_filename="google-chrome-${_channel}_${_chromeVersion}-${_chromeRevision}_amd64.deb"
|
|
_chromeUrl="${_baseUrl}/${_filename}"
|
|
_licenseUrl="https://www.google.com/intl/en/chrome/terms/"
|
|
|
|
distfiles="$_chromeUrl"
|
|
checksum=52b75a439ab7ab51f1bd302ac6b425191f8cab4332ea4e2dfa3ec4e42447cf6d
|
|
|
|
do_extract() {
|
|
mkdir -p ${DESTDIR}
|
|
ar x ${XBPS_SRCDISTDIR}/google-chrome-${version}/${_filename}
|
|
}
|
|
|
|
do_install() {
|
|
tar xf data.tar.xz -C ${DESTDIR}
|
|
|
|
# Install the icons
|
|
for size in 16 24 32 48 64 128 256; do
|
|
# Create the google chrome xdg directory
|
|
mkdir -p ${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps
|
|
|
|
# Copy the google chrome icon
|
|
mv ${DESTDIR}/opt/google/chrome/product_logo_${size}.png \
|
|
${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/google-chrome.png
|
|
done
|
|
|
|
# Remove unused icons
|
|
rm ${DESTDIR}/opt/google/chrome/*.xpm
|
|
|
|
# Remove the Debian/Ubuntu crontab
|
|
rm -rf ${DESTDIR}/etc
|
|
rm -rf ${DESTDIR}/opt/google/chrome/cron
|
|
}
|
|
|
|
post_install() {
|
|
curl ${_licenseUrl} | html2text >> google-chrome-eula.md
|
|
vlicense google-chrome-eula.md
|
|
}
|