|
| 1 | +# Maintainer: Yurii Kolesnykov <[email protected]> |
| 2 | +# based on aur electron8-bin: Tom Vincent <http://tlvince.com/contact/> |
| 3 | + |
| 4 | +_projectname=electron |
| 5 | +_major=22 |
| 6 | +_pkgname="${_projectname}${_major}" |
| 7 | +pkgname="${_pkgname}"-bin |
| 8 | +_subver="3.7" |
| 9 | +_pkgver="${_major}.${_subver}" |
| 10 | +pkgver="${_pkgver/-/.}" |
| 11 | +pkgrel=1 |
| 12 | +pkgdesc="Build cross platform desktop apps with web technologies - Binary version ${_major}" |
| 13 | +arch=('x86_64' 'aarch64') |
| 14 | +url=https://electronjs.org/ |
| 15 | +license=('MIT' 'custom') |
| 16 | +depends=('c-ares' 'gtk3' 'libevent' 'nss' 'wayland') |
| 17 | +optdepends=('kde-cli-tools: file deletion support (kioclient5)' |
| 18 | + 'libappindicator-gtk3: StatusNotifierItem support' |
| 19 | + 'pipewire: WebRTC desktop sharing under Wayland' |
| 20 | + 'qt5-base: enable Qt5 with --enable-features=AllowQt' |
| 21 | + 'trash-cli: file deletion support (trash-put)' |
| 22 | + 'xdg-utils: open URLs with desktop’s default (xdg-email, xdg-open)') |
| 23 | +provides=("${_pkgname}=${pkgver}" "${_projectname}=${pkgver}") |
| 24 | +conflicts=("${_pkgname}") |
| 25 | +_releaseurl="https://github.com/${_projectname}/${_projectname}/releases/download/v${_pkgver}" |
| 26 | +source_x86_64=( |
| 27 | + "${pkgname}-chromedriver-${pkgver}-x86_64.zip::${_releaseurl}/chromedriver-v${_pkgver}-linux-x64.zip" |
| 28 | + "${pkgname}-${pkgver}-x86_64.zip::${_releaseurl}/${_projectname}-v${_pkgver}-linux-x64.zip" |
| 29 | +) |
| 30 | +source_aarch64=( |
| 31 | + "${pkgname}-chromedriver-${pkgver}-aarch64.zip::${_releaseurl}/chromedriver-v${_pkgver}-linux-arm64.zip" |
| 32 | + "${pkgname}-${pkgver}-aarch64.zip::${_releaseurl}/${_projectname}-v${_pkgver}-linux-arm64.zip" |
| 33 | +) |
| 34 | +sha256sums_x86_64=('03ac9d284f8102565981af295fc123866acf707379797655ab5bfbf7566dce00' |
| 35 | + 'a04a8e95032e13808c6da3a244739edecbdb25e34accc8a8a53db257f225a5c9') |
| 36 | +sha256sums_aarch64=('2606c9c28c7f0ed71da82d3df93407695e2eb57b00306dfdbc769e5fe39c1cdc' |
| 37 | + 'b5bbad04b7f0b646073e70d2abf5cef5708aa38f229604ca952dcc773c024609') |
| 38 | + |
| 39 | +package() { |
| 40 | + install -dm755 "${pkgdir}/usr/lib/${_pkgname}/" |
| 41 | + find . -mindepth 1 -maxdepth 1 -type f ! -name "*.zip" ! -name "LICENSE*" -exec cp -r --no-preserve=ownership --preserve=mode -t "${pkgdir}/usr/lib/${_pkgname}/." {} + |
| 42 | + |
| 43 | + for _folder in 'locales' 'resources'; do |
| 44 | + cp -r --no-preserve=ownership --preserve=mode "${_folder}/" "${pkgdir}/usr/lib/${_pkgname}/${_folder}/" |
| 45 | + done |
| 46 | + |
| 47 | + chmod u+s "${pkgdir}/usr/lib/${_pkgname}/chrome-sandbox" |
| 48 | + |
| 49 | + install -dm755 "${pkgdir}/usr/bin" |
| 50 | + ln -nfs "/usr/lib/${_pkgname}/${_projectname}" "${pkgdir}/usr/bin/${_pkgname}" |
| 51 | + |
| 52 | + for _license in 'LICENSE' 'LICENSES.chromium.html'; do |
| 53 | + install -Dm644 "${_license}" "${pkgdir}/usr/share/licenses/${pkgname}/${_license}" |
| 54 | + done |
| 55 | +} |
0 commit comments