Browse Source
Signed-off-by: pipelinebuilder_pel7ppc64lebuilder0 <pipelinebuilder@powerel.org>master
pipelinebuilder_pel7ppc64lebuilder0
3 years ago
1 changed files with 51 additions and 0 deletions
@ -0,0 +1,51 @@ |
|||||||
|
%global _hardened_build 1 |
||||||
|
%define _user cicd |
||||||
|
%define _group cicd |
||||||
|
%define _varlib /var/lib/mvoci/ |
||||||
|
%define _logdir /var/log/cds/ |
||||||
|
|
||||||
|
Name: mvoci |
||||||
|
Version: 20210924 |
||||||
|
Release: 1%{?dist} |
||||||
|
Summary: My Very Own CI-server |
||||||
|
License: GPLv3 |
||||||
|
URL: https://codeberg.org/snaums/mvoCI |
||||||
|
BuildRequires: golang |
||||||
|
#Requires: |
||||||
|
|
||||||
|
|
||||||
|
%description |
||||||
|
|
||||||
|
|
||||||
|
%prep |
||||||
|
%setup -q -T -c %{name}-%{version} |
||||||
|
mkdir -p go/src/codeberg.org/snaums/ |
||||||
|
cd go/src/codeberg.org/snaums/ |
||||||
|
git clone https://codeberg.org/snaums/mvoCI |
||||||
|
|
||||||
|
|
||||||
|
%build |
||||||
|
export GOPATH=`pwd` |
||||||
|
export PATH=$PATH:$GOPATH/bin/:$GOBIN |
||||||
|
export GO111MODULE=on |
||||||
|
cd go/src/codeberg.org/snaums/mvoCI/ |
||||||
|
export CGO_ENABLED=0 |
||||||
|
export HASH=`git rev-list -1 HEAD` |
||||||
|
export GOVERSION=`go version` |
||||||
|
export DATE=`date +%Y%m%d` |
||||||
|
#go build -gccgoflags "-pthread" -ldflags "-s -w -X 'codeberg.org/snaums/mvoCI/core.BuildTime="$DATE"' -X 'codeberg.org/snaums/mvoCI/core.Compiler="$GOVERSION"' -X 'codeberg.org/snaums/mvoCI/core.GitHash="$HASH"' -X 'codeberg.org/snaums/mvoCI/core.Version='"%{version}"'" -o mvoci main.go |
||||||
|
go build -gccgoflags -ldflags "-s -w -X 'codeberg.org/snaums/mvoCI/core.BuildTime="$DATE"' -X 'codeberg.org/snaums/mvoCI/core.Compiler="$GOVERSION"' -X 'codeberg.org/snaums/mvoCI/core.GitHash="$HASH"' -X 'codeberg.org/snaums/mvoCI/core.Version='"%{version}"'" -o mvoci main.go |
||||||
|
|
||||||
|
|
||||||
|
%install |
||||||
|
mkdir -p %{buildroot}%{_varlib} |
||||||
|
cp go/src/codeberg.org/snaums/mvoCI/mvoci %{buildroot}%{_varlib} |
||||||
|
cp -rv go/src/codeberg.org/snaums/mvoCI/views %{buildroot}%{_varlib} |
||||||
|
cp -rv go/src/codeberg.org/snaums/mvoCI/static %{buildroot}%{_varlib} |
||||||
|
|
||||||
|
|
||||||
|
%files |
||||||
|
%{_bindir}/mvoci |
||||||
|
|
||||||
|
|
||||||
|
%changelog |
Loading…
Reference in new issue