Require golang at build, and new enough git
@@ -187,7 +187,13 @@ BuildRequires: java-11-openjdk-devel
%endif
BuildRequires: rpm-build
BuildRequires: make
+%if 0%{?el7} && ! 0%{?amzn2}
+BuildRequires: rh-git227
+%define _rhgit227_enable /opt/rh/rh-git227/enable
+%else
BuildRequires: git
+%endif
+BuildRequires: golang
BuildRequires: systemd
BuildRequires: flex >= 2.5.0
BuildRequires: bison >= 3.0.0
@@ -502,6 +508,9 @@ source %{_devtoolset_enable} || true
%if 0%{?_rhmaven35_enable:1}
source %{_rhmaven35_enable} || true
%endif
+%if 0%{?_rhgit227_enable:1}
+source %{_rhgit227_enable} || true
+%endif
%if 0%{?_java_home:1}
export JAVA_HOME=%{?_java_home}
@@ -528,6 +537,7 @@ mvn --batch-mode -e -N io.takari:maven:wrapper -Dmaven=3.6.3
.
make %{_smp_mflags}
+env GOTMPDIR=$(pwd)/client/go make -C client/go
%endif
%install
@@ -537,6 +547,7 @@ rm -rf %{buildroot}
cp -r %{installdir} %{buildroot}
%else
make install DESTDIR=%{buildroot}
+cp client/go/bin/vespa %{buildroot}%{_prefix}/bin/vespa
%endif
%if %{_create_vespa_service}
@@ -749,10 +760,13 @@ fi
%defattr(-,%{_vespa_user},%{_vespa_group},-)
%endif
%dir %{_prefix}
+%dir %{_prefix}/bin
%dir %{_prefix}/conf
%dir %{_prefix}/conf/vespa-feed-client
%dir %{_prefix}/lib
%dir %{_prefix}/lib/jars
+# TODO: Include the vespa program
+#%{_prefix}/bin/vespa
%{_prefix}/bin/vespa-feed-client
%{_prefix}/conf/vespa-feed-client/logging.properties
%{_prefix}/lib/jars/vespa-http-client-jar-with-dependencies.jar
