Summary: Filebeat License: Elastic license Name: filebeat Version: 7.13.2 Release: 0 URL: https://github.com/elastic/beats #Source0: https://github.com/elastic/beats/archive/refs/tags/v%{version}.tar.gz BuildRequires: golang make automake BuildRequires: dh-autoreconf curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Filebeat agent %build # Build git v2 for auditbeat build process GITVERSION="2.30.0" curl -LO https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GITVERSION}.tar.gz tar -zxf git-${GITVERSION}.tar.gz cd git-${GITVERSION}/ make configure ./configure --prefix=/tmp make all make install export PATH="/tmp/bin:${PATH}" git --version export GOPATH=/tmp/go mkdir -p ${GOPATH}/src/github.com/elastic cd ${GOPATH}/src/github.com/elastic git clone https://github.com/elastic/beats.git cd beats/filebeat git checkout v%{version} # Fix missing revision sed -ie 's,github.com/kardianos/service => github.com/blakerouse/service v1.1.1-0.20200924160513-057808572ffa,github.com/kardianos/service => github.com/blakerouse/service v1.1.0,' ${GOPATH}/src/github.com/elastic/beats/go.mod go mod download github.com/kardianos/service make %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/%{name}/bin/ mv /tmp/go/src/github.com/elastic/beats/%{name}/%{name} %{buildroot}%{_datadir}/%{name}/bin/%{name} %post %{__ln_s} -f %{_datadir}/%{name}/bin/%{name} %{_bindir}/%{name} %files %defattr(-,root,root) %{_datadir}/%{name}/bin/%{name} %changelog