summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-07-15 13:22:12 +0800
committerzxp198210052023-07-15 13:22:12 +0800
commit320a62c97888bbb495a21dba76c312b54a32a34d (patch)
treec234a80a6e7a31b2c05ad7d57cf31fc3b9b55292
parent4935054e37351687eba04138b494fdc06c010748 (diff)
downloadaur-320a62c97888bbb495a21dba76c312b54a32a34d.tar.gz
optimized PKGBUILD
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD17
-rw-r--r--kiwiirc-desktop.sh8
3 files changed, 26 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f9de4719da9d..fc0865c6c236 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,41 +1,21 @@
pkgbase = kiwiirc-desktop-bin
pkgdesc = Next generation of the Kiwi IRC web client
pkgver = 1.6.1
- pkgrel = 1
+ pkgrel = 2
url = https://kiwiirc.com/
arch = armv7h
arch = aarch64
arch = i686
arch = x86_64
license = Apache
- depends = libxcomposite
- depends = cairo
- depends = mesa
- depends = glib2
- depends = nspr
- depends = libxkbcommon
- depends = libxext
- depends = gcc-libs
- depends = libxdamage
- depends = at-spi2-core
- depends = libdrm
- depends = expat
- depends = glibc
- depends = gtk3
- depends = libxcb
- depends = alsa-lib
- depends = dbus
- depends = gdk-pixbuf2
- depends = nss
+ depends = bash
+ depends = electron
depends = hicolor-icon-theme
- depends = libxfixes
- depends = pango
- depends = libx11
- depends = libcups
- depends = libxrandr
conflicts = kiwiirc-desktop
conflicts = kiwiirc-desktop-appimage
conflicts = kiwiirc
+ source = kiwiirc-desktop.sh
+ sha256sums = 910e669d54b87987493af8d0f44acdc97130e6e76573607f0d3150880f274a16
source_armv7h = kiwiirc-desktop-1.6.1-armv7h.deb::https://github.com/kiwiirc/kiwiirc/releases/download/v1.6.1/kiwiirc-desktop_v1.6.1-1_linux_armv7l.deb
sha256sums_armv7h = b0dfe2645072892650551e72b8327de772700a6f62db7711275247264a21fcbd
source_aarch64 = kiwiirc-desktop-1.6.1-aarch64.deb::https://github.com/kiwiirc/kiwiirc/releases/download/v1.6.1/kiwiirc-desktop_v1.6.1-1_linux_arm64.deb
diff --git a/PKGBUILD b/PKGBUILD
index 2ef6d72ff02e..89c82bdf34ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,32 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=kiwiirc-desktop-bin
pkgver=1.6.1
-pkgrel=1
+pkgrel=2
pkgdesc="Next generation of the Kiwi IRC web client"
arch=('armv7h' 'aarch64' 'i686' 'x86_64')
url="https://kiwiirc.com/"
_githuburl="https://github.com/kiwiirc/kiwiirc"
license=('Apache')
conflicts=("${pkgname%-bin}" "${pkgname%-bin}-appimage" "kiwiirc")
-depends=('libxcomposite' 'cairo' 'mesa' 'glib2' 'nspr' 'libxkbcommon' 'libxext' 'gcc-libs' 'libxdamage' 'at-spi2-core' 'libdrm' 'expat' \
- 'glibc' 'gtk3' 'libxcb' 'alsa-lib' 'dbus' 'gdk-pixbuf2' 'nss' 'hicolor-icon-theme' 'libxfixes' 'pango' 'libx11' 'libcups' 'libxrandr')
+depends=('bash' 'electron' 'hicolor-icon-theme')
source_armv7h=("${pkgname%-bin}-${pkgver}-armv7h.deb::${_githuburl}/releases/download/v${pkgver}/${pkgname%-bin}_v${pkgver}-1_linux_armv7l.deb")
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_githuburl}/releases/download/v${pkgver}/${pkgname%-bin}_v${pkgver}-1_linux_arm64.deb")
source_i686=("${pkgname%-bin}-${pkgver}-i686.deb::${_githuburl}/releases/download/v${pkgver}/${pkgname%-bin}_v${pkgver}-1_linux_i386.deb")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_githuburl}/releases/download/v${pkgver}/${pkgname%-bin}_v${pkgver}-1_linux_amd64.deb")
+source=("${pkgname%-bin}.sh")
+sha256sums=('910e669d54b87987493af8d0f44acdc97130e6e76573607f0d3150880f274a16')
sha256sums_armv7h=('b0dfe2645072892650551e72b8327de772700a6f62db7711275247264a21fcbd')
sha256sums_aarch64=('262da25b39d9d273e17c02b55418f9a28b722e142f44d4edd703e8cb8d22ee4a')
sha256sums_i686=('1d8d5f739b4664317923a3a996926d4d858ce330524f64ce95a8fd836304a134')
sha256sums_x86_64=('7b59f5d524e247447d002ede6b4fa2bdb3c31db6a0a7648ef58030c3e2edfdf6')
package() {
- bsdtar -xf "${srcdir}/data.tar.xz" -C "${pkgdir}"
+ bsdtar -xf "${srcdir}/data.tar.xz"
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/opt/Kiwi IRC/resources/app.asar" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
+ sed "s|\"/opt/Kiwi IRC/${pkgname%-bin}\" %U|/opt/${pkgname%-bin}/${pkgname%-bin}|g;s|chat|Network|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+ for _icons in 128x128 256x256 512x512;do
+ install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
+ -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
+ done
} \ No newline at end of file
diff --git a/kiwiirc-desktop.sh b/kiwiirc-desktop.sh
new file mode 100644
index 000000000000..96f36580ff14
--- /dev/null
+++ b/kiwiirc-desktop.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+_ELECTRON=/usr/bin/electron
+_ASAR="/opt/kiwiirc-desktop/kiwiirc-desktop.asar"
+if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
+ exec ${_ELECTRON} ${_ASAR} "$@"
+else
+ exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+fi \ No newline at end of file