summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052025-01-28 11:05:46 +0800
committerzxp198210052025-01-28 11:05:46 +0800
commit3e2deea707f325f4dc7aaa649566244de5d8eca9 (patch)
tree9ce73a6106ddaaf6ddf7487e087bc43e86666ccf
parent304efd8a346c0812a44da1586c37a793c3a19342 (diff)
downloadaur-wnr-bin.tar.gz
update to 1.30.3
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD33
-rw-r--r--wnr.sh2
3 files changed, 26 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6d09866fe4d8..e15604756d79 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,19 @@
pkgbase = wnr-bin
- pkgdesc = Work/Rest Timer. Stricter. Prettier. More features.
- pkgver = 1.30.2
- pkgrel = 5
+ pkgdesc = Work/Rest Timer. Stricter. Prettier. More features.(Prebuilt version.Use system-wide electron)
+ pkgver = 1.30.3
+ pkgrel = 1
url = https://getwnr.com/
arch = x86_64
license = MPL-2.0
makedepends = fuse2
depends = electron22
- provides = wnr-1.30.2
+ provides = wnr-1.30.3
conflicts = wnr
- source = wnr-1.30.2.AppImage::https://github.com/RoderickQiu/wnr/releases/download/v1.30.2/wnr-1.30.2-Linux.AppImage
- source = LICENSE-1.30.2::https://raw.githubusercontent.com/RoderickQiu/wnr/v1.30.2/LICENSE
+ source = wnr-1.30.3.AppImage::https://github.com/RoderickQiu/wnr/releases/download/v1.30.3/wnr-1.30.3-Linux.AppImage
+ source = LICENSE-1.30.3::https://raw.githubusercontent.com/RoderickQiu/wnr/v1.30.3/LICENSE
source = wnr.sh
- sha256sums = fd774a07fb28950878f3560542157a7335e816fe0b5db908bafbdbda42e58b4c
+ sha256sums = 4390076f58252f04334954464fed9af038a537ede067721bee3f770134654a00
sha256sums = 1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5
- sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051
+ sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980
pkgname = wnr-bin
diff --git a/PKGBUILD b/PKGBUILD
index cbf6ee6d20a4..2493ab57242b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=wnr-bin
-pkgver=1.30.2
+pkgver=1.30.3
_electronversion=22
-pkgrel=5
-pkgdesc="Work/Rest Timer. Stricter. Prettier. More features. "
+pkgrel=1
+pkgdesc="Work/Rest Timer. Stricter. Prettier. More features.(Prebuilt version.Use system-wide electron)"
arch=('x86_64')
url="https://getwnr.com/"
_ghurl="https://github.com/RoderickQiu/wnr"
@@ -21,27 +21,28 @@ source=(
"LICENSE-${pkgver}::https://raw.githubusercontent.com/RoderickQiu/wnr/v${pkgver}/LICENSE"
"${pkgname%-bin}.sh"
)
-sha256sums=('fd774a07fb28950878f3560542157a7335e816fe0b5db908bafbdbda42e58b4c'
+sha256sums=('4390076f58252f04334954464fed9af038a537ede067721bee3f770134654a00'
'1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5'
- '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
-build() {
- sed -e "s|@electronversion@|${_electronversion}|" \
- -e "s|@appname@|${pkgname%-bin}|g" \
- -e "s|@runname@|app.asar|g" \
- -e "s|@cfgdirname@|${pkgname%-bin}|g" \
- -e "s|@options@||g" \
- -i "${srcdir}/${pkgname%-bin}.sh"
+ '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
+prepare() {
+ sed -e "
+ s/@electronversion@/${_electronversion}/g
+ s/@appname@/${pkgname%-bin}/g
+ s/@runname@/app.asar/g
+ s/@cfgdirname@/${pkgname%-bin}/g
+ s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/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"
- find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \;
+ sed -i "s/AppRun --no-sandbox/${pkgname%-bin}/g" "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
+ find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} +
}
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}"
- cp -r "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
+ cp -Pr --no-preserve=ownership "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-} \ No newline at end of file
+}
diff --git a/wnr.sh b/wnr.sh
index 4cfe3ac09dd8..40e422ca2ee7 100644
--- a/wnr.sh
+++ b/wnr.sh
@@ -21,7 +21,7 @@ if [[ -f "${_FLAGS_FILE}" ]]; then
fi
done < "${_FLAGS_FILE}"
fi
-cd "${_APPDIR}"
+cd "${_APPDIR}" || { echo "Failed to change directory to ${_APPDIR}"; exit 1; }
if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then
exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@"
else