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

47 lines
1.9 KiB
Bash
Raw Normal View History

2024-08-08 10:09:38 +08:00
pkgname=mihomo-party-electron
_pkgname=mihomo-party
pkgver=0.1.3
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:09:38 +08:00
license=('GPL3')
2024-08-08 10:28:20 +08:00
conflicts=("$_pkgname" "$_pkgname-git" "$_pkgname-bin" "$_pkgname-electron-bin")
2024-08-08 10:09:38 +08:00
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=('nodejs' 'pnpm' 'libxcrypt-compat' 'asar')
install=$_pkgname.install
2024-08-16 14:38:25 +08:00
source=(
"${_pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
2024-08-17 15:18:56 +08:00
"${_pkgname}.desktop"
2024-08-16 14:38:25 +08:00
"${_pkgname}.sh"
2024-08-16 16:53:49 +08:00
)
2024-08-16 21:02:22 +08:00
sha256sums=("52d761e9432e17477acb8adb5744676df946476e0eb5210fee2b6d45f497f218"
2024-08-17 15:18:56 +08:00
"96a6250f67517493f839f964c024434dbcf784b25a73f074bb505f1521f52844"
2024-08-16 21:02:22 +08:00
"560733f0e5bd9b47ff50c849301c8a22ae17a5df26830d8c97033dfcbd392382"
2024-08-16 16:53:49 +08:00
)
2024-08-08 10:09:38 +08:00
options=('!lto')
prepare(){
cd $srcdir/${_pkgname}-${pkgver}
pnpm install
}
build(){
cd $srcdir/${_pkgname}-${pkgver}
pnpm build:linux deb
}
package() {
asar extract $srcdir/${_pkgname}-${pkgver}/dist/linux-unpacked/resources/app.asar ${pkgdir}/opt/mihomo-party
2024-08-17 15:18:56 +08:00
cp -r $srcdir/${_pkgname}-${pkgver}/extra/sidecar ${pkgdir}/opt/mihomo-party/resources/
cp -r $srcdir/${_pkgname}-${pkgver}/extra/files ${pkgdir}/opt/mihomo-party/resources/
2024-10-16 10:58:16 +08:00
chmod +sx ${pkgdir}/opt/mihomo-party/resources/sidecar/mihomo
chmod +sx ${pkgdir}/opt/mihomo-party/resources/sidecar/mihomo-alpha
2024-09-27 21:47:55 +08:00
install -Dm755 "${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
2024-08-08 10:09:38 +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:09:38 +08:00
chown -R root:root ${pkgdir}
2024-09-26 12:40:32 +08:00
}