Package Details: time-to-leave-bin 3.0.0-7

Git Clone URL: https://aur.archlinux.org/time-to-leave-bin.git (read-only, click to copy)
Package Base: time-to-leave-bin
Description: Log work hours and get notified when it's time to leave the office and start to live.Use system-wide electron.
Upstream URL: http://timetoleave.app/
Keywords: electron notified
Licenses: GPL-3.0-only
Conflicts: time-to-leave
Provides: time-to-leave
Submitter: zxp19821005
Maintainer: zxp19821005
Last Packager: zxp19821005
Votes: 0
Popularity: 0.000000
First Submitted: 2023-05-11 07:35 (UTC)
Last Updated: 2024-09-24 02:37 (UTC)

Dependencies (1)

Required by (0)

Sources (2)

Latest Comments

zxp19821005 commented on 2024-09-26 02:39 (UTC)

@joaomorenorf I've wrote a new PKGBUILD file, build from source as https://github.com/thamara/time-to-leave/blob/main/.github/workflows/Release.yml, but get the same condition:

# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=time-to-leave
_pkgname="Time to Leave"
pkgver=3.0.0
_electronversion=11
_nodeversion=18
pkgrel=1
pkgdesc="Log work hours and get notified when it's time to leave the office and start to live.Use system-wide electron."
arch=('any')
url="http://timetoleave.app/"
_ghurl="https://github.com/thamara/time-to-leave"
license=('GPL-3.0-only')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}=${pkgver%.r*}")
depends=(
    "electron${_electronversion}"
)
makedepends=(
    'gendesk'
    'npm'
    'nvm'
    'git'
    'curl'
    'node-gyp'
    'gcc'
    'cmake'
)
source=(
    "${pkgname%-git}.git::git+${_ghurl}#tag=${pkgver}"
    "${pkgname%-git}.sh"
)
sha256sums=('6ad2a3c1f8c79c51bfdee63d007159ffdd3968076b02aeda3162a9524b8fff1d'
            '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
_ensure_local_nvm() {
    local NVM_DIR="${srcdir}/.nvm"
    source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
    nvm install "${_nodeversion}"
    nvm use "${_nodeversion}"
}
build() {
    sed -e "
        s/@electronversion@/${_electronversion}/
        s/@appname@/${pkgname%-git}/
        s/@runname@/app.asar/
        s/@cfgdirname@/${_pkgname}/
        s/@options@//
    " -i "${srcdir}/${pkgname%-git}.sh"
    _ensure_local_nvm
    gendesk -q -f -n --pkgname="${pkgname%-git}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${pkgname%-git}" --exec="${pkgname%-git} %U"
    cd "${srcdir}/${pkgname%-git}.git"
    #export ELECTRON_SKIP_BINARY_DOWNLOAD=1
    export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
    HOME="${srcdir}/.electron-gyp"
    {
        echo -e '\n'    
        #echo 'build_from_source=true'
        echo "cache=${srcdir}/.npm_cache"
        if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
            echo 'registry=https://registry.npmmirror.com'
            echo 'disturl=https://registry.npmmirror.com/-/binary/node/'
            echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
            echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
        fi
    } >> .npmrc
    sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/" package.json
    NODE_ENV=development    npm install
    NODE_ENV=development    npm install -D npm-force-resolutions@0.0.10
    NODE_ENV=production     npx electron-packager . "${pkgname}" --overwrite --asar --platform=linux \
                                --icon=assets/icon-deb.png --prune=true --out=release \
                                --ignore=__tests__ --ignore=tests --ignore=./scripts --ignore=Resources \
                                --ignore=website --ignore=release-builds --ignore=packages --ignore=coverage_jest \
                                --ignore=.nyc_output --ignore=__mocks__ --ignore=docs
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
    install -Dm644 "${srcdir}/${pkgname%-git}.git/release/${pkgname%-git}-linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-git}"
    install -Dm644 "${srcdir}/${pkgname%-git}.git/release/${pkgname%-git}-linux-"*/swiftshader/* -t "${pkgdir}/usr/lib/${pkgname%-git}/swiftshader"
    install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dm644 "${srcdir}/${pkgname%-git}.git/assets/icon-deb.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
    install -Dm644 "${srcdir}/${pkgname%-git}.git/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

joaomorenorf commented on 2024-09-25 21:54 (UTC)

Hi zxp19821005, I believe the problem is here unfortunately. I ran using the same version directly from source code and it worked.

git checkout tags/stable/v3.0.0 npm install npm start

zxp19821005 commented on 2024-09-24 02:38 (UTC)

@joaomorenorf This is what happens when the source code runs, and I suggest you feed it back upstream.

joaomorenorf commented on 2024-09-23 18:17 (UTC)

The application only loads the toolbar and displays variable names instead of the expected content, all pages are blank.