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.

60 lines
1.5 KiB

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