File ssg-apply.spec of Package ssg-apply.26523
#
# spec file for package ssg-apply
#
# Copyright (c) 2021 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: ssg-apply
Version: 1.0
Release: 0
Summary: Package to Apply SCAP Security Guide Content
License: GPL-2.0+
Group: Productivity/Security
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tgz
BuildRequires: -post-build-checks
BuildRequires: scap-security-guide
BuildRequires: openscap-utils
BuildRequires: systemd-rpm-macros
Requires: scap-security-guide
Requires: openscap-utils
%description
Script and systemd service to evaluate and optionally remediate system state based on SCAP Security Guide content.
%prep
%setup
%build
%install
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}/etc/%{name}
mkdir -p %{buildroot}/var/log/%{name}
mkdir -p %{buildroot}/usr/share/doc/packages/%{name}
mkdir -p %{buildroot}/usr/share/licenses/%{name}
install -D -c -m 755 %{name}.sh %{buildroot}%{_sbindir}/%{name}
install -D -c -m 644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -D -c -m 644 default.conf %{buildroot}/etc/%{name}/default.conf
install -D -c -m 644 README %{buildroot}/usr/share/doc/packages/%{name}/README
install -D -c -m 644 COPYING %{buildroot}/usr/share/licenses/%{name}/COPYING
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
systemctl enable %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%defattr(-,root,root)
%{_sbindir}/%{name}
%{_unitdir}/%{name}.service
%config /etc/%{name}
/var/log/%{name}
/usr/share/doc/packages/%{name}
/usr/share/licenses/%{name}