Browse Source

agola package creation

Signed-off-by: pipelinebuilder_pel7ppc64lebuilder0 <pipelinebuilder@powerel.org>
master
pipelinebuilder_pel7ppc64lebuilder0 3 years ago
parent
commit
3ce4706b8a
  1. 59
      SPECS/agola.spec

59
SPECS/agola.spec

@ -0,0 +1,59 @@ @@ -0,0 +1,59 @@
Name: agola
Version: 0.4.0
Release: 1%{?dist}
Summary: Abstruse is a free and open-source CI/CD platform that tests your models and code.
Group: System/Pipeline
License: MIT
URL: https://agola.io/
BuildRequires: golang
#Requires:


%description

%package toolbox
Summary: Agola Toolbox
%description toolbox


%prep
%setup -T -q -c %{name}-%{version}
mkdir -p src/github.com/agola-io/
cd src/github.com/agola-io/
git clone https://github.com/agola-io/agola
git clone https://github.com/agola-io/agola-web


%build
export GOPATH=`pwd`
export GO111MODULE=on
pushd src/github.com/agola-io/agola-web
npm install
popd
pushd src/github.com/agola-io/agola
%ifarch ppc64
export CGO_ENABLED=1
%endif
git checkout v%{version}
go mod download
./tools/bin/go-bindata -o webbundle/bindata.go -tags webbundle -pkg webbundle -prefix "../agola-web/dist/" -nocompress=true "../agola-web/dist/..."
go build -v -tags 'webbundle' -gcflags=all="-N -l" -ldflags "-X agola.io/agola/cmd.Version=%{version} -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o bin/agola agola.io/agola/cmd/agola
go build -v -gcflags=all="-N -l" -ldflags "-X agola.io/agola/cmd.Version=%{version} -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o bin/agola-toolbox agola.io/agola/cmd/toolbox



%install
mkdir -p %{buildroot}%{_bindir}
cp -rv src/github.com/agola-io/agola/bin/agola %{buildroot}%{_bindir}
cp -rv src/github.com/agola-io/agola/bin/agola-toolbox %{buildroot}%{_bindir}


%files
%{_bindir}/agola


%files toolbox
%{_bindir}/agola-toolbox


%changelog
Loading…
Cancel
Save