summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-07 13:17:35 +0800
committerzxp198210052023-12-07 13:17:35 +0800
commit0cc876ddf080c739d1ce1b787f089d58cf4f35e6 (patch)
treeb39670c8dcdffff2c0a6c4ab0f03caf9d95183bc
parentbc30cc7ddc5c3858b12011d5e5f13e427a683920 (diff)
downloadaur-0cc876ddf080c739d1ce1b787f089d58cf4f35e6.tar.gz
fix errors
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD30
-rw-r--r--lyricistant.sh14
3 files changed, 42 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3687f21e4d3d..f162dc11f189 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,23 @@
pkgbase = lyricistant-bin
pkgdesc = A helpful writing assistant for lyricists!
pkgver = 3.3.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/wardellbagby/lyricistant
arch = aarch64
arch = x86_64
license = GPL3
- depends = bash
depends = electron27
depends = hicolor-icon-theme
+ depends = libx11
+ depends = gdk-pixbuf2
+ depends = libxext
+ depends = libdbusmenu-glib
+ depends = gtk2
+ depends = dbus-glib
provides = lyricistant=3.3.1
conflicts = lyricistant
source = lyricistant.sh
- sha256sums = 202aa9024136008c53fdf2b8ee3ca8d3be98cd2eb083ee70886b4cef8d9c3fb0
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
source_aarch64 = lyricistant-3.3.1-aarch64.AppImage::https://github.com/wardellbagby/lyricistant/releases/download/v3.3.1%2Belectron.ios/lyricistant-linux_arm64.AppImage
sha256sums_aarch64 = 7c4defe5dd8f241ad09e2a62ef53d0e463ae050f0f22eeccc67d1316fc81dd54
source_x86_64 = lyricistant-3.3.1-x86_64.AppImage::https://github.com/wardellbagby/lyricistant/releases/download/v3.3.1%2Belectron.ios/lyricistant-linux_x86_64.AppImage
diff --git a/PKGBUILD b/PKGBUILD
index 49dd1b40766b..49d2f22a7f5f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,46 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=lyricistant-bin
pkgver=3.3.1
-pkgrel=1
+_electronversion=27
+pkgrel=2
pkgdesc="A helpful writing assistant for lyricists!"
-arch=('aarch64' 'x86_64')
+arch=(
+ 'aarch64'
+ 'x86_64'
+)
url="https://github.com/wardellbagby/lyricistant"
license=('GPL3')
-depends=('bash' 'electron27' 'hicolor-icon-theme')
+depends=(
+ "electron${_electronversion}"
+ 'hicolor-icon-theme'
+ 'libx11'
+ 'gdk-pixbuf2'
+ 'libxext'
+ 'libdbusmenu-glib'
+ 'gtk2'
+ 'dbus-glib'
+)
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.AppImage::${url}/releases/download/v${pkgver}%2Belectron.ios/${pkgname%-bin}-linux_arm64.AppImage")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.AppImage::${url}/releases/download/v${pkgver}%2Belectron.ios/${pkgname%-bin}-linux_x86_64.AppImage")
source=("${pkgname%-bin}.sh")
-sha256sums=('202aa9024136008c53fdf2b8ee3ca8d3be98cd2eb083ee70886b4cef8d9c3fb0')
+sha256sums=('8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
sha256sums_aarch64=('7c4defe5dd8f241ad09e2a62ef53d0e463ae050f0f22eeccc67d1316fc81dd54')
sha256sums_x86_64=('b1d03148affb5f54d381e69fadef8b1d55cb46d351dcdac39bad8ab1e6bed6c7')
-prepare() {
+build() {
+ sed -e "s|@electronversion@|${_electronversion}|" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" --appimage-extract > /dev/null
sed "s|AppRun --no-sandbox %U|${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}/opt/${pkgname%-bin}/resources"
+ install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${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"
for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512;do
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
diff --git a/lyricistant.sh b/lyricistant.sh
index 08db7618dcf8..2ec4412e5c4f 100644
--- a/lyricistant.sh
+++ b/lyricistant.sh
@@ -1,8 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron27
-_ASAR="/opt/lyricistant/resources/app.asar"
+set -e
+_APPDIR="/usr/lib/@appname@"
+export PATH="${_APPDIR}:${PATH}"
+export ELECTRON_IS_DEV=0
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+_ASAR="${_APPDIR}/@appasar@"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
fi \ No newline at end of file