# Maintainer: Yurii Kolesnykov # based on aur electron8-bin: Tom Vincent _projectname=electron _major=17 _pkgname="${_projectname}${_major}" pkgname="${_pkgname}"-bin _pkgver="${_major}.4.4" pkgver="${_pkgver/-/.}" pkgrel=1 pkgdesc="Build cross platform desktop apps with web technologies - binary version ${_major}" arch=('x86_64' 'i686' 'armv7h' '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_i686=( "${pkgname}-chromedriver-${pkgver}-${pkgrel}-i686.zip::${_releaseurl}/chromedriver-v${_pkgver}-linux-ia32.zip" "${pkgname}-${pkgver}-${pkgrel}-i686.zip::${_releaseurl}/${_projectname}-v${_pkgver}-linux-ia32.zip" ) source_armv7h=( "${pkgname}-chromedriver-${pkgver}-${pkgrel}-armv7h.zip::${_releaseurl}/chromedriver-v${_pkgver}-linux-armv7l.zip" "${pkgname}-${pkgver}-${pkgrel}-armv7h.zip::${_releaseurl}/${_projectname}-v${_pkgver}-linux-armv7l.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=('997caca6b3b108b8312595ddb9e484ecdb278f66c0138530e1fce0095107eddf' 'eec75000c24a206f6c03ee6abeb237ed80da28daec9403c4fbb8a122eaa8e4f7') sha256sums_i686=('b5eb3877600ced4bc100f0f37881d0fffd4ab129c2363b63417162fab8880072' 'e17a3315123bb33a3ddbc0de4d22893583d9c4638f00a352d952f7b94a629b61') sha256sums_armv7h=('111b2a96f18ef77126ff87ef0976f4edb97fec2efc1078e693c30b188f895159' '441bf5cf0a9f5e1676542ad41ac1641883a3a3bf14689c91f0a4a88c576aea40') sha256sums_aarch64=('b1fe1554f80a1a85c168adcd9180759155b812df75748c068e16178414add6e6' '35175f129f47a230ac8de313bb6b428c48b60b968f38ac290cfda60dbf27ce0c') 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' 'swiftshader'; 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 }