summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-17 23:50:25 +0800
committerzxp198210052024-01-17 23:50:25 +0800
commitfd5626dc3390bdbb479dbdbdee884a563ce38965 (patch)
tree5f84d8d6c4f9d0b9f0e8cc8ec778a799084a4993
parent79561879c52fe95ef16c43961ea817183f993658 (diff)
downloadaur-fd5626dc3390bdbb479dbdbdee884a563ce38965.tar.gz
update to 4.2.0.beta.r33.gee49660
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD27
-rw-r--r--switchhosts.sh13
3 files changed, 30 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 49f596f469e5..0dc010c9c20b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,11 @@
pkgbase = switchhosts-git
pkgdesc = An app for managing hosts file,and switch hosts quickly!
- pkgver = 4.2.0.beta.r26.g0d948d9
- pkgrel = 2
+ pkgver = 4.2.0.beta.r33.gee49660
+ pkgrel = 1
url = https://github.com/oldj/SwitchHosts
- arch = any
+ arch = aarch64
+ arch = armv7h
+ arch = x86_64
license = Apache
makedepends = gendesk
makedepends = git
@@ -13,9 +15,9 @@ pkgbase = switchhosts-git
depends = hicolor-icon-theme
provides = switchhosts
conflicts = switchhosts
- source = switchhosts::git+https://github.com/oldj/SwitchHosts.git
+ source = switchhosts.git::git+https://github.com/oldj/SwitchHosts.git
source = switchhosts.sh
sha256sums = SKIP
- sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
+ sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
pkgname = switchhosts-git
diff --git a/PKGBUILD b/PKGBUILD
index 68146c6cd102..51bb5cdb2e23 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,15 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=switchhosts-git
-pkgver=4.2.0.beta.r26.g0d948d9
+pkgver=4.2.0.beta.r33.gee49660
_electronversion=24
_nodeversion=18
-pkgrel=2
+pkgrel=1
pkgdesc="An app for managing hosts file,and switch hosts quickly!"
-arch=('any')
+arch=(
+ 'aarch64'
+ 'armv7h'
+ 'x86_64'
+)
url="https://github.com/oldj/SwitchHosts"
license=('Apache')
conflicts=("${pkgname%-git}")
@@ -21,13 +25,13 @@ makedepends=(
'npm'
)
source=(
- "${pkgname%-git}"::"git+${url}.git"
+ "${pkgname//-/.}::git+${url}.git"
"${pkgname%-git}.sh"
)
sha256sums=('SKIP'
- '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
+ 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231')
pkgver() {
- cd "${srcdir}/${pkgname%-git}"
+ cd "${srcdir}/${pkgname//-/.}"
#git describe --long --tags --exclude='*[a-z][a-z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
git describe --tags | sed 's/\w\+\///g;s/\([^-]*-g\)/r\1/;s/-/./g;s/v//g'
}
@@ -44,16 +48,17 @@ build() {
-i "${srcdir}/${pkgname%-git}.sh"
_ensure_local_nvm
gendesk -q -f -n --categories "Utility" --pkgname="${pkgname%-git}" --name="SwitchHosts" --exec="${pkgname%-git}"
- cd "${srcdir}/${pkgname%-git}"
+ cd "${srcdir}/${pkgname//-/.}"
export npm_config_build_from_source=true
export npm_config_cache="${srcdir}/.npm_cache"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
export ELECTRONVERSION="${_electronversion}"
+ sed '/deb:/d' -i scripts/make.js
npm install
npm run build
npm run make:linux
- cd "${srcdir}/${pkgname%-git}/dist/.icon-set"
+ cd "${srcdir}/${pkgname//-/.}/dist/.icon-set"
cp icon_16x16.png app_16.png
cp icon_48x48.png app_48.png
}
@@ -70,11 +75,11 @@ package() {
_architecture="linux-armv7l-unpacked"
;;
esac
- install -Dm644 "${srcdir}/${pkgname%-git}/dist/${_architecture}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-git}/"
+ install -Dm644 "${srcdir}/${pkgname//-/.}/dist/${_architecture}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-git}/"
install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
for _icons in 16 32 48 64 128 256 512;do
- install -Dm644 "${srcdir}/${pkgname%-git}/dist/.icon-set/app_${_icons}.png" \
+ install -Dm644 "${srcdir}/${pkgname//-/.}/dist/.icon-set/app_${_icons}.png" \
"${pkgdir}/usr/share/icons/hicolor/${_icons}x${_icons}/apps/${pkgname%-git}.png"
done
- install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
} \ No newline at end of file
diff --git a/switchhosts.sh b/switchhosts.sh
index 2ec4412e5c4f..aacd8f895847 100644
--- a/switchhosts.sh
+++ b/switchhosts.sh
@@ -1,14 +1,15 @@
-#!/bin/bash
+#!/bin/sh
set -e
_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
export PATH="${_APPDIR}:${PATH}"
-export ELECTRON_IS_DEV=0
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${_APPDIR}/@appasar@"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
+cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- cd "${_APPDIR}"
exec electron@electronversion@ "${_ASAR}" "$@"
else
- cd "${_APPDIR}"
exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
-fi \ No newline at end of file
+fi
+exit \ No newline at end of file