diff options
author | Luke Arms | 2022-02-28 14:21:16 +1100 |
---|---|---|
committer | Luke Arms | 2022-02-28 14:21:16 +1100 |
commit | 8b96473f4e1d5cd1f122ab076d9642bc91400f50 (patch) | |
tree | abd89ba0bcbb6ba52d95ceabfcee57f77214a11c | |
parent | 1ae1ca208ced9425b5508cd4b6cf2d3f9d4b198f (diff) | |
download | aur-8b96473f4e1d5cd1f122ab076d9642bc91400f50.tar.gz |
Reinstate electron dependency (break screen issue fixed)
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 43 |
2 files changed, 23 insertions, 24 deletions
@@ -1,6 +1,6 @@ pkgbase = stretchly-git pkgdesc = The break time reminder app - pkgver = 1068.6392f38 + pkgver = 1084.5bb8047 pkgrel = 1 url = https://github.com/hovancik/stretchly/ arch = any @@ -20,6 +20,8 @@ pkgbase = stretchly-git depends = libsecret depends = libappindicator-gtk3 depends = libxcrypt-compat + depends = electron>=17 + depends = electron<18 provides = stretchly conflicts = stretchly conflicts = stretchly-bin @@ -2,19 +2,13 @@ pkgname=stretchly-git _pkgname=${pkgname%-git} -pkgver=1068.6392f38 +pkgver=1084.5bb8047 pkgrel=1 pkgdesc="The break time reminder app" arch=('any') url="https://github.com/hovancik/stretchly/" license=('BSD') -# 'electron' has been temporarily removed to mitigate an issue where Stretchly -# break windows render without colour or text, so Electron is packaged with -# Stretchly for now. See: -# - https://github.com/hovancik/stretchly/issues/1048 -# - https://github.com/electron/electron/issues/32133 -depends=('gtk3' 'libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'at-spi2-atk' 'util-linux-libs' 'libsecret' 'libappindicator-gtk3' 'libxcrypt-compat') -#depends=('gtk3' 'libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'at-spi2-atk' 'util-linux-libs' 'libsecret' 'libappindicator-gtk3' 'libxcrypt-compat' 'electron') +depends=('gtk3' 'libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'at-spi2-atk' 'util-linux-libs' 'libsecret' 'libappindicator-gtk3' 'libxcrypt-compat' 'electron>=17' 'electron<18') makedepends=('git' 'nvm' 'jq' 'python') provides=("$_pkgname") conflicts=("$_pkgname" "${_pkgname}-bin") @@ -56,30 +50,33 @@ build() { # electron-builder only generates /usr/share/* assets for target package # types 'apk', 'deb', 'freebsd', 'p5p', 'pacman', 'rpm' and 'sh', so build a # pacman package and unpack it - local _outfile _appname _unpackdir=${srcdir}/${_pkgname}.unpacked + local _outfile _appname _electron _unpackdir=${srcdir}/${_pkgname}.unpacked _outfile=dist/$(jq -r '"\(.name)-\(.version)"' package.json).pacman _appname=$(jq -r .name package.json) + _electron=${_unpackdir}/opt/${_appname}/${_pkgname} rm -Rf "${_unpackdir}" mkdir -p "${_unpackdir}" local i686=ia32 x86_64=x64 ./node_modules/.bin/electron-builder build \ --linux pacman \ - --"${!CARCH}" + --"${!CARCH}" \ + -c.electronDist=/usr/lib/electron \ + -c.electronVersion="$(</usr/lib/electron/version)" tar -C "${_unpackdir}" -Jxf "${_outfile}" - #local _electron=${_unpackdir}/opt/${_appname}/${_pkgname} - #echo "Deleting Electron ($(du -h "$_electron" | awk '{print $1}'))..." >&2 - #rm -v "$_electron" - ## Replace absolute path in desktop entry - #sed -Ei "s/^(Exec=).*/\1stretchly/" \ - # "${_unpackdir}/usr/share/applications/${_pkgname}.desktop" + + echo "Deleting Electron ($(du -h "$_electron" | awk '{print $1}'))..." >&2 + rm -v "$_electron" + + # Replace absolute path in desktop entry + sed -Ei "s/^(Exec=).*/\1stretchly/" \ + "${_unpackdir}/usr/share/applications/${_pkgname}.desktop" + # Create /usr/bin/stretchly - #install -D -m 0755 /dev/null "${_unpackdir}/usr/bin/stretchly" - #cat >"${_unpackdir}/usr/bin/stretchly" <<EOF - ##!/bin/sh - #exec electron '/opt/$(sed -E "s/'/'\\\\''/g" <<<"${_appname}")/resources/app.asar' "\$@" - #EOF - install -d "${_unpackdir}/usr/bin" - ln -s "/opt/${_appname}/stretchly" "${_unpackdir}/usr/bin/stretchly" + install -D -m 0755 /dev/null "${_unpackdir}/usr/bin/stretchly" + cat >"${_unpackdir}/usr/bin/stretchly" <<EOF +#!/bin/sh +exec electron '/opt/$(sed -E "s/'/'\\\\''/g" <<<"${_appname}")/resources/app.asar' "\$@" +EOF } package() { |