initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 2025-11-10 14:03:26 +01:00
commit c32acdd350
2 changed files with 51 additions and 0 deletions

0
SOURCES/.gitkeeper Normal file
View File

51
SPECS/github-cli.spec Normal file
View File

@ -0,0 +1,51 @@
%define debug_package %{nil}

Name : github-cli
Version : 2.83.0
Release : 1%{?dist}
Summary : GitHubs 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