diff options
author | zxp19821005 | 2024-03-28 18:00:32 +0800 |
---|---|---|
committer | zxp19821005 | 2024-03-28 18:00:32 +0800 |
commit | 13ef684b36922b2ebbff583660823be3fafe1f43 (patch) | |
tree | 07ceaf969b8e57963acea6ae8043ae3e5361f0e6 | |
download | aur-13ef684b36922b2ebbff583660823be3fafe1f43.tar.gz |
update to 0.9.23
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | timetracker.sh | 16 |
3 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..75f783df37ad --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = timetracker-bin + pkgdesc = An application to track your work time ⏰ + pkgver = 0.9.23 + pkgrel = 1 + url = https://github.com/DerKommentator/time-tracker + arch = x86_64 + license = GPL-3.0-only + makedepends = fuse2 + depends = electron26-bin + provides = timetracker=0.9.23 + conflicts = timetracker + source = timetracker-0.9.23.AppImage::https://github.com/DerKommentator/time-tracker/releases/download/v0.9.23/TimeTracker-0.9.23-linux-x86_64.AppImage + source = timetracker.sh + sha256sums = c3a1ee06359e4483b5acc3bacb6e9e129b73880af8bccb99c47383b9b1e6cd0e + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + +pkgname = timetracker-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e6b852f85c6e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=timetracker-bin +_pkgname=TimeTracker +pkgver=0.9.23 +_electronversion=26 +pkgrel=1 +pkgdesc="An application to track your work time ⏰" +arch=('x86_64') +url="https://github.com/DerKommentator/time-tracker" +license=('GPL-3.0-only') +provides=("${pkgname%-bin}=${pkgver}") +conflicts=("${pkgname%-bin}") +depends=( + "electron${_electronversion}-bin" +) +makedepends=( + 'fuse2' +) +source=( + "${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-linux-${CARCH}.AppImage" + "${pkgname%-bin}.sh" +) +sha256sums=('c3a1ee06359e4483b5acc3bacb6e9e129b73880af8bccb99c47383b9b1e6cd0e' + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') +build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@runname@|app.asar|g" \ + -e "s|@options@||g" \ + -i "${srcdir}/${pkgname%-bin}.sh" + chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" + "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null + sed "s|AppRun --no-sandbox|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" + install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" +}
\ No newline at end of file diff --git a/timetracker.sh b/timetracker.sh new file mode 100644 index 000000000000..7ddcaab8d734 --- /dev/null +++ b/timetracker.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +_APPDIR="/usr/lib/@appname@" +_RUNNAME="${_APPDIR}/@runname@" +_OPTIONS="@options@" +export PATH="${_APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +export ELECTRON_IS_DEV=0 +export ELECTRON_FORCE_IS_PACKAGED=true +export NODE_ENV=production +cd "${_APPDIR}" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +else + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? +fi
\ No newline at end of file |