blob: 899d32509ece96d9922dc2f74b78d36ec113328b (
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
75
|
# Maintainer: Local package maintainer
pkgname=github-copilot-bin
pkgver=1.0.25
pkgrel=1
pkgdesc="GitHub Copilot desktop application"
arch=('x86_64' 'aarch64')
url="https://github.com/github/app"
license=('LicenseRef-GitHub-Proprietary')
depends=(
'alsa-lib'
'gtk3'
'hicolor-icon-theme'
'libayatana-appindicator'
'libcurl-gnutls'
'libpulse'
'openssl'
'webkit2gtk-4.1'
)
makedepends=(
'binutils'
'patchelf'
)
provides=(
'github-copilot'
)
conflicts=(
'github-copilot'
)
options=(!debug !strip)
source=(
'LICENSE'
)
source_x86_64=(
"github-copilot-${pkgver}-x86_64.deb::https://github.com/github/app/releases/download/v${pkgver}/GitHub-Copilot-linux-x64.deb"
)
source_aarch64=(
"github-copilot-${pkgver}-aarch64.deb::https://github.com/github/app/releases/download/v${pkgver}/GitHub-Copilot-linux-arm64.deb"
)
noextract=(
"github-copilot-${pkgver}-x86_64.deb"
"github-copilot-${pkgver}-aarch64.deb"
)
sha256sums=('3d31debed26a6d19a50965aad60931cb83ef000bcc5340aa693d772e539a73f2')
sha256sums_x86_64=('cbbfccb2cb06832cb0ce72d3f624a6df683a096b070260a892f6df3fe7135ce0')
sha256sums_aarch64=('e8522e861748b778e459e75d228da265d8652ed7896703810a19c3aa4e5db833')
package() {
local deb="${srcdir}/github-copilot-${pkgver}-${CARCH}.deb"
local desktop_file="${pkgdir}/usr/share/applications/GitHub Copilot.desktop"
ar p "$deb" data.tar.zst |
tar --no-same-owner --zstd -xf - -C "$pkgdir"
if [[ ! -x "${pkgdir}/usr/bin/github" ]]; then
printf 'Upstream github binary is missing\n' >&2
return 1
fi
if [[ ! -x "${pkgdir}/usr/bin/git-credential-copilot" ]]; then
printf 'Upstream git-credential-copilot binary is missing\n' >&2
return 1
fi
if [[ ! -f "$desktop_file" ]]; then
printf 'Upstream desktop entry is missing\n' >&2
return 1
fi
patchelf --set-rpath '$ORIGIN' \
"${pkgdir}/usr/lib/GitHub Copilot/Microsoft.AI.Foundry.Local.Core.so"
install -Dm644 "${srcdir}/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|