mihomo-party/aur/mihomo-party-electron-bin/PKGBUILD

38 lines
2.0 KiB
Bash
Raw Normal View History

2024-08-08 10:28:20 +08:00
pkgname=mihomo-party-electron-bin
_pkgname=mihomo-party
pkgver=0.2.2
pkgrel=1
pkgdesc="Another Mihomo GUI."
arch=('x86_64' 'aarch64')
2024-09-13 20:24:52 +08:00
url="https://github.com/mihomo-party-org/mihomo-party"
2024-08-08 10:28:20 +08:00
license=('GPL3')
conflicts=("$_pkgname" "$_pkgname-git" "$_pkgname-bin" "$_pkgname-electron")
depends=('electron' 'gtk3' 'libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'at-spi2-core' 'util-linux-libs' 'libsecret')
optdepends=('libappindicator-gtk3: Allow mihomo-party to extend a menu via Ayatana indicators in Unity, KDE or Systray (GTK+ 3 library).')
makedepends=('asar')
install=$_pkgname.install
2024-08-17 15:18:56 +08:00
source=("${_pkgname}.desktop" "${_pkgname}.sh")
2024-08-08 10:28:20 +08:00
source_x86_64=("${_pkgname}-${pkgver}-x86_64.deb::${url}/releases/download/v${pkgver}/mihomo-party-linux-${pkgver}-amd64.deb")
source_aarch64=("${_pkgname}-${pkgver}-aarch64.deb::${url}/releases/download/v${pkgver}/mihomo-party-linux-${pkgver}-arm64.deb")
2024-08-17 15:18:56 +08:00
sha256sums=(
"96a6250f67517493f839f964c024434dbcf784b25a73f074bb505f1521f52844"
"560733f0e5bd9b47ff50c849301c8a22ae17a5df26830d8c97033dfcbd392382"
)
2024-08-08 10:28:20 +08:00
sha256sums_x86_64=("43f8b9a5818a722cdb8e5044d2a90993274860b0da96961e1a2652169539ce39")
sha256sums_aarch64=("18574fdeb01877a629aa52ac0175335ce27c83103db4fcb2f1ad69e3e42ee10f")
options=('!lto')
package() {
bsdtar -xf data.tar.xz -C $srcdir
asar extract $srcdir/opt/mihomo-party/resources/app.asar ${pkgdir}/opt/mihomo-party
2024-08-19 12:40:05 +08:00
cp -r $srcdir/opt/mihomo-party/resources/sidecar ${pkgdir}/opt/mihomo-party/resources/
cp -r $srcdir/opt/mihomo-party/resources/files ${pkgdir}/opt/mihomo-party/resources/
2024-08-08 10:28:20 +08:00
chmod +x ${pkgdir}/opt/mihomo-party/resources/sidecar/mihomo
chmod +x ${pkgdir}/opt/mihomo-party/resources/sidecar/mihomo-alpha
2024-09-29 20:55:41 +08:00
install -Dm755 "${srcdir}/${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
2024-08-08 10:28:20 +08:00
install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
2024-08-19 12:40:05 +08:00
install -Dm644 "${pkgdir}/opt/mihomo-party/resources/icon.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${_pkgname}.png"
2024-08-08 10:28:20 +08:00
chown -R root:root ${pkgdir}
2024-09-26 12:40:32 +08:00
}