You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.0 KiB
54 lines
1.0 KiB
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
|
|
|