# Maintainer: Yurii Kolesnykov # based on aur electron8-bin: Tom Vincent _projectname=electron _major=20 _pkgname="${_projectname}${_major}" pkgname="${_pkgname}"-bin _pkgver="${_major}.3.5" pkgver="${_pkgver/-/.}" pkgrel=1 pkgdesc="Build cross platform desktop apps with web technologies - binary version ${_major}" arch=('x86_64' 'aarch64') url=https://electronjs.org/ license=('MIT') provides=("${_pkgname}=${pkgver}" "${_projectname}=${pkgver}") conflicts=("${_pkgname}") depends=('c-ares' 'ffmpeg' 'gtk3' 'libevent' 'libxslt' 'minizip' 'nss' 're2' 'snappy') optdepends=('kde-cli-tools: file deletion support (kioclient5)' 'libappindicator-gtk3: StatusNotifierItem support' 'pipewire: WebRTC desktop sharing under Wayland' 'trash-cli: file deletion support (trash-put)' "xdg-utils: open URLs with desktop's default (xdg-email, xdg-open)") _releaseurl="https://github.com/${_projectname}/${_projectname}/releases/download/v${_pkgver}" source_x86_64=( "${pkgname}-chromedriver-${pkgver}-${pkgrel}-x86_64.zip::${_releaseurl}/chromedriver-v${_pkgver}-linux-x64.zip" "${pkgname}-${pkgver}-${pkgrel}-x86_64.zip::${_releaseurl}/${_projectname}-v${_pkgver}-linux-x64.zip" ) source_aarch64=( "${pkgname}-chromedriver-${pkgver}-${pkgrel}-aarch64.zip::${_releaseurl}/chromedriver-v${_pkgver}-linux-arm64.zip" "${pkgname}-${pkgver}-${pkgrel}-aarch64.zip::${_releaseurl}/${_projectname}-v${_pkgver}-linux-arm64.zip" ) sha256sums_x86_64=('2b591b2ece640c14c9850ed8c5b18cd0532c8a0c6b9c2465250dd167449e30e2' '6e84ef861c590f34724e5be18e671e202cc2f0743c6b2733edaa86b36780122a') sha256sums_aarch64=('716d4de3c1da63ea0b2c1ef0a178576180ac607c860175a28c41308e8900787c' '06f289b28e3f5925a45e0ff565c045b0ae13d96878114171aa4c25cca8bda978') 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 }