mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-15 19:22:31 +08:00
0.2.2
This commit is contained in:
parent
2734b4b443
commit
c399e00aa4
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
|
@ -101,12 +101,6 @@ jobs:
|
|||
dist/*.deb
|
||||
dist/*.rpm
|
||||
if-no-files-found: error
|
||||
- name: Rename
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.arch == 'x64'
|
||||
run: mv dist/linux-unpacked/resources/app.asar dist/mihomo-party-linux-$(echo ${{ github.ref }} | tr -d 'refs/tags/v')-${{ matrix.arch }}.asar
|
||||
- name: Rename
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.arch == 'arm64'
|
||||
run: mv dist/linux-arm64-unpacked/resources/app.asar dist/mihomo-party-linux-$(echo ${{ github.ref }} | tr -d 'refs/tags/v')-${{ matrix.arch }}.asar
|
||||
- name: Publish Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
@ -114,7 +108,6 @@ jobs:
|
|||
files: |
|
||||
dist/*.deb
|
||||
dist/*.rpm
|
||||
dist/*.asar
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
macos:
|
||||
|
@ -169,6 +162,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
pkgname:
|
||||
- mihomo-party-electron-bin
|
||||
- mihomo-party-electron
|
||||
- mihomo-party-bin
|
||||
- mihomo-party
|
||||
|
@ -180,8 +174,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
- name: Update Version
|
||||
run: |
|
||||
sed -i "s/pkgver=.*/pkgver=$(echo ${{ github.ref }} | tr -d 'refs/tags/v')/" aur/mihomo-party-bin/PKGBUILD
|
||||
sed -i "s/pkgver=.*/pkgver=$(echo ${{ github.ref }} | tr -d 'refs/tags/v')/" aur/mihomo-party/PKGBUILD
|
||||
sed -i "s/pkgver=.*/pkgver=$(echo ${{ github.ref }} | tr -d 'refs/tags/v')/" aur/${{ matrix.pkgname }}/PKGBUILD
|
||||
- name: Update Checksums
|
||||
if: matrix.pkgname == 'mihomo-party' || matrix.pkgname == 'mihomo-party-electron'
|
||||
run: |
|
||||
|
@ -189,12 +182,14 @@ jobs:
|
|||
sed -i "s/sha256sums=.*/sha256sums=(\"$(sha256sum ./release.tar.gz | awk '{print $1}')\")/" aur/mihomo-party/PKGBUILD
|
||||
sed -i "s/sha256sums=.*/sha256sums=(\"$(sha256sum ./release.tar.gz | awk '{print $1}')\")/" aur/mihomo-party-electron/PKGBUILD
|
||||
- name: Update Checksums
|
||||
if: ${{ matrix.pkgname == 'mihomo-party-bin' }}
|
||||
if: matrix.pkgname == 'mihomo-party-bin' || matrix.pkgname == 'mihomo-party-electron-bin'
|
||||
run: |
|
||||
wget https://github.com/pompurin404/mihomo-party/releases/download/$(echo ${{ github.ref }} | tr -d 'refs/tags/')/mihomo-party-linux-$(echo ${{ github.ref }} | tr -d 'refs/tags/v')-amd64.deb -O amd64.deb
|
||||
wget https://github.com/pompurin404/mihomo-party/releases/download/$(echo ${{ github.ref }} | tr -d 'refs/tags/')/mihomo-party-linux-$(echo ${{ github.ref }} | tr -d 'refs/tags/v')-arm64.deb -O arm64.deb
|
||||
sed -i "s/sha256sums_x86_64=.*/sha256sums_x86_64=(\"$(sha256sum ./amd64.deb | awk '{print $1}')\")/" aur/mihomo-party-bin/PKGBUILD
|
||||
sed -i "s/sha256sums_aarch64=.*/sha256sums_aarch64=(\"$(sha256sum ./arm64.deb | awk '{print $1}')\")/" aur/mihomo-party-bin/PKGBUILD
|
||||
sed -i "s/sha256sums_x86_64=.*/sha256sums_x86_64=(\"$(sha256sum ./amd64.deb | awk '{print $1}')\")/" aur/mihomo-party-electron-bin/PKGBUILD
|
||||
sed -i "s/sha256sums_aarch64=.*/sha256sums_aarch64=(\"$(sha256sum ./arm64.deb | awk '{print $1}')\")/" aur/mihomo-party-electron-bin/PKGBUILD
|
||||
- name: Publish AUR package
|
||||
uses: KSXGitHub/github-actions-deploy-aur@v2.7.2
|
||||
with:
|
||||
|
|
|
@ -6,6 +6,7 @@ pkgdesc="Another Mihomo GUI."
|
|||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/pompurin404/mihomo-party"
|
||||
license=('GPL3')
|
||||
conflicts=("$_pkgname" "$_pkgname-git" "$_pkgname-electron" "$_pkgname-electron-bin")
|
||||
conflicts=("mihomo-party-git" 'mihomo-party')
|
||||
depends=('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).')
|
||||
|
|
31
aur/mihomo-party-electron-bin/PKGBUILD
Normal file
31
aur/mihomo-party-electron-bin/PKGBUILD
Normal file
|
@ -0,0 +1,31 @@
|
|||
pkgname=mihomo-party-electron-bin
|
||||
_pkgname=mihomo-party
|
||||
pkgver=0.2.2
|
||||
pkgrel=1
|
||||
pkgdesc="Another Mihomo GUI."
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/pompurin404/mihomo-party"
|
||||
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
|
||||
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")
|
||||
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
|
||||
chmod +x ${pkgdir}/opt/mihomo-party/resources/sidecar/mihomo
|
||||
chmod +x ${pkgdir}/opt/mihomo-party/resources/sidecar/mihomo-alpha
|
||||
cd ${pkgdir}/../..
|
||||
install -Dm755 "${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
|
||||
install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
|
||||
install -Dm644 "$srcdir/opt/mihomo-party/resources/icon.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${_pkgname}.png"
|
||||
|
||||
chown -R root:root ${pkgdir}
|
||||
}
|
10
aur/mihomo-party-electron-bin/mihomo-party.desktop
Normal file
10
aur/mihomo-party-electron-bin/mihomo-party.desktop
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=mihomo-party
|
||||
Exec=mihomo-party %U
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=mihomo-party
|
||||
StartupWMClass=mihomo-party
|
||||
MimeType=x-scheme-handler/clash;x-scheme-handler/mihomo;
|
||||
Comment=Mihomo Party
|
||||
Categories=Utility;
|
14
aur/mihomo-party-electron-bin/mihomo-party.install
Normal file
14
aur/mihomo-party-electron-bin/mihomo-party.install
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Colored makepkg-like functions
|
||||
note() {
|
||||
printf "${_blue}==>${_yellow} NOTE:${_bold} %s${_all_off}\n" "$1"
|
||||
}
|
||||
|
||||
_all_off="$(tput sgr0)"
|
||||
_bold="${_all_off}$(tput bold)"
|
||||
_blue="${_bold}$(tput setaf 4)"
|
||||
_yellow="${_bold}$(tput setaf 3)"
|
||||
|
||||
post_install() {
|
||||
note "Custom flags should be put directly in: ~/.config/mihomo-party-flags.conf"
|
||||
note "The launcher is called: 'mihomo-party'"
|
||||
}
|
12
aur/mihomo-party-electron-bin/mihomo-party.sh
Normal file
12
aur/mihomo-party-electron-bin/mihomo-party.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}
|
||||
|
||||
# Allow users to override command-line options
|
||||
if [[ -f "${XDG_CONFIG_HOME}/mihomo-party-flags.conf" ]]; then
|
||||
mapfile -t MIHOMO_PARTY_USER_FLAGS <<<"$(grep -v '^#' "${XDG_CONFIG_HOME}/mihomo-party-flags.conf")"
|
||||
echo "User flags:" ${MIHOMO_PARTY_USER_FLAGS[@]}
|
||||
fi
|
||||
|
||||
# Launch
|
||||
exec electron /opt/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
|
@ -6,7 +6,7 @@ pkgdesc="Another Mihomo GUI."
|
|||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/pompurin404/mihomo-party"
|
||||
license=('GPL3')
|
||||
conflicts=("mihomo-party-git" 'mihomo-party-bin' 'mihomo-party')
|
||||
conflicts=("$_pkgname" "$_pkgname-git" "$_pkgname-bin" "$_pkgname-electron-bin")
|
||||
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')
|
||||
|
|
|
@ -6,7 +6,7 @@ pkgdesc="Another Mihomo GUI."
|
|||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/pompurin404/mihomo-party"
|
||||
license=('GPL3')
|
||||
conflicts=("mihomo-party" 'mihomo-party-bin')
|
||||
conflicts=("$_pkgname" "$_pkgname-bin" "$_pkgname-electron" "$_pkgname-electron-bin")
|
||||
depends=('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' 'jq' 'libxcrypt-compat')
|
||||
|
|
|
@ -5,7 +5,7 @@ pkgdesc="Another Mihomo GUI."
|
|||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/pompurin404/mihomo-party"
|
||||
license=('GPL3')
|
||||
conflicts=("mihomo-party-git" 'mihomo-party-bin')
|
||||
conflicts=("$pkgname-git" "$pkgname-bin" "$pkgname-electron" "$pkgname-electron-bin")
|
||||
depends=('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')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mihomo-party",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "Mihomo Party",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "mihomo-party",
|
||||
|
|
Loading…
Reference in New Issue
Block a user