Browse Source

woodpecker new package

Signed-off-by: pipelinebuilder_pel7ppc64lebuilder0 <pipelinebuilder@powerel.org>
master
pipelinebuilder_pel7ppc64lebuilder0 3 years ago
parent
commit
39ee717aca
  1. 83
      SPECS/woodpecker.spec

83
SPECS/woodpecker.spec

@ -0,0 +1,83 @@ @@ -0,0 +1,83 @@
Name: woodpecker
Version: 0.15.0
Release: 1%{?dist}
Summary: Woodpecker is a Container-Native, Continuous Delivery Platform
License: Apache
URL: https://woodpecker.laszlo.cloud
BuildRequires: golang
#Requires:


%package server
Summary: Documentation files for %{name}
Group: Documentation
%description server
WoodpeckerCI Server instance

%package cli
Summary: Documentation files for %{name}
Group: Documentation
%description cli
WoodpeckerCI CLI


%package agent
Summary: Agent for Drone Server
Group: Agent
%description agent
Agent for the Woodpecker CI Server


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


%prep
%setup -q -T -c %{name}-%{version}
mkdir -p go/src/github.com/woodpecker-ci
cd go/src/github.com/woodpecker-ci
git clone https://github.com/woodpecker-ci/woodpecker


%build
export GOPATH=`pwd`
export PATH=$PATH:$GOPATH/bin/:$GOBIN
export GO111MODULE=on
cd go/src/github.com/woodpecker-ci/woodpecker
#git checkout v%{version}
pushd web
yarnpkg install
yarnpkg run build
yarnpkg run test
popd
export CGO_ENABLED=0
go build -v -trimpath -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version} -X 'github.com/woodpecker-ci/woodpecker/version.Version="%{version}"'" -o woodpecker-server github.com/woodpecker-ci/woodpecker/cmd/server
go build -v -trimpath -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version} -X 'github.com/woodpecker-ci/woodpecker/version.Version="%{version}"'" -o woodpecker-cli github.com/woodpecker-ci/woodpecker/cmd/cli
go build -v -trimpath -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version} -X 'github.com/woodpecker-ci/woodpecker/version.Version="%{version}"'" -o woodpecker-agent github.com/woodpecker-ci/woodpecker/cmd/agent



%install
mkdir -p %{buildroot}%{_bindir}
cp -v go/src/github.com/woodpecker-ci/woodpecker/woodpecker-server %{buildroot}%{_bindir}
cp -v go/src/github.com/woodpecker-ci/woodpecker/woodpecker-cli %{buildroot}%{_bindir}
cp -v go/src/github.com/woodpecker-ci/woodpecker/woodpecker-agent %{buildroot}%{_bindir}


%files


%files server
%{_bindir}/woodpecker-server


%files cli
%{_bindir}/woodpecker-cli


%files agent
%{_bindir}/woodpecker-agent


%changelog
Loading…
Cancel
Save