diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | blinker.sh | 11 |
3 files changed, 20 insertions, 21 deletions
@@ -4,7 +4,7 @@ pkgbase = blinker-git pkgrel = 1 url = https://github.com/mrkpatchaa/blinker arch = x86_64 - license = custom:CC0-1.0 + license = CC0-1.0 makedepends = gendesk makedepends = git makedepends = nvm @@ -14,9 +14,9 @@ pkgbase = blinker-git provides = blinker=2.1.1.r0.g9ad8ce7 conflicts = blinker options = !emptydirs - source = blinker::git+https://github.com/mrkpatchaa/blinker.git + source = blinker.git::git+https://github.com/mrkpatchaa/blinker.git source = blinker.sh sha256sums = SKIP - sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf + sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014 pkgname = blinker-git @@ -7,7 +7,7 @@ pkgrel=1 pkgdesc="Inspired by the 20 20 20 rule, this is a little reminder to look 20 feet away from your screen every 20 minutes. Keep your eyes healthy, reduce eye strain, prevent headaches and increase productivity." arch=("x86_64") url="https://github.com/mrkpatchaa/blinker" -license=("custom:CC0-1.0") +license=("CC0-1.0") provides=("${pkgname%-git}=${pkgver}") conflicts=("${pkgname%-git}") depends=( @@ -21,14 +21,14 @@ makedepends=( 'npm' ) source=( - "${pkgname%-git}::git+${url}.git" + "${pkgname//-/.}::git+${url}.git" "${pkgname%-git}.sh" ) options=('!emptydirs') sha256sums=('SKIP' - '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf') + '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014') pkgver() { - cd "${srcdir}/${pkgname%-git}" + cd "${srcdir}/${pkgname//-/.}" git describe --long --tags --exclude='*[a-z][a-z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' } _ensure_local_nvm() { @@ -40,24 +40,26 @@ _ensure_local_nvm() { build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-git}|g" \ - -e "s|@appasar@|app|g" \ + -e "s|@runname@|app|g" \ -i "${srcdir}/${pkgname%-git}.sh" _ensure_local_nvm - gendesk -q -f -n --categories "Utility" --name "${pkgname%-git}" --exec "${pkgname%-git}" - cd "${srcdir}/${pkgname%-git}" + gendesk -q -f -n --categories "Utility" --name "${pkgname%-git}" --exec "${pkgname%-git} %U" + cd "${srcdir}/${pkgname//-/.}" export npm_config_build_from_source=true export npm_config_cache="${srcdir}/.npm_cache" export ELECTRON_SKIP_BINARY_DOWNLOAD=1 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')" export ELECTRONVERSION="${_electronversion}" + export ELECTRONVERSION="${_electronversion}" + export npm_config_disturl="https://electronjs.org/headers" npm ci npm run package } package() { install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}" install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}" - cp -r "${srcdir}/${pkgname%-git}/out/com.mrkpatchaa.${pkgname%-git}/${pkgname%-git}-linux-"*/resources/app "${pkgdir}/usr/lib/${pkgname%-git}" - install -Dm644 "${srcdir}/${pkgname%-git}/eye.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png" + cp -r "${srcdir}/${pkgname//-/.}/out/com.mrkpatchaa.${pkgname%-git}/${pkgname%-git}-linux-"*/resources/app "${pkgdir}/usr/lib/${pkgname%-git}" + install -Dm644 "${srcdir}/${pkgname//-/.}/eye.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png" install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications" - install -Dm644 "${srcdir}/${pkgname%-git}/out/com.mrkpatchaa.${pkgname%-git}/${pkgname%-git}-linux-"*/LICENSE* -t "${pkgdir}/usr/share/licenses/${pkgname}" -}
\ No newline at end of file + install -Dm644 "${srcdir}/${pkgname//-/.}/out/com.mrkpatchaa.${pkgname%-git}/${pkgname%-git}-linux-"*/LICENSE* -t "${pkgdir}/usr/share/licenses/${pkgname}" +} diff --git a/blinker.sh b/blinker.sh index c77c53567639..f9ced1432cfc 100644 --- a/blinker.sh +++ b/blinker.sh @@ -1,17 +1,14 @@ #!/bin/sh set -e _APPDIR="/usr/lib/@appname@" -_ASAR="${_APPDIR}/@appasar@" +_RUNNAME="${_APPDIR}/@runname@" export PATH="${_APPDIR}:${PATH}" export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" export ELECTRON_IS_DEV=0 export NODE_ENV=production +cd "${_APPDIR}" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - cd "${_APPDIR}" - exec electron@electronversion@ "${_ASAR}" "$@" - exit + exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $? else - cd "${_APPDIR}" - exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" - exit + exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $? fi
\ No newline at end of file |