File smar-apparmor-scripts.spec of Package smar-apparmor-scripts
#
# spec file for package smar-apparmor-scripts
#
# Copyright (c) 2022 Samu Voutilainen
#
# 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/
#
Name: smar-apparmor-scripts
Version: 0.1
Release: 0
Summary: Smar’s AppArmor scripts
Group: Productivity/Security
License: ISC
URL: https://git.sr.ht/~smar/aru
Source0: %{name}-%{version}.tar.xz
Source1: rpmlintrc
%systemd_requires
%description
These originated from needs of project smar-apparmor-profiles,
which necessiates some features not available on SUSE-15-SP3’s
AppArmor 2.13.
# Have noarch for scripts. Crystal executables need to be arch specific.
%package -n smar-aa-scripts
Summary: Smar’s AppArmor scripts
Provides: smar-apparmor-scripts
# TODO: aru should be moved to own package so this can be noarch.
#BuildArch: noarch
%description -n smar-aa-scripts
These originated from needs of project smar-apparmor-profiles,
which necessiates some features not available on SUSE-15-SP3’s
AppArmor 2.13.
%prep
%setup
%build
%install
install -d -m0755 %{buildroot}%{_datadir}/%{name}
install -D -m0644 common/* %{buildroot}%{_datadir}/%{name}
install -D -m0755 smar-load-profiles/smar-load-profiles %{buildroot}%{_sbindir}/smar-load-profiles
install -D -m 644 smar-load-profiles/smar-load-profiles@.service %{buildroot}%{_unitdir}/smar-load-profiles@.service
%pre
#%%service_add_pre smar-load-profiles@.service
%post
#%%service_add_post smar-load-profiles@.service
%preun
#%%service_del_preun smar-load-profiles@.service
%postun
#%%service_del_postun smar-load-profiles@.service
%files -n smar-aa-scripts
%{_sbindir}/smar-load-profiles
%{_datadir}/%{name}
%{_unitdir}/smar-load-profiles@.service
%license LICENSE
%doc README.adoc
%changelog