summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Bradfield2020-05-26 21:20:09 +0100
committerRichard Bradfield2020-05-26 21:20:09 +0100
commitad49c7e9b1d3943bd0bdcdc0fc227a81c5a35247 (patch)
treed1ed37d215e5ffb7089c7456ac442b365cd0973b
parent8bc7c61e923f4ae6cca4c0d465333c3068c4bb7c (diff)
downloadaur-ad49c7e9b1d3943bd0bdcdc0fc227a81c5a35247.tar.gz
Generate and install manpages
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD10
2 files changed, 10 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 74bbcfdb7eb9..00f6eb9dac88 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = github-cli
pkgdesc = The GitHub CLI
pkgver = 0.9.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/cli/cli
arch = x86_64
license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index aaa17ae276eb..dbdc995e2bd3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=github-cli
pkgver=0.9.0
-pkgrel=1
+pkgrel=2
pkgdesc="The GitHub CLI"
arch=("x86_64")
url="https://github.com/cli/cli"
@@ -19,6 +19,9 @@ build() {
-trimpath \
-ldflags "-extldflags ${LDFLAGS} -X github.com/cli/cli/command.Version=v${pkgver} -X github.com/cli/cli/command.BuildDate=$(date +%Y-%m-%d)" -o "bin/gh" ./cmd/gh
+ # Generate manpage
+ go run ./cmd/gen-docs --man-page --doc-path ./share/man/man1/
+
# Build shell completion files
mkdir ./_completions
bin/gh completion -s bash > ./_completions/bash
@@ -35,4 +38,9 @@ package() {
install -Dm644 "_completions/bash" "${pkgdir}/usr/share/bash-completion/completions/gh"
install -Dm644 "_completions/zsh" "${pkgdir}/usr/share/zsh/site-functions/_gh"
install -Dm644 "_completions/fish" "${pkgdir}/usr/share/fish/vendor_completions.d/gh.fish"
+
+ mkdir -p -m755 ${pkgdir}/usr/share/man/man1
+ for file in share/man/man1/*; do
+ install -Dm644 "$file" "${pkgdir}/usr/share/man/man1/"
+ done
}