Browse Source
Signed-off-by: pipelinebuilder_pel7ppc64lebuilder0 <pipelinebuilder@powerel.org>master
pipelinebuilder_pel7ppc64lebuilder0
3 years ago
1 changed files with 54 additions and 0 deletions
@ -0,0 +1,54 @@ |
|||||||
|
Name: gaia |
||||||
|
Version: 0.2.8 |
||||||
|
Release: 1%{?dist} |
||||||
|
Summary: Build powerful pipelines in any programming language. |
||||||
|
Group: System/Pipeline |
||||||
|
License: Apache |
||||||
|
URL: https://www.gaia-pipeline.io/ |
||||||
|
BuildRequires: golang |
||||||
|
#Requires: |
||||||
|
|
||||||
|
|
||||||
|
%description |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%prep |
||||||
|
%setup -T -q -c %{name}-%{version} |
||||||
|
mkdir -p src/github.com/gaia-pipeline/ |
||||||
|
cd src/github.com/gaia-pipeline/ |
||||||
|
git clone https://github.com/gaia-pipeline/gaia |
||||||
|
|
||||||
|
|
||||||
|
%build |
||||||
|
export GOPATH=`pwd` |
||||||
|
export GO111MODULE=on |
||||||
|
cd src/github.com/gaia-pipeline/gaia |
||||||
|
git checkout v%{version} |
||||||
|
# compile_frontend |
||||||
|
pushd frontend |
||||||
|
rm -rf dist |
||||||
|
npm install |
||||||
|
npm run build |
||||||
|
popd |
||||||
|
# compile_backend |
||||||
|
%ifarch ppc64 |
||||||
|
export CGO_ENABLED=1 |
||||||
|
%endif |
||||||
|
go mod download |
||||||
|
go build -v -trimpath -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o gaia ./cmd/gaia/main.go |
||||||
|
|
||||||
|
|
||||||
|
%install |
||||||
|
mkdir -p %{buildroot}%{_bindir} |
||||||
|
cp -rv src/github.com/gaia-pipeline/gaia/gaia %{buildroot}%{_bindir} |
||||||
|
mkdir -p %{buildroot}/var/www/ |
||||||
|
cp -rv src/github.com/gaia-pipeline/gaia/frontend/dist/ %{buildroot}/var/www/gaia/ |
||||||
|
|
||||||
|
|
||||||
|
%files |
||||||
|
%{_bindir}/gaia |
||||||
|
/var/www/gaia/ |
||||||
|
|
||||||
|
|
||||||
|
%changelog |
Loading…
Reference in new issue