summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-20 11:37:17 +0800
committerzxp198210052023-12-20 11:37:17 +0800
commitb1e97ea94e16be599a323a7aa596ea74b8a41dd4 (patch)
treeb83301651fe5849f683fba70ce5afd676b273048
parente4c8ed7e435729f583f8804637314612c2bf267d (diff)
downloadaur-b1e97ea94e16be599a323a7aa596ea74b8a41dd4.tar.gz
fix errors
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--bookmarks-manager.sh22
3 files changed, 27 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 81692ab384a8..ecc664b0201b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = bookmarks-manager-bin
pkgdesc = Edit bookmarks, check url.
pkgver = 0.1.2
- pkgrel = 5
+ pkgrel = 6
url = https://github.com/Hunlongyu/bookmarks-manager
arch = x86_64
license = MIT
@@ -16,10 +16,10 @@ pkgbase = bookmarks-manager-bin
provides = bookmarks-manager=0.1.2
conflicts = bookmarks-manager
source = bookmarks-manager-0.1.2.AppImage::https://github.com/Hunlongyu/bookmarks-manager/releases/download/v0.1.2/Bookmark-Manager-0.1.2.AppImage
- source = LICENSE::https://raw.githubusercontent.com/Hunlongyu/bookmarks-manager/v0.1.2/LICENSE
+ source = LICENSE-0.1.2::https://raw.githubusercontent.com/Hunlongyu/bookmarks-manager/v0.1.2/LICENSE
source = bookmarks-manager.sh
sha256sums = 05cc0f7a8c0664d47a5cb90af113729a27b63419b8dd9649caa81a46967a241f
sha256sums = c796c92731a81fb917e300438a8e5565ac96507ca0f4052fb3d8e2459e7b0f3b
- sha256sums = 9f1858df4bd9bebec9023dc07b19ea799a10ee425d1097dfa5c74de282fa49a5
+ sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
pkgname = bookmarks-manager-bin
diff --git a/PKGBUILD b/PKGBUILD
index b81d3b21b418..3681f7bc7ce1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,8 @@ _appname=bookmark
pkgname="${_appname}s-manager-bin"
_pkgname=Bookmark-Manager
pkgver=0.1.2
-pkgrel=5
+_electronversion=15
+pkgrel=6
pkgdesc="Edit bookmarks, check url."
arch=("x86_64")
url="https://github.com/Hunlongyu/bookmarks-manager"
@@ -11,7 +12,7 @@ license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'electron15'
+ "electron${_electronversion}"
'libx11'
'gdk-pixbuf2'
'libxext'
@@ -24,13 +25,17 @@ makedepends=(
)
source=(
"${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage"
- "LICENSE::https://raw.githubusercontent.com/Hunlongyu/bookmarks-manager/v${pkgver}/LICENSE"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/Hunlongyu/bookmarks-manager/v${pkgver}/LICENSE"
"${pkgname%-bin}.sh"
)
sha256sums=('05cc0f7a8c0664d47a5cb90af113729a27b63419b8dd9649caa81a46967a241f'
'c796c92731a81fb917e300438a8e5565ac96507ca0f4052fb3d8e2459e7b0f3b'
- '9f1858df4bd9bebec9023dc07b19ea799a10ee425d1097dfa5c74de282fa49a5')
+ '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|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 %U|${pkgname%-bin}|g;s|Icon=${_appname}|Icon=${pkgname%-bin}|g" \
@@ -44,5 +49,5 @@ package() {
install -Dm644 "${srcdir}/squashfs-root/${_appname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${_appname}.png" \
"${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
- install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
} \ No newline at end of file
diff --git a/bookmarks-manager.sh b/bookmarks-manager.sh
index 904c9f92bb45..c77c53567639 100644
--- a/bookmarks-manager.sh
+++ b/bookmarks-manager.sh
@@ -1,11 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron15
-APPDIR=/usr/lib/bookmarks-manager
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
+ exit
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+ exit
fi \ No newline at end of file