commit
c32acdd350
|
|
@ -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
|
||||||
Loading…
Reference in New Issue