This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 291
/
Copy pathPKGBUILD
57 lines (50 loc) · 1.91 KB
/
PKGBUILD
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
# Maintainer: Morten Linderud <[email protected]>
# Maintainer: Caleb Maclennan <[email protected]>
# Contributor: Eli Schwartz <[email protected]>
# Contributor: Richard Bradfield <[email protected]>
pkgname=github-cli
pkgver=2.29.0
pkgrel=1
pkgdesc="The GitHub CLI"
arch=("x86_64")
url="https://github.com/cli/cli"
license=("MIT")
depends=("glibc" "mailcap")
makedepends=("go" "git")
checkdepends=("openssh")
optdepends=("git: To interact with repositories"
"org.freedesktop.secrets: Store credentials in system keyring")
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('f77718f109ff5817cde33eb004137f58bdcd5934b921aed1440c6b3e93e1df27')
prepare() {
cd "cli-${pkgver}"
# TODO: These tests invoke the TTY and our container *really* does not like that
rm pkg/cmd/auth/login/login_test.go
# Drop tests that invoking 3rd party server processes
rm pkg/cmd/search/shared/shared_test.go \
internal/codespaces/rpc/invoker_test.go
}
build() {
cd "cli-$pkgver"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_ENABLED=0
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external"
make GH_VERSION="v$pkgver" bin/gh manpages
bin/gh completion -s bash | install -Dm644 /dev/stdin share/bash-completion/completions/gh
bin/gh completion -s zsh | install -Dm644 /dev/stdin share/zsh/site-functions/_gh
bin/gh completion -s fish | install -Dm644 /dev/stdin share/fish/vendor_completions.d/gh.fish
}
check(){
cd "cli-$pkgver"
make test
}
package() {
cd "cli-$pkgver"
make DESTDIR="${pkgdir}" prefix="/usr" install
cp -r share/ "$pkgdir"/usr
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
}