|
| 1 | +# SSG build system and tests count with build directory name `build`. |
| 2 | +# For more details see: |
| 3 | +# https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds |
| 4 | +%global _vpath_builddir build |
| 5 | + |
| 6 | +Name: scap-security-guide |
| 7 | +Version: 0.1.82 |
| 8 | +Release: 1%{?dist} |
| 9 | +Summary: Security guidance and baselines in SCAP formats |
| 10 | +License: BSD-3-Clause |
| 11 | +URL: https://github.com/ComplianceAsCode/content/ |
| 12 | +Source0: https://github.com/ComplianceAsCode/content/releases/download/v%{version}/scap-security-guide-%{version}.tar.bz2 |
| 13 | +BuildArch: noarch |
| 14 | + |
| 15 | +BuildRequires: libxslt |
| 16 | +BuildRequires: openscap-scanner >= 1.2.5 |
| 17 | +BuildRequires: cmake >= 2.8 |
| 18 | +BuildRequires: python%{python3_pkgversion} |
| 19 | +BuildRequires: python%{python3_pkgversion}-jinja2 |
| 20 | +BuildRequires: python%{python3_pkgversion}-PyYAML |
| 21 | +BuildRequires: python%{python3_pkgversion}-setuptools |
| 22 | +Requires: xml-common, openscap-scanner >= 1.2.5 |
| 23 | + |
| 24 | +%description |
| 25 | +The scap-security-guide project provides a guide for configuration of the |
| 26 | +system from the final system's security point of view. The guidance is specified |
| 27 | +in the Security Content Automation Protocol (SCAP) format and constitutes |
| 28 | +a catalog of practical hardening advice, linked to government requirements |
| 29 | +where applicable. The project bridges the gap between generalized policy |
| 30 | +requirements and specific implementation guidelines. The system |
| 31 | +administrator can use the oscap CLI tool from openscap-scanner package, or the |
| 32 | +scap-workbench GUI tool from scap-workbench package to verify that the system |
| 33 | +conforms to provided guideline. Refer to scap-security-guide(8) manual page for |
| 34 | +further information. |
| 35 | + |
| 36 | +%package doc |
| 37 | +Summary: HTML formatted security guides generated from XCCDF benchmarks |
| 38 | +Requires: %{name} = %{version}-%{release} |
| 39 | + |
| 40 | +%description doc |
| 41 | +The %{name}-doc package contains HTML formatted documents containing |
| 42 | +hardening guidances that have been generated from XCCDF benchmarks |
| 43 | +present in %{name} package. |
| 44 | + |
| 45 | +%if ( %{defined rhel} && (! %{defined centos}) && (! %{defined eln}) ) |
| 46 | +%package rule-playbooks |
| 47 | +Summary: Ansible playbooks per each rule. |
| 48 | +Group: System Environment/Base |
| 49 | +Requires: %{name} = %{version}-%{release} |
| 50 | + |
| 51 | +%description rule-playbooks |
| 52 | +The %{name}-rule-playbooks package contains individual ansible playbooks per rule. |
| 53 | +%endif |
| 54 | + |
| 55 | +%prep |
| 56 | +%autosetup -p1 |
| 57 | + |
| 58 | +%define cmake_defines_common -DSSG_SEPARATE_SCAP_FILES_ENABLED=OFF -DSSG_BASH_SCRIPTS_ENABLED=OFF -DSSG_BUILD_SCAP_12_DS=OFF |
| 59 | +%define cmake_defines_specific %{nil} |
| 60 | +%if 0%{?rhel} && ! %{defined eln} |
| 61 | +%define cmake_defines_specific -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_PRODUCT_RHEL%{rhel}:BOOLEAN=TRUE -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_ANSIBLE_PLAYBOOKS_PER_RULE_ENABLED:BOOL=ON |
| 62 | +%endif |
| 63 | +%if 0%{?centos} |
| 64 | +%define cmake_defines_specific -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_PRODUCT_RHEL%{centos}:BOOLEAN=TRUE -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=ON |
| 65 | +%endif |
| 66 | + |
| 67 | +mkdir -p build |
| 68 | +%build |
| 69 | +%cmake %{cmake_defines_common} %{cmake_defines_specific} |
| 70 | +%cmake_build |
| 71 | + |
| 72 | +%install |
| 73 | +%cmake_install |
| 74 | +rm %{buildroot}/%{_docdir}/%{name}/README.md |
| 75 | +rm %{buildroot}/%{_docdir}/%{name}/Contributors.md |
| 76 | + |
| 77 | +%files |
| 78 | +%{_datadir}/xml/scap/ssg/content |
| 79 | +%{_datadir}/%{name}/kickstart |
| 80 | +%{_datadir}/%{name}/ansible/*.yml |
| 81 | +%{_datadir}/%{name}/tailoring |
| 82 | +%lang(en) %{_mandir}/man8/scap-security-guide.8.* |
| 83 | +%doc %{_docdir}/%{name}/LICENSE |
| 84 | +%if ( %{defined rhel} && (! %{defined centos}) && (! %{defined eln}) ) |
| 85 | +%exclude %{_datadir}/%{name}/ansible/rule_playbooks |
| 86 | +%endif |
| 87 | + |
| 88 | +%files doc |
| 89 | +%doc %{_docdir}/%{name}/guides/*.html |
| 90 | +%doc %{_docdir}/%{name}/tables/*.html |
| 91 | + |
| 92 | +%if ( %{defined rhel} && (! %{defined centos}) && (! %{defined eln}) ) |
| 93 | +%files rule-playbooks |
| 94 | +%defattr(-,root,root,-) |
| 95 | +%{_datadir}/%{name}/ansible/rule_playbooks |
| 96 | +%endif |
0 commit comments