Spec file cleanup
- Run spec-cleaner - Set prefix and correct installation directories (mandir needs share/ subdirectory for packaged installations, sysconfdir needs to be /etc as AppArmor does not support /usr/etc) - Exclude unneeded AppArmor files if built without AppArmor support - Add group to make rpmlint happy - Build as noarch as binary is interpreted language Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
9a9fb85fd9
commit
6c89e107d8
@ -16,15 +16,17 @@
|
|||||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
%bcond_without apparmor
|
|
||||||
|
|
||||||
|
%bcond_without apparmor
|
||||||
Name: buddycheck
|
Name: buddycheck
|
||||||
Version: 1
|
Version: 1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Health check
|
Summary: Health check
|
||||||
License: EUPL-1.2
|
License: EUPL-1.2
|
||||||
|
Group: System/Monitoring
|
||||||
URL: https://git.com.de/Georg/buddycheck
|
URL: https://git.com.de/Georg/buddycheck
|
||||||
Source: %{name}-%{version}.tar.zst
|
Source: %{name}-%{version}.tar.zst
|
||||||
|
BuildArch: noarch
|
||||||
%if %{with apparmor}
|
%if %{with apparmor}
|
||||||
BuildRequires: apparmor-rpm-macros
|
BuildRequires: apparmor-rpm-macros
|
||||||
%endif
|
%endif
|
||||||
@ -39,7 +41,7 @@ BuddyCheck is a tool querying the systemd health through Prometheus Node Exporte
|
|||||||
# Perl script, nothing to build
|
# Perl script, nothing to build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install PREFIX=%{_prefix} MANDIR=%{_mandir} SYSCONFDIR=%{_sysconfdir}
|
||||||
|
|
||||||
%if %{with apparmor}
|
%if %{with apparmor}
|
||||||
%post
|
%post
|
||||||
@ -50,11 +52,13 @@ BuddyCheck is a tool querying the systemd health through Prometheus Node Exporte
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.txt
|
%doc README.txt
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_mandir}/man1/%{name}.1%{ext_man}
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
||||||
%if %{without apparmor}
|
%if %{with apparmor}
|
||||||
%exclude
|
%dir %{_sysconfdir}/apparmor.d
|
||||||
|
%config %{_sysconfdir}/apparmor.d/%{name}
|
||||||
|
%else
|
||||||
|
%exclude %dir %{_sysconfdir}/apparmor.d
|
||||||
|
%exclude %config %{_sysconfdir}/apparmor.d/%{name}
|
||||||
%endif
|
%endif
|
||||||
%{_sysconfdir}/apparmor.d/%{name}
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user