blob: 1f0d73cea660e2add989acc0e63994c2308cdbe9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_pkgname=github-desktop
_appname="GitHub Desktop"
pkgname="${_pkgname}-zh-bin"
pkgver=3.4.8_linux1
#_zhpkgver="${pkgver%_linux2}"
_zhpkgver=3.4.9
_electronversion=30
pkgrel=2
pkgdesc="GUI for managing Git and GitHub.Chinese SC Version.(Use system-wide electron).Github Desktop 汉化版."
arch=(
'aarch64'
'armv7h'
'x86_64'
)
url="https://desktop.github.com"
_ghurl="https://github.com/shiftkey/desktop"
_ghzhurl="https://github.com/robotze/GithubDesktopZhTool"
license=('MIT')
provides=("${_pkgname}")
conflicts=(
"${_pkgname}"
"${pkgname%-bin}"
)
depends=(
"electron${_electronversion}"
'libsecret'
'perl'
'curl'
'expat'
)
options=('!strip')
source_aarch64=("${_pkgname}-${pkgver}-aarch64.rpm::${_ghurl}/releases/download/release-${pkgver//_/-}/${_appname// /}-linux-aarch64-${pkgver//_/-}.rpm")
source_armv7h=("${_pkgname}-${pkgver}-armv7h.rpm::${_ghurl}/releases/download/release-${pkgver//_/-}/${_appname// /}-linux-armv7l-${pkgver//_/-}.rpm")
source_x86_64=("${_pkgname}-${pkgver}-x86_64.rpm::${_ghurl}/releases/download/release-${pkgver//_/-}/${_appname// /}-linux-x86_64-${pkgver//_/-}.rpm")
source=(
"${_pkgname}-${_zhpkgver}-zh.7z::${_ghzhurl}/releases/download/${_zhpkgver}/${_appname// /}.7z"
"LICENSE-${pkgver}::https://raw.githubusercontent.com/shiftkey/desktop/release-${pkgver//_/-}/LICENSE"
"${pkgname%-bin}.sh"
)
sha256sums=('6bcb0454cc08a0b6b552fcc94fcb984393cd5a646c4d89d96b6550dc30a28c33'
'891d678cd6aa67c0712f663b5fee690f24d11d360795300814f7bf2eb91ba530'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
sha256sums_aarch64=('dded19a62f087d179f9676c6f900a8f23edfe9dc0df960b70c6972b0be84b3c3')
sha256sums_armv7h=('0cb4db9152f7a17a394f147b4bb955b41777540f1c00a4c41dc07493e8083231')
sha256sums_x86_64=('df0d8f3482021770aa7fd2790232c5a199cd8e0ec0519320495791184132348c')
build() {
sed -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app/g
s/@cfgdirname@/${_pkgname}/g
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
" -i "${srcdir}/${pkgname%-bin}.sh"
install -Dm644 "${srcdir}/GithubDesktop汉化工具/Linux/"* -t "${srcdir}/usr/lib/${_pkgname}/resources/app"
sed -e "
5i\Name[zh_CN]=Github桌面版
6i\Comment[zh_CN]=从桌面对Github进行简单协作
s/Exec=${_pkgname}/Exec=${pkgname%-bin}/g
s/Icon=${_pkgname}/Icon=${pkgname%-bin}/g
" -i "${srcdir}/usr/share/applications/${_pkgname}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -Pr --no-preserve=ownership "${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-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
_icon_sizes=(32x32 64x64 128x128 256x256 512x512 1024x1024)
for _icons in "${_icon_sizes[@]}";do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png"
done
}
|