Unified the spec file with its RHEL8 counterpart.

This commit is contained in:
Matej Tyc 2021-02-10 16:29:40 +01:00
parent 893d396f9f
commit 1e1397c2f4

View File

@ -5,8 +5,11 @@
Name: scap-security-guide
Version: 0.1.54
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Security guidance and baselines in SCAP formats
%if 0%{?rhel}
Group: Applications/System
%endif
License: BSD-3-Clause
URL: https://github.com/ComplianceAsCode/content/
Source0: https://github.com/ComplianceAsCode/content/releases/download/v%{version}/scap-security-guide-%{version}.tar.bz2
@ -16,9 +19,12 @@ BuildRequires: libxslt
BuildRequires: expat
BuildRequires: openscap-scanner >= 1.2.5
BuildRequires: cmake >= 2.8
# To get python3 inside the buildroot require its path explicitly in BuildRequires
BuildRequires: /usr/bin/python3
BuildRequires: python%{python3_pkgversion}
BuildRequires: python%{python3_pkgversion}-jinja2
BuildRequires: python%{python3_pkgversion}-PyYAML
BuildRequires: python%{python3_pkgversion}-lxml
Requires: xml-common, openscap-scanner >= 1.2.5
Obsoletes: openscap-content < 0:0.9.13
Provides: openscap-content
@ -29,7 +35,7 @@ system from the final system's security point of view. The guidance is specified
in the Security Content Automation Protocol (SCAP) format and constitutes
a catalog of practical hardening advice, linked to government requirements
where applicable. The project bridges the gap between generalized policy
requirements and specific implementation guidelines. The Fedora system
requirements and specific implementation guidelines. The system
administrator can use the oscap CLI tool from openscap-scanner package, or the
scap-workbench GUI tool from scap-workbench package to verify that the system
conforms to provided guideline. Refer to scap-security-guide(8) manual page for
@ -37,6 +43,9 @@ further information.
%package doc
Summary: HTML formatted security guides generated from XCCDF benchmarks
%if 0%{?rhel}
Group: System Environment/Base
%endif
Requires: %{name} = %{version}-%{release}
%description doc
@ -45,10 +54,16 @@ hardening guidances that have been generated from XCCDF benchmarks
present in %{name} package.
%prep
%setup -q
%autosetup
%define cmake_defines %{nil}
%if 0%{?rhel}
%define cmake_defines -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_PRODUCT_RHEL6:BOOLEAN=TRUE -DSSG_PRODUCT_RHEL7:BOOLEAN=TRUE -DSSG_PRODUCT_RHEL8:BOOLEAN=TRUE -DSSG_PRODUCT_FIREFOX:BOOLEAN=TRUE -DSSG_PRODUCT_JRE:BOOLEAN=TRUE -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF
%endif
mkdir -p build
%build
%cmake
%cmake %{cmake_defines}
%cmake_build
%install
@ -69,6 +84,9 @@ present in %{name} package.
%doc %{_docdir}/%{name}/tables/*.html
%changelog
* Fri Feb 12 2021 Matej Tyc <matyc@redhat.com> - 0.1.54-3
- Moved the spec file closer to the RHEL one.
* Fri Feb 12 2021 Vojtech Polasek <vpolasek@redhat.com> - 0.1.54-2
- fix definition of build directory