# Generated by go2rpm 1.18.0 %bcond check 0 # https://github.com/prometheus/blackbox_exporter %global goipath github.com/prometheus/blackbox_exporter %global shortname prometheus-blackbox-exporter Version: 0.26.0 %gometa -L -f Name: golang-github-prometheus-blackbox-exporter Release: %autorelease Summary: Blackbox prober exporter License: Apache-2.0 AND BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: %{shortname}.conf Source4: %{shortname}.service Source5: %{shortname}.sysusers BuildRequires: go-vendor-tools BuildRequires: systemd-rpm-macros Requires(pre): shadow-utils %description Blackbox prober exporter. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/%{shortname} %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dpm 0644 blackbox.yml %{buildroot}%{_sysconfdir}/prometheus/blackbox.yml install -Dpm 0644 example.yml %{buildroot}%{_datadir}/prometheus/blackbox-exporter/example.yml install -Dpm 0644 %{S:3} %{buildroot}%{_sysconfdir}/default/%{shortname} install -Dpm 0644 %{S:4} %{buildroot}%{_unitdir}/%{shortname}.service install -Dpm 0644 %{S:5} %{buildroot}%{_sysusersdir}/%{shortname}.conf %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %pre %sysusers_create_compat %{S:5} %post %systemd_post %{shortname}.service %preun %systemd_preun %{shortname}.service %postun %systemd_postun_with_restart %{shortname}.service %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %config(noreplace) %{_sysconfdir}/default/%{shortname} %config(noreplace) %{_sysconfdir}/prometheus/blackbox.yml %doc CHANGELOG.md CODE_OF_CONDUCT.md CONFIGURATION.md MAINTAINERS.md README.md %doc SECURITY.md %{_bindir}/%{shortname} %{_datadir}/prometheus/blackbox-exporter/example.yml %{_sysusersdir}/%{shortname}.conf %{_unitdir}/%{shortname}.service %changelog %autochangelog