Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:infrastructure:physical
prometheus-smartctl_exporter
prometheus-smartctl_exporter.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File prometheus-smartctl_exporter.spec of Package prometheus-smartctl_exporter
# # spec file for package prometheus-smartctl_exporter # # Copyright (c) 2024 SUSE LLC # Copyright (c) 2024 Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define appname smartctl_exporter Name: prometheus-smartctl_exporter Version: 0.12.0 Release: 0 Summary: Prometheus exporter for smartctl License: Apache-2.0 Group: System/Monitoring URL: https://github.com/prometheus-community/smartctl_exporter Source0: %{appname}-%{version}.tar.gz Source1: vendor.tar.gz Source2: %{name}.sysuser Source3: %{name}.apparmor Source4: %{name}.sysconfig Source5: %{name}.service BuildRequires: apparmor-rpm-macros BuildRequires: golang-packaging BuildRequires: sysuser-shadow BuildRequires: sysuser-tools Requires(post): %fillup_prereq Provides: prometheus(%{appname}) %{?systemd_ordering} %sysusers_requires %description Prometheus metrics exporter for S.M.A.R.T. through smartctl. %prep %autosetup -a1 -n%{appname}-%{version} -p1 %build go build -mod=vendor -v -p 4 -x -buildmode=pie -ldflags='-s -w -X github.com/prometheus/common/version.Version=%{version}' %sysusers_generate_pre %{SOURCE2} %{name} %install install -vd %{buildroot}%{_fillupdir} %{buildroot}%{_sbindir} %{buildroot}%{_sysconfdir}/apparmor.d %{buildroot}%{_sysusersdir} %{buildroot}%{_unitdir} install -vd %{buildroot}%{_sysconfdir}/prometheus install -vm 0755 %{appname} %{buildroot}%{_sbindir} install -vm 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf install -vm 0644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}.service ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} install -vm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/apparmor.d/%{name} install -vm 0644 %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.%{name} %check go test %pre -f %{name}.pre %service_add_pre %{name}.service %post %{apparmor_reload %{_sysconfdir}/apparmor.d/%{name}} %fillup_only %service_add_post %{name}.service %preun %service_del_preun %{name}.service %postun %service_del_postun %{name}.service %files %doc CHANGELOG.md README.md %license LICENSE %{_sbindir}/%{appname} %{_sbindir}/rc%{name} %dir %{_sysconfdir}/apparmor.d %config %{_sysconfdir}/apparmor.d/%{name} %{_fillupdir}/sysconfig.%{name} %{_sysusersdir}/%{name}.conf %{_unitdir}/%{name}.service %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor