Browse Source

mvoci package creation

Signed-off-by: pipelinebuilder_pel7ppc64lebuilder0 <pipelinebuilder@powerel.org>
master
pipelinebuilder_pel7ppc64lebuilder0 3 years ago
parent
commit
d2a1a39dec
  1. 51
      SPECS/mvoci.spec

51
SPECS/mvoci.spec

@ -0,0 +1,51 @@ @@ -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…
Cancel
Save