diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | another-redis-desktop-manager.sh | 17 |
3 files changed, 41 insertions, 26 deletions
@@ -1,20 +1,25 @@ pkgbase = another-redis-desktop-manager-bin pkgdesc = A faster, better and more stable Redis desktop manager [GUI client] pkgver = 1.6.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/qishibo/AnotherRedisDesktopManager arch = x86_64 license = MIT - makedepends = asar - depends = bash depends = electron12 + depends = libx11 + depends = gdk-pixbuf2 + depends = libxext + depends = libdbusmenu-glib + depends = gtk2 + depends = dbus-glib + depends = java-runtime provides = another-redis-desktop-manager=1.6.1 conflicts = another-redis-desktop-manager source = another-redis-desktop-manager-1.6.1.AppImage::https://github.com/qishibo/AnotherRedisDesktopManager/releases/download/v1.6.1/Another-Redis-Desktop-Manager.1.6.1.AppImage - source = LICENSE::https://raw.githubusercontent.com/qishibo/AnotherRedisDesktopManager/v1.6.1/LICENSE + source = LICENSE-1.6.1::https://raw.githubusercontent.com/qishibo/AnotherRedisDesktopManager/v1.6.1/LICENSE source = another-redis-desktop-manager.sh sha256sums = bf63908cef742f46b7d4c6b5a91593a373f88accc4f00ddb7740c527ccbfc2a3 sha256sums = 49e1afe88ff863df075233daa348d313c1f77110de7d89794a6a9ae45b38c1b3 - sha256sums = 06be6107e888b7801a147ae43f7b2ed80ed55492f72f7e940d831194400da6c3 + sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 pkgname = another-redis-desktop-manager-bin @@ -2,7 +2,8 @@ pkgname=another-redis-desktop-manager-bin _pkgname=Another-Redis-Desktop-Manager pkgver=1.6.1 -pkgrel=1 +_electronversion=12 +pkgrel=2 pkgdesc="A faster, better and more stable Redis desktop manager [GUI client]" arch=('x86_64') url="https://github.com/qishibo/AnotherRedisDesktopManager" @@ -10,34 +11,40 @@ license=('MIT') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( - 'bash' - 'electron12' + "electron${_electronversion}" + 'libx11' + 'gdk-pixbuf2' + 'libxext' + 'libdbusmenu-glib' + 'gtk2' + 'dbus-glib' + 'java-runtime' ) -makedepends=( - 'asar' +source=( + "${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}.${pkgver}.AppImage" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/qishibo/AnotherRedisDesktopManager/v${pkgver}/LICENSE" + "${pkgname%-bin}.sh" ) -source=("${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}.${pkgver}.AppImage" - "LICENSE::https://raw.githubusercontent.com/qishibo/AnotherRedisDesktopManager/v${pkgver}/LICENSE" - "${pkgname%-bin}.sh") sha256sums=('bf63908cef742f46b7d4c6b5a91593a373f88accc4f00ddb7740c527ccbfc2a3' '49e1afe88ff863df075233daa348d313c1f77110de7d89794a6a9ae45b38c1b3' - '06be6107e888b7801a147ae43f7b2ed80ed55492f72f7e940d831194400da6c3') + '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') 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}.AppImage" "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null - asar e "${srcdir}/squashfs-root/resources/app.asar" "${srcdir}/app.asar.unpacked" - cp "${srcdir}/squashfs-root/resources/app-update.yml" "${srcdir}/app.asar.unpacked/dev-app-update.yml" - asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar" sed "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" -i "${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}/app.asar" -t "${pkgdir}/usr/lib/${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}" install -Dm644 "${srcdir}/squashfs-root/swiftshader/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/swiftshader" install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/usr/lib" 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" - 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/another-redis-desktop-manager.sh b/another-redis-desktop-manager.sh index 98bd7832279c..2ec4412e5c4f 100644 --- a/another-redis-desktop-manager.sh +++ b/another-redis-desktop-manager.sh @@ -1,11 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron12 -APPDIR="/usr/lib/another-redis-desktop-manager" -export PATH="${APPDIR}:${PATH}" -export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${APPDIR}/usr/lib:${LD_LIBRARY_PATH}" -_ASAR="${APPDIR}/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 |