github-cli: update to 2.61.0
[void-pkg.git] / srcpkgs / github-cli / template
blobfd036b11fa8b0cf215232fa26e181312e478b498
1 # Template file for 'github-cli'
2 pkgname=github-cli
3 version=2.61.0
4 revision=1
5 build_style=go
6 build_helper=qemu
7 go_import_path="github.com/cli/cli/v2"
8 go_package="${go_import_path}/cmd/gh"
9 go_ldflags="-X github.com/cli/cli/v2/internal/build.Version=v${version}"
10 checkdepends="git openssh"
11 short_desc="GitHub CLI tool"
12 maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
13 license="MIT"
14 homepage="https://cli.github.com"
15 changelog="https://github.com/cli/cli/releases"
16 distfiles="https://github.com/cli/cli/archive/refs/tags/v${version}.tar.gz"
17 checksum=bf134281db2b65827426e3ad186de55cb04d0f92051ca2e6bd8a7d47aabe5b18
19 if [ "${XBPS_BUILD_ENVIRONMENT}" = void-packages-ci ]; then
20         make_check_args+=" -skip TestMigrationWriteErrors"
23 pre_build() {
24         local _date
25         if [ "$SOURCE_DATE_EPOCH" ]; then
26                 _date="$(date --utc --date "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d")"
27                 go_ldflags="$go_ldflags -X github.com/cli/cli/v2/internal/build.Date=${_date}"
28         fi
31 post_install() {
32         vlicense LICENSE
34         CGO_ENABLED=0 GOARCH="" go run script/build.go manpages
35         vcopy share/man usr/share
37         for shell in bash fish zsh; do
38                 vtargetrun "${DESTDIR}/usr/bin/gh" completion -s ${shell} > github-cli.${shell}
39                 vcompletion github-cli.${shell} ${shell} gh
40         done