From 3ce4706b8ad4d4d081f190ce2263747ae09648d9 Mon Sep 17 00:00:00 2001 From: pipelinebuilder_pel7ppc64lebuilder0 Date: Sun, 28 Mar 2021 16:41:16 +0200 Subject: [PATCH] agola package creation Signed-off-by: pipelinebuilder_pel7ppc64lebuilder0 --- SPECS/agola.spec | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 SPECS/agola.spec diff --git a/SPECS/agola.spec b/SPECS/agola.spec new file mode 100644 index 0000000..7f3fe3f --- /dev/null +++ b/SPECS/agola.spec @@ -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