Name: drone Version: 1.7.0 Release: 1%{?dist} Summary: Drone is a Container-Native, Continuous Delivery Platform License: Apache URL: https://drone.io/ BuildRequires: golang #Requires: %package server Summary: Documentation files for %{name} Group: Documentation %description server Drone CI Server instance %package agent Summary: Agent for Drone Server Group: Agent %description agent Agent for the Drone CI Server %package controller Summary: Controller for Drone Server Group: Controller %description controller Controller for the Drone CI Server %description Drone is a Continuous Delivery platform built on Docker, written in Go. %prep %setup -q -T -c %{name}-%{version} mkdir -p src/github.com/drone cd src/github.com/drone git clone https://github.com/drone/drone %build export GOPATH=`pwd` export GO111MODULE=on cd src/github.com/drone/drone git checkout v%{version} export CGO_ENABLED=0 go build -v -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 %install 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} %files %files server %{_bindir}/drone-server %files agent %{_bindir}/drone-agent %files controller %{_bindir}/drone-controller %changelog