64 lines
2.0 KiB
Makefile

PORTNAME= chrome
PORTVERSION= ${CHROME_VER}
CATEGORIES= www linux
MASTER_SITES= https://dl.google.com/linux/chrome/rpm/stable/x86_64/
PKGNAMEPREFIX= linux-
DISTNAME= google-${PORTNAME}-stable-${CHROME_VER}-${CHROME_BUILD}
#DISTFILES_aarch64?= ${DISTNAME:S/$/${EXTRACT_SUFX_aarch64}/}
DISTFILES_amd64?= ${DISTNAME:S/$/${EXTRACT_SUFX_amd64}/}
EXTRACT_ONLY?= ${DISTFILES_${ARCH}:C/:[^:]+$//}
MAINTAINER= emulation@FreeBSD.org
COMMENT= Google web browser based on WebKit
WWW= https://www.chromium.org/Home
LICENSE= BSD3CLAUSE LGPL21 MPL11
LICENSE_COMB= multi
RUN_DEPENDS= linux-rl9-wget>0:ftp/linux-rl9-wget \
linux-rl9-gnupg2>0:security/linux-rl9-gnupg \
update-mime-database:misc/shared-mime-info
USES= cpe desktop-file-utils gnome linux:rl9 shared-mime-info shebangfix
USE_LINUX= alsalib alsa-plugins-oss alsa-plugins-pulseaudio at-spi2-atk \
ca-certificates cairo cups-libs curl dbuslibs dri expat \
ffmpeg-libs gnupg gstreamer1-libav gtk3 libxkbcommon \
nspr nss p11-kit pango sqlite3 wget xorglibs
ONLY_FOR_ARCHS= amd64
SHEBANG_FILES= opt/google/chrome/google-chrome
NO_BUILD= yes
NO_WRKSUBDIR= yes
EXTRACT_SUFX_aarch64?= .aarch64.rpm
EXTRACT_SUFX_amd64?= .x86_64.rpm
REINPLACE_ARGS= -i ""
CHROME_VER?= 143.0.7499.40
CHROME_BUILD?= 1
DATADIR= ${PREFIX}/share/${PORTNAME}
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}
OPTIONS_DEFINE= DOCS
SUB_FILES= google-chrome
post-extract:
@${REINPLACE_CMD} -e 's|/usr/bin/google-chrome-stable|${LOCALBASE}/bin/google-chrome|' \
${WRKSRC}/usr/share/applications/google-chrome.desktop \
${WRKSRC}/usr/share/applications/com.google.Chrome.desktop
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/google-chrome ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC}/opt/google && ${CP} -r chrome ${STAGEDIR}${PREFIX}/share
cd ${WRKSRC}/usr/share && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/share
.for sz in 16 24 32 48 64 128 256
${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${sz}x${sz}/apps
${CP} ${STAGEDIR}${DATADIR}/product_logo_${sz}.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/${sz}x${sz}/apps/google-chrome.png
.endfor
.include <bsd.port.mk>