# Maintainer: Yurii Kolesnykov # based on aur electron8-bin: Tom Vincent _projectname=electron _major=20 _pkgname="${_projectname}${_major}" pkgname="${_pkgname}"-bin _subver="3.12" _pkgver="${_major}.${_subver}" pkgver="${_pkgver/-/.}" pkgrel=2 pkgdesc="Build cross platform desktop apps with web technologies - Binary version ${_major}" arch=('x86_64' 'aarch64') url=https://electronjs.org/ license=('MIT' 'custom') depends=('c-ares' 'gtk3' 'libevent' 'nss' 'wayland') optdepends=('kde-cli-tools: file deletion support (kioclient5)' 'libappindicator-gtk3: StatusNotifierItem support' 'pipewire: WebRTC desktop sharing under Wayland' 'qt5-base: enable Qt5 with --enable-features=AllowQt' 'trash-cli: file deletion support (trash-put)' 'xdg-utils: open URLs with desktop’s default (xdg-email, xdg-open)') provides=("${_pkgname}=${pkgver}" "${_projectname}=${pkgver}") conflicts=("${_pkgname}") _releaseurl="https://github.com/${_projectname}/${_projectname}/releases/download/v${_pkgver}" source_x86_64=( "${pkgname}-chromedriver-${pkgver}-x86_64.zip::${_releaseurl}/chromedriver-v${_pkgver}-linux-x64.zip" "${pkgname}-${pkgver}-x86_64.zip::${_releaseurl}/${_projectname}-v${_pkgver}-linux-x64.zip" ) source_aarch64=( "${pkgname}-chromedriver-${pkgver}-aarch64.zip::${_releaseurl}/chromedriver-v${_pkgver}-linux-arm64.zip" "${pkgname}-${pkgver}-aarch64.zip::${_releaseurl}/${_projectname}-v${_pkgver}-linux-arm64.zip" ) sha256sums_x86_64=('03a2eda2689b172172da226ab6c92f26b2ea2a774429fae5a7b892ff43a43329' '3d21d14e528980327a328f6bab3195ed7bfa1cab97ab7d3dbb023e657f663244') sha256sums_aarch64=('203d0e35b468781f2cb89c2e83a11fcba56f1547740ea131f19401f6fc966973' 'fb25d52f9416bb626fc9e2b02f06d032653cfa1d96918dd13643bbd3ffcb4529') package() { install -dm755 "${pkgdir}/usr/lib/${_pkgname}/" find . -mindepth 1 -maxdepth 1 -type f ! -name "*.zip" ! -name "LICENSE*" -exec cp -r --no-preserve=ownership --preserve=mode -t "${pkgdir}/usr/lib/${_pkgname}/." {} + for _folder in 'locales' 'resources'; do cp -r --no-preserve=ownership --preserve=mode "${_folder}/" "${pkgdir}/usr/lib/${_pkgname}/${_folder}/" done chmod u+s "${pkgdir}/usr/lib/${_pkgname}/chrome-sandbox" install -dm755 "${pkgdir}/usr/bin" ln -nfs "/usr/lib/${_pkgname}/${_projectname}" "${pkgdir}/usr/bin/${_pkgname}" for _license in 'LICENSE' 'LICENSES.chromium.html'; do install -Dm644 "${_license}" "${pkgdir}/usr/share/licenses/${pkgname}/${_license}" done }