From c32acdd35093d4aff2996b1558801fe94562f682 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Mon, 10 Nov 2025 14:03:26 +0100 Subject: [PATCH] initial package creation Signed-off-by: Toshaan Bharvani --- SOURCES/.gitkeeper | 0 SPECS/github-cli.spec | 51 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 SOURCES/.gitkeeper create mode 100644 SPECS/github-cli.spec diff --git a/SOURCES/.gitkeeper b/SOURCES/.gitkeeper new file mode 100644 index 0000000..e69de29 diff --git a/SPECS/github-cli.spec b/SPECS/github-cli.spec new file mode 100644 index 0000000..a7b811c --- /dev/null +++ b/SPECS/github-cli.spec @@ -0,0 +1,51 @@ +%define debug_package %{nil} + +Name : github-cli +Version : 2.83.0 +Release : 1%{?dist} +Summary : GitHub’s official command line tool +Group : System/Web +License : MIT License +URL : https://github.com/cli/cli +BuildRequires : golang +BuildRequires : git +Requires : git + + +%description +gh is GitHub on the command line. +It brings pull requests, issues, and other GitHub concepts to the terminal next to where you are already working with git and your code. + + +%prep +%setup -T -q -c %{name}-%{version} +mkdir go +export GOPATH=`pwd`/go +export GO111MODULE=on +mkdir src +cd src +git clone https://github.com/cli/cli +cd cli +git checkout tags/v%{version} + + +%build +export GOPATH=`pwd`/go +export GO111MODULE=on +cd src/cli +git checkout tags/v%{version} +export SHORTCOMMIT=$(git rev-parse --short HEAD) +export BUILDDATE=$(date +%Y%m%d) +go build -v -trimpath -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X github.com/cli/cli/v2/internal/build.Version="%{version}" -X github.com/cli/cli/v2/internal/build.Date="$BUILDDATE -o cli ./cmd/gh + + +%install +install -p -D -m 0755 src/cli/cli %{buildroot}%{_bindir}/github-cli + + +%files +%doc +%{_bindir}/github-cli + + +%changelog