summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-10-30 23:56:27 +0800
committerzxp198210052023-10-30 23:56:27 +0800
commit585b41f5000fdc44b75f2f28c4b8b88ac9cdfb18 (patch)
tree048c3bd5ffb2a15440213db70ade9f3fca9d420f
parentd09c7252741cbe071e0b25af32ab323fdbe35fe3 (diff)
downloadaur-585b41f5000fdc44b75f2f28c4b8b88ac9cdfb18.tar.gz
fix errors
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD21
-rw-r--r--github-desktop-zh.sh10
3 files changed, 27 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7b8240cc0b46..d60d5819d557 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = github-desktop-zh-bin
pkgdesc = GUI for managing Git and GitHub.Chinese SC Version.Github Desktop 汉化版
pkgver = 3.3.3_linux2
- pkgrel = 1
+ pkgrel = 2
url = https://desktop.github.com
arch = aarch64
arch = armv7h
@@ -34,10 +34,12 @@ pkgbase = github-desktop-zh-bin
provides = github-desktop
conflicts = github-desktop
conflicts = github-desktop-zh-bin
- source = github-desktop-3.3.3-zh.7z::https://github.com/robotze/GithubDesktopZhTool/releases/download/3.3.3/GitHubDesktop.7z
+ source = github-desktop-3.3.4-zh.7z::https://github.com/robotze/GithubDesktopZhTool/releases/download/3.3.4/GitHubDesktop.7z
source = LICENSE::https://raw.githubusercontent.com/shiftkey/desktop/release-3.3.3-linux2/LICENSE
- sha256sums = 089b1e9396edd646ecc60f25147a0acd2b028b1ca89a73b2e13eefcf10bc45ef
+ source = github-desktop-zh.sh
+ sha256sums = 85fcc8303889100ae8c202c9f0f539a77ba9429c35c77d30a6e73ed691b21524
sha256sums = 891d678cd6aa67c0712f663b5fee690f24d11d360795300814f7bf2eb91ba530
+ sha256sums = 830ca18c25d35f6008a6cb911d9783936f9f61e61a6cd0de502237cb0548fe30
source_aarch64 = github-desktop-3.3.3_linux2-aarch64.deb::https://github.com/shiftkey/desktop/releases/download/release-3.3.3-linux2/GitHubDesktop-linux-arm64-3.3.3-linux2.deb
sha256sums_aarch64 = 2635ba8006d7b25aad2589632014869c6540b9efeaa7b7cade3cc3d211c031e1
source_armv7h = github-desktop-3.3.3_linux2-armv7h.deb::https://github.com/shiftkey/desktop/releases/download/release-3.3.3-linux2/GitHubDesktop-linux-armhf-3.3.3-linux2.deb
diff --git a/PKGBUILD b/PKGBUILD
index 4fc02105fb2a..ba0c315596a4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,9 @@ _pkgname=github-desktop
_appname=GitHubDesktop
pkgname="${_pkgname}-zh-bin"
pkgver=3.3.3_linux2
-_zhpkgver="${pkgver%_linux2}"
-pkgrel=1
+#_zhpkgver="${pkgver%_linux2}"
+_zhpkgver=3.3.4
+pkgrel=2
pkgdesc="GUI for managing Git and GitHub.Chinese SC Version.Github Desktop 汉化版"
arch=('aarch64' 'armv7h' 'x86_64')
url="https://desktop.github.com"
@@ -19,9 +20,11 @@ source_aarch64=("${_pkgname}-${pkgver}-aarch64.deb::${_githuburl}/releases/downl
source_armv7h=("${_pkgname}-${pkgver}-armv7h.deb::${_githuburl}/releases/download/release-${pkgver//_/-}/${_appname}-linux-armhf-${pkgver//_/-}.deb")
source_x86_64=("${_pkgname}-${pkgver}-x86_64.deb::${_githuburl}/releases/download/release-${pkgver//_/-}/${_appname}-linux-amd64-${pkgver//_/-}.deb")
source=("${_pkgname}-${_zhpkgver}-zh.7z::${_githubzhurl}/releases/download/${_zhpkgver}/${_appname}.7z"
- "LICENSE::https://raw.githubusercontent.com/shiftkey/desktop/release-${pkgver//_/-}/LICENSE")
-sha256sums=('089b1e9396edd646ecc60f25147a0acd2b028b1ca89a73b2e13eefcf10bc45ef'
- '891d678cd6aa67c0712f663b5fee690f24d11d360795300814f7bf2eb91ba530')
+ "LICENSE::https://raw.githubusercontent.com/shiftkey/desktop/release-${pkgver//_/-}/LICENSE"
+ "${pkgname%-bin}.sh")
+sha256sums=('85fcc8303889100ae8c202c9f0f539a77ba9429c35c77d30a6e73ed691b21524'
+ '891d678cd6aa67c0712f663b5fee690f24d11d360795300814f7bf2eb91ba530'
+ '830ca18c25d35f6008a6cb911d9783936f9f61e61a6cd0de502237cb0548fe30')
sha256sums_aarch64=('2635ba8006d7b25aad2589632014869c6540b9efeaa7b7cade3cc3d211c031e1')
sha256sums_armv7h=('c4913a8017f2a0b705b2bb0a17a1b88f7c96a9188558524bbdc68525ba161bd8')
sha256sums_x86_64=('dd252a4686243f8fea17ff6cf96d23db951658deda258fcbacbcc30fa83d1dbf')
@@ -30,13 +33,13 @@ build() {
install -Dm644 "${srcdir}/GithubDesktop汉化工具/Linux/"*.js -t "${srcdir}/usr/lib/${_pkgname}/resources/app"
echo -e "Name[zh_CN]=Github桌面版" >> "${srcdir}/usr/share/applications/${_pkgname}.desktop"
echo -e "Comment[zh_CN]=从桌面版对Github进行简单"${pkgver}"协作" >> "${srcdir}/usr/share/applications/${_pkgname}.desktop"
- sed "s|${_pkgname} %U|${pkgname%-bin} %U --no-sandbox|g;s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \
+ sed "s|${_pkgname} %U|${pkgname%-bin}|g;s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \
-i "${srcdir}/usr/share/applications/${_pkgname}.desktop"
}
package() {
- install -Dm755 -d "${pkgdir}/"{opt/"${pkgname%-bin}",usr/bin}
- cp -r "${srcdir}/usr/lib/${_pkgname}/"* "${pkgdir}/opt/${pkgname%-bin}"
- ln -sf "/opt/${pkgname%-bin}/${_pkgname}" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
+ cp -r "${srcdir}/usr/lib/${_pkgname}/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
for _icons in 32x32 64x64 128x128 256x256 512x512 1024x1024;do
diff --git a/github-desktop-zh.sh b/github-desktop-zh.sh
new file mode 100644
index 000000000000..b81a758d8714
--- /dev/null
+++ b/github-desktop-zh.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+_ELECTRON=/usr/bin/electron24
+APPDIR="/usr/lib/github-desktop-zh"
+export PATH="${APPDIR}:${PATH}"
+_ASAR="${APPDIR}/app"
+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