Browse Source

gaia new package

Signed-off-by: pipelinebuilder_pel7ppc64lebuilder0 <pipelinebuilder@powerel.org>
master
pipelinebuilder_pel7ppc64lebuilder0 8 months ago
parent
commit
5f6f0376b2
  1. 54
      SPECS/gaia.spec

54
SPECS/gaia.spec

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