Compare commits

...

3 Commits

Author SHA1 Message Date
9a9fb85fd9
Remove pod2man requirement from RPM
Included in base Perl package.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-08-29 04:16:42 +02:00
f3569152e8
Include AppArmor profile in RPM
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-08-29 04:16:31 +02:00
113e33727d
Align DESTDIR
Use for all installations (which tend to have a build root
specified), not for uninstallations (which generally happen on an
installed system).

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-08-29 04:11:45 +02:00
3 changed files with 19 additions and 7 deletions

View File

@ -16,12 +16,12 @@ usage:
@echo 'Available targets: "install", "uninstall"'
install:
install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(SYSCONFDIR)/apparmor.d
install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(SYSCONFDIR)/apparmor.d
install buddycheck.pl $(DESTDIR)$(BINDIR)/buddycheck
pod2man buddycheck.1 > $(DESTDIR)$(MANDIR)/man1/buddycheck.1
sed s?__BINDIR__?$(BINDIR)? buddycheck.apparmor > $(SYSCONFDIR)/apparmor.d/buddycheck
sed s?__BINDIR__?$(BINDIR)? buddycheck.apparmor > $(DESTDIR)$(SYSCONFDIR)/apparmor.d/buddycheck
uninstall:
rm $(DESTDIR)$(BINDIR)/buddycheck
rm $(DESTDIR)$(MANDIR)/man1/buddycheck.1
rm $(BINDIR)/buddycheck
rm $(MANDIR)/man1/buddycheck.1
rm $(SYSCONFDIR)/apparmor.d/buddycheck

View File

@ -11,12 +11,12 @@ abi <abi/3.0>,
include <tunables/global>
profile buddycheck /usr/local/bin/buddycheck {
profile buddycheck __BINDIR__/buddycheck {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/perl>
/usr/bin/perl ix,
/usr/local/bin/buddycheck r,
__BINDIR__/buddycheck r,
}

View File

@ -16,6 +16,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without apparmor
Name: buddycheck
Version: 1
@ -24,7 +25,9 @@ Summary: Health check
License: EUPL-1.2
URL: https://git.com.de/Georg/buddycheck
Source: %{name}-%{version}.tar.zst
BuildRequires: pod2man
%if %{with apparmor}
BuildRequires: apparmor-rpm-macros
%endif
%description
BuddyCheck is a tool querying the systemd health through Prometheus Node Exporter.
@ -38,11 +41,20 @@ BuddyCheck is a tool querying the systemd health through Prometheus Node Exporte
%install
%make_install
%if %{with apparmor}
%post
%{apparmor_reload %{_sysconfdir}/apparmor.d/%{name}}
%endif
%files
%license LICENSE
%doc README.txt
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{ext_man}
%if %{without apparmor}
%exclude
%endif
%{_sysconfdir}/apparmor.d/%{name}
%changelog