# Generated by go2rpm 1.19.0 %bcond check 1 # https://github.com/prometheus/blackbox_exporter %global goipath github.com/prometheus/blackbox_exporter Version: 0.28.0 %gometa -L -f Name: blackbox-exporter Release: %autorelease Summary: Blackbox prober exporter # Generated by go-vendor-tools License: Apache-2.0 AND BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: blackbox-exporter.service Source4: blackbox-exporter.sysusers Source5: blackbox-exporter.sysconfig BuildRequires: go-vendor-tools BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} Provides: blackbox_exporter %description Blackbox prober exporter. %prep %goprep -p1 tar -xf %{S:1} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/blackbox_exporter %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0755 -vd %{buildroot}%{_unitdir} install -m 0644 -vp %{S:3} %{buildroot}%{_unitdir}/blackbox-exporter.service install -m 0755 -vd %{buildroot}%{_sysusersdir} install -m 0644 -vp %{S:4} %{buildroot}%{_sysusersdir}/blackbox-exporter.conf install -m 0755 -vd %{buildroot}%{_sysconfdir}/sysconfig install -m 0644 -vp %{S:5} %{buildroot}%{_sysconfdir}/sysconfig/blackbox-exporter install -m 0755 -vd %{buildroot}%{_sysconfdir}/blackbox_exporter install -m 0644 -vp blackbox.yml %{buildroot}%{_sysconfdir}/blackbox_exporter/blackbox.yml %pre %sysusers_create_compat %{S:4} %post %systemd_post blackbox-exporter.service %preun %systemd_preun blackbox-exporter.service %postun %systemd_postun_with_restart blackbox-exporter.service %check %go_vendor_license_check -c %{S:2} %if %{with check} %global ignores %{shrink: -s TestRedirectToTLSHostWorks -s TestChooseProtocol } %gocheck2 %{ignores} %endif %files -f %{go_vendor_license_filelist} %doc CHANGELOG.md CODE_OF_CONDUCT.md CONFIGURATION.md MAINTAINERS.md README.md %doc SECURITY.md example.yml %dir %{_sysconfdir}/blackbox_exporter %config(noreplace) %{_sysconfdir}/blackbox_exporter/blackbox.yml %config(noreplace) %{_sysconfdir}/sysconfig/blackbox-exporter %{_bindir}/blackbox_exporter %{_unitdir}/blackbox-exporter.service %{_sysusersdir}/blackbox-exporter.conf %changelog %autochangelog