forked from pool/openscap
Marcus Meissner
46d215b316
OBS-URL: https://build.opensuse.org/package/show/security/openscap?expand=0&rev=23
237 lines
7.0 KiB
RPMSpec
237 lines
7.0 KiB
RPMSpec
#
|
|
# spec file for package openscap (Version 0.5.12)
|
|
#
|
|
# Copyright (c) 2009 SUSE LINUX Products 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/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
%define soname 1
|
|
%define with_bindings 0
|
|
|
|
Name: openscap
|
|
Version: 0.8.1
|
|
Release: 1.0
|
|
License: GNU GPL v3 or later
|
|
Group: Development/Tools/Other
|
|
Source: http://www.open-scap.org/download/%name-%version.tar.bz2
|
|
Source1: oscap-scan.init
|
|
Source2: sysconfig.oscap-scan
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: libcurl-devel libgcrypt-devel libnl-1_1-devel libxml2-devel
|
|
# Use package name cause of "have choice for perl(XML::Parser): brp-check-suse perl-XML-Parser"
|
|
BuildRequires: perl-XML-Parser
|
|
BuildRequires: pkg-config python-devel pcre-devel rpm-devel swig libxslt-devel
|
|
Summary: A Set of Libraries for Integration with SCAP
|
|
|
|
%description
|
|
OpenSCAP is a set of open source libraries providing an easier path for
|
|
integration of the SCAP line of standards.
|
|
|
|
SCAP is a line of standards managed by NIST with the goal of providing
|
|
a standard language for the expression of Computer Network Defense
|
|
related information.
|
|
|
|
More information about SCAP can be found at nvd.nist.gov.
|
|
|
|
|
|
%package -n libopenscap%{soname}
|
|
Group: System/Libraries
|
|
Summary: OpenSCAP C Library
|
|
|
|
%description -n libopenscap%{soname}
|
|
The OpenSCAP C Library for easy integration with SCAP.
|
|
|
|
|
|
%package devel
|
|
Group: Development/Libraries/C and C++
|
|
Requires: libopenscap%{soname} = %{version}
|
|
Requires: %{name} = %{version}-%{release}
|
|
Summary: Development Files for OpenSCAP
|
|
|
|
%description devel
|
|
This package contains the development files (mainly C header files) for the
|
|
OpenSCAP C library.
|
|
|
|
%if 0%{?with_bindings}
|
|
%package -n python-openscap
|
|
Group: Development/Libraries/Python
|
|
%py_requires
|
|
Requires: %{name} = %{version}-%{release}
|
|
Provides: openscap-python = %{version}-%{release}
|
|
Summary: OpenSCAP Python Library
|
|
|
|
%description -n python-openscap
|
|
The OpenSCAP Python Library for easy integration with SCAP.
|
|
|
|
%package -n perl-openscap
|
|
Group: Development/Libraries/Perl
|
|
Requires: perl = %{perl_version}
|
|
Requires: %{name} = %{version}-%{release}
|
|
Provides: openscap-perl = %{version}-%{release}
|
|
Summary: OpenSCAP Perl Library
|
|
|
|
%description -n perl-openscap
|
|
The OpenSCAP Perl Library for easy integration with SCAP.
|
|
%endif
|
|
|
|
%package utils
|
|
Summary: Openscap utilities
|
|
Group: Applications/System
|
|
Requires: %{name} = %{version}-%{release}
|
|
PreReq: %insserv_prereq %fillup_prereq
|
|
|
|
%description utils
|
|
The %{name}-utils package contains various utilities based on %{name} library.
|
|
|
|
|
|
%package content
|
|
Summary: SCAP content
|
|
Group: Applications/System
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description content
|
|
SCAP content for Fedora delivered by Open-SCAP project.
|
|
|
|
|
|
%package extra-probes
|
|
Summary: SCAP probes
|
|
Group: Applications/System
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildRequires: openldap2-devel
|
|
#BuildRequires: opendbx - for sql
|
|
|
|
%description extra-probes
|
|
The %{name}-extra-probes package contains additional probes that are not
|
|
commonly used and require additional dependencies.
|
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
|
|
%if 0%{?with_bindings}
|
|
%configure --disable-silent-rules
|
|
%else
|
|
%configure --disable-silent-rules --disable-bindings
|
|
%endif
|
|
%__make %{?_smp_mflags}
|
|
|
|
%check
|
|
# #%__make check %{?_smp_mflags} ||:
|
|
|
|
%install
|
|
%__make install DESTDIR=%{buildroot}
|
|
find %{buildroot} -name "*.la" -delete
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_initrddir}
|
|
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/oscap-scan
|
|
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
# create symlinks to default content
|
|
ln -s %{_datadir}/openscap/scap-fedora14-oval.xml $RPM_BUILD_ROOT/%{_datadir}/openscap/scap-oval.xml
|
|
ln -s %{_datadir}/openscap/scap-fedora14-xccdf.xml $RPM_BUILD_ROOT/%{_datadir}/openscap/scap-xccdf.xml
|
|
|
|
%post -n libopenscap%{soname} -p /sbin/ldconfig
|
|
|
|
%postun -n libopenscap%{soname} -p /sbin/ldconfig
|
|
|
|
%post utils
|
|
%{fillup_and_insserv -n oscap-scan}
|
|
|
|
%postun utils
|
|
%{insserv_cleanup}
|
|
|
|
%clean
|
|
%__rm -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%doc AUTHORS COPYING ChangeLog NEWS README
|
|
%dir %{_libexecdir}/openscap
|
|
%{_libexecdir}/openscap/probe_dnscache
|
|
%{_libexecdir}/openscap/probe_environmentvariable
|
|
%{_libexecdir}/openscap/probe_environmentvariable58
|
|
%{_libexecdir}/openscap/probe_family
|
|
%{_libexecdir}/openscap/probe_file
|
|
%{_libexecdir}/openscap/probe_filehash
|
|
%{_libexecdir}/openscap/probe_filehash58
|
|
%{_libexecdir}/openscap/probe_inetlisteningservers
|
|
%{_libexecdir}/openscap/probe_interface
|
|
%{_libexecdir}/openscap/probe_partition
|
|
%{_libexecdir}/openscap/probe_password
|
|
%{_libexecdir}/openscap/probe_process
|
|
%{_libexecdir}/openscap/probe_rpminfo
|
|
%{_libexecdir}/openscap/probe_runlevel
|
|
%{_libexecdir}/openscap/probe_shadow
|
|
%{_libexecdir}/openscap/probe_sysctl
|
|
%{_libexecdir}/openscap/probe_system_info
|
|
%{_libexecdir}/openscap/probe_textfilecontent
|
|
%{_libexecdir}/openscap/probe_textfilecontent54
|
|
%{_libexecdir}/openscap/probe_uname
|
|
%{_libexecdir}/openscap/probe_variable
|
|
%{_libexecdir}/openscap/probe_xinetd
|
|
%{_libexecdir}/openscap/probe_xmlfilecontent
|
|
%{_libexecdir}/openscap/probe_iflisteners
|
|
%{_libexecdir}/openscap/probe_routingtable
|
|
%{_libexecdir}/openscap/probe_rpmverify
|
|
%dir %{_datadir}/openscap
|
|
%dir %{_datadir}/openscap/schemas
|
|
%dir %{_datadir}/openscap/xsl
|
|
%{_datadir}/openscap/schemas/*
|
|
%{_datadir}/openscap/xsl/*
|
|
|
|
%files -n libopenscap%{soname}
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libopenscap.so.%{soname}*
|
|
|
|
%files devel
|
|
%defattr(-, root, root)
|
|
%doc docs/{html,examples}/
|
|
%{_includedir}/*
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%if 0%{?with_bindings}
|
|
%files -n python-openscap
|
|
%defattr(-, root, root)
|
|
%{python_sitearch}/*
|
|
|
|
%files -n perl-openscap
|
|
%defattr(-, root, root)
|
|
%{perl_vendorlib}/openscap.pm
|
|
%{perl_vendorarch}/_openscap_pm.so
|
|
%endif
|
|
|
|
%files utils
|
|
%defattr(-,root,root,-)
|
|
/var/adm/fillup-templates/sysconfig.oscap-scan
|
|
%doc docs/oscap-scan.cron
|
|
%{_initrddir}/oscap-scan
|
|
%{_mandir}/man8/*
|
|
%{_bindir}/*
|
|
%config %{_sysconfdir}/bash_completion.d/*
|
|
|
|
%files content
|
|
%defattr(-,root,root,-)
|
|
%{_datadir}/openscap/scap*.xml
|
|
|
|
%files extra-probes
|
|
%defattr(-,root,root,-)
|
|
%{_libexecdir}/openscap/probe_ldap57
|
|
|