Browse Source

drone update to add drone-cli

Signed-off-by: pipelinebuilder_pel7x64builder0 <pipelinebuilder@powerel.org>
master
pipelinebuilder_pel7x64builder0 3 years ago
parent
commit
56cac09a18
  1. 29
      SPECS/drone.spec

29
SPECS/drone.spec

@ -8,6 +8,11 @@ BuildRequires: golang @@ -8,6 +8,11 @@ BuildRequires: golang
#Requires:


%description
Drone is a Continuous Delivery platform
built on Docker, written in Go.


%package server
Summary: Documentation files for %{name}
Group: Documentation
@ -29,9 +34,10 @@ Group: Controller @@ -29,9 +34,10 @@ Group: Controller
Controller for the Drone CI Server


%description
Drone is a Continuous Delivery platform
built on Docker, written in Go.
%package cli
Summary: CLI for Drone Server
%description cli
CLI For Drone CI Server


%prep
@ -39,17 +45,22 @@ built on Docker, written in Go. @@ -39,17 +45,22 @@ built on Docker, written in Go.
mkdir -p src/github.com/drone
cd src/github.com/drone
git clone https://github.com/drone/drone
git clone https://github.com/drone/drone-cli


%build
export GOPATH=`pwd`
export GO111MODULE=on
cd src/github.com/drone/drone
pushd src/github.com/drone/drone
git checkout v%{version}
export CGO_ENABLED=0
go build -v -tags 'oss nolimit' -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o drone-server github.com/drone/drone/cmd/drone-server
go build -v -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o drone-agent github.com/drone/drone/cmd/drone-agent
go build -v -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o drone-controller github.com/drone//drone/cmd/drone-controller
go build -v -tags "oss nolimit" -trimpath -ldflags "-X main.version=%{version} -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o drone-server github.com/drone/drone/cmd/drone-server
go build -v -trimpath -ldflags "-X main.version=%{version} -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o drone-agent github.com/drone/drone/cmd/drone-agent
go build -v -trimpath -ldflags "-X main.version=%{version} -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o drone-controller github.com/drone//drone/cmd/drone-controller
popd
pushd src/github.com/drone/drone-cli
go build -v -trimpath -ldflags "-X main.version=%{version} -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o drone-cli github.com/drone/drone-cli/drone
popd


%install
@ -57,6 +68,7 @@ mkdir -p %{buildroot}%{_bindir} @@ -57,6 +68,7 @@ mkdir -p %{buildroot}%{_bindir}
cp -v src/github.com/drone/drone/drone-server %{buildroot}%{_bindir}
cp -v src/github.com/drone/drone/drone-agent %{buildroot}%{_bindir}
cp -v src/github.com/drone/drone/drone-controller %{buildroot}%{_bindir}
cp -v src/github.com/drone/drone-cli/drone-cli %{buildroot}%{_bindir}


%files
@ -74,5 +86,8 @@ cp -v src/github.com/drone/drone/drone-controller %{buildroot}%{_bindir} @@ -74,5 +86,8 @@ cp -v src/github.com/drone/drone/drone-controller %{buildroot}%{_bindir}
%{_bindir}/drone-controller


%files cli
%{_bindir}/drone-cli


%changelog

Loading…
Cancel
Save