%global goipath github.com/radanalyticsio/oshinko-cli %global gopath %{_datadir}/gocode %global golang_version 1.10 %global GIT_COMMIT 7acbd8382 %global TAG %{VERSION}-%{GIT_COMMIT} %global SPARK_IMAGE "radanalyticsio/openshift-spark:2.3-latest" Version: 0.5.4 %gometa Name: oshinko-cli Release: 0%{?dist} Summary: Command line interface for spark cluster management app License: ASL 2.0 URL: %{gourl} Source0: https://github.com/radanalyticsio/oshinko-cli/archive/v0.5.4.tar.gz # If go_arches not defined fall through to implicit golang archs %if 0%{?go_arches:1} ExclusiveArch: %{go_arches} %else ExclusiveArch: x86_64 aarch64 ppc64le s390x %endif BuildRequires: golang >= %{golang_version} %description The oshinko application manages Apache Spark clusters on OpenShift. The application consists of a REST server (oshinko-rest) and a web UI and is designed to run in an OpenShift project. This repository contains tools to launch the oshinko application along with the source code for the oshinko REST server in the rest subdirectory. The source code for the web UI is located in a different repository. %package -n %{goname}-devel Summary: %{summary} BuildArch: noarch %description -n %{goname}-devel The oshinko application manages Apache Spark clusters on OpenShift. The application consists of a REST server (oshinko-rest) and a web UI and is designed to run in an OpenShift project. This repository contains tools to launch the oshinko application along with the source code for the oshinko REST server in the rest subdirectory. The source code for the web UI is located in a different repository. This package contains library source intended for building other packages which use import path with %{goipath} prefix. %prep %gosetup -q -n %{name}-%{version} %build %gobuildroot #go get github.com/renstrom/dedent #go get github.com/docker/go-connections/nat #go get github.com/ghodss/yaml export LDFLAGS="$LDFLAGS -X %{goipath}/version.gitTag=%{TAG} -X %{goipath}/version.appName=oshinko -X %{goipath}/version.sparkImage=%{SPARK_IMAGE}" %gobuild -o _output/oshinko ./cmd/oshinko #ln -s _output/oshinko _output/oshinko-cli %install %goinstall install -Dpm 0755 _output/oshinko %{buildroot}%{_bindir}/oshinko #install -Dpm 0755 _output/oshinko-cli %{buildroot}%{_bindir}/oshinko-cli %check %gochecks %files %license LICENSE %{_bindir}/oshinko #{_bindir}/oshinko-cli %files -n %{goname}-devel -f devel.file-list %license LICENSE %doc README.md %changelog * Thu Jul 26 2018 Ricardo Martinelli de Oliveira - 0-0.5.4 - First package for Fedora