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.
58 lines
2.1 KiB
58 lines
2.1 KiB
Name: abstruse |
|
Version: 2.0.0 |
|
Release: 1%{?dist} |
|
Source0: https://github.com/bleenco/abstruse/archive/refs/tags/v%{version}.tar.gz |
|
Summary: Abstruse is a free and open-source CI/CD platform that tests your models and code. |
|
Group: System/Pipeline |
|
License: MIT |
|
URL: https://www.abstruse.cc |
|
BuildRequires: golang |
|
#Requires: |
|
|
|
|
|
%description |
|
|
|
|
|
%prep |
|
%setup -q -c %{name}-%{version} |
|
mkdir -p src/github.com/bleenco/ |
|
tar xvf %{SOURCE0} |
|
mv abstruse-%{version} src/github.com/bleenco/abstruse/ |
|
|
|
|
|
%build |
|
export GOPATH=`pwd` |
|
export PATH="$PATH:$GOPATH/bin/" |
|
export GO111MODULE=on |
|
go get github.com/jkuri/statik github.com/golang/protobuf/protoc-gen-go github.com/cespare/reflex github.com/google/wire/... |
|
cd src/github.com/bleenco/abstruse/ |
|
export GIT_COMMIT=$(git rev-list -1 HEAD) |
|
export BUILD_DATE=$(date +%FT%T%z) |
|
export ABSTRUSE_VERSION_PATH="github.com/bleenco/abstruse/internal/version" |
|
%ifarch ppc64 |
|
export CGO_ENABLED=1 |
|
%endif |
|
pushd web/abstruse |
|
yarnpkg add ng |
|
yarnpkg install |
|
yarnpkg build |
|
popd |
|
#protoc -I${GOPATH}/src/github.com/bleenco/abstruse/ -I. ./pb/api.proto --go_out=plugins=grpc:./pb/ |
|
#protoc ./pb/api.proto --proto_path=`pwd`:${GOPATH}/src/github.com/bleenco/abstruse/:. --go_out=plugins=grpc:./pb/ |
|
protoc ./ --proto_path=`pwd`/pb/ --go_out=plugins=grpc:./pb/ |
|
$GOPATH/bin/wire ./server/cmd/... ./worker/cmd/... |
|
$GOPATH/bin/statik -dest ./server -p ui -src ./web/abstruse/dist |
|
go build -v -gcflags=all="-N -l" -ldflags "-X ${ABSTRUSE_VERSION_PATH}.GitCommit=${GIT_COMMIT} -X ${ABSTRUSE_VERSION_PATH}.UIVersion=%{version} -X ${ABSTRUSE_VERSION_PATH}.BuildDate=${BUILD_DATE} -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o build/abstruse-server ./cmd/abstruse-server |
|
go build -v -gcflags=all="-N -l" -ldflags "-X ${ABSTRUSE_VERSION_PATH}.GitCommit=${GIT_COMMIT} -X ${ABSTRUSE_VERSION_PATH}.UIVersion=%{version} -X ${ABSTRUSE_VERSION_PATH}.BuildDate=${BUILD_DATE} -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o build/abstruse-worker ./cmd/abstruse-worker |
|
|
|
|
|
%install |
|
|
|
|
|
%files |
|
%{_bindir}/abstruse-server |
|
%{_bindir}/abstruse-worker |
|
|
|
|
|
|
|
%changelog
|
|
|