Chris PeBenito c6299b
%define type refpolicy
Chris PeBenito c6299b
%define POLICYDIR /etc/selinux/%{type}
Chris PeBenito c6299b
%define FILE_CON ${POLICYDIR}/contexts/files/file_contexts
Chris PeBenito c6299b
%define FC_PRE ${FILE_CON}.pre
Chris PeBenito c6299b
Chris PeBenito c6299b
Summary: SELinux Reference Policy configuration source files 
Chris PeBenito c6299b
Name: selinux-refpolicy-sources
Chris PeBenito c6299b
Version: REFPOL_VERSION
Chris PeBenito c6299b
Release: 1
Chris PeBenito c6299b
License: GPL
Chris PeBenito c6299b
Group: System Environment/Base
Chris PeBenito c6299b
PreReq: m4 make policycoreutils kernel gcc
Chris PeBenito c6299b
Requires: checkpolicy >= 1.20
Chris PeBenito c6299b
Requires: python
Chris PeBenito c6299b
BuildRequires: make m4 python
Chris PeBenito c6299b
Obsoletes: policy-sources
Chris PeBenito c6299b
Source: refpolicy-%{version}.tar.bz2
Chris PeBenito c6299b
Url: http://serefpolicy.sourceforge.net
Chris PeBenito c6299b
BuildArch: noarch
Chris PeBenito c6299b
BuildRoot: /tmp/rpmbuild/%{name}
Chris PeBenito c6299b
Chris PeBenito c6299b
%description
Chris PeBenito c6299b
This subpackage includes the SELinux Reference Policy
Chris PeBenito c6299b
source files, which can be used to build a targeted policy
Chris PeBenito c6299b
or strict policy configuration.
Chris PeBenito c6299b
Chris PeBenito c6299b
%prep
Chris PeBenito c6299b
%setup -q -n refpolicy
Chris PeBenito c6299b
Chris PeBenito c6299b
%build
Chris PeBenito c6299b
cp -f policy/modules.conf.targeted_example policy/modules.conf
Chris PeBenito c6299b
sed -i -e '/^TYPE/s/strict/targeted/' Makefile
Chris PeBenito c6299b
sed -i -e 's/^#DISTRO/DISTRO/' Makefile
Chris PeBenito c6299b
make conf
Chris PeBenito c6299b
make clean
Chris PeBenito c6299b
rm -f support/*.pyc
Chris PeBenito c6299b
Chris PeBenito c6299b
%install
Chris PeBenito c6299b
rm -fR $RPM_BUILD_ROOT
Chris PeBenito c6299b
make DESTDIR=$RPM_BUILD_ROOT install-src
Chris PeBenito c6299b
Chris PeBenito c6299b
%clean
Chris PeBenito c6299b
rm -fR $RPM_BUILD_ROOT
Chris PeBenito c6299b
Chris PeBenito c6299b
%files
Chris PeBenito c6299b
%defattr(0600,root,root,0700)
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/doc
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/doc/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/doc/templates
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/doc/templates/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/support
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/support/*
Chris PeBenito c6299b
%attr(0755,root,root) %{_sysconfdir}/selinux/%{type}/src/policy/support/genclassperms.py
Chris PeBenito c6299b
%attr(0755,root,root) %{_sysconfdir}/selinux/%{type}/src/policy/support/pyplate.py
Chris PeBenito c6299b
%attr(0755,root,root) %{_sysconfdir}/selinux/%{type}/src/policy/support/sedoctool.py
Chris PeBenito c6299b
%attr(0755,root,root) %{_sysconfdir}/selinux/%{type}/src/policy/support/segenxml.py
Chris PeBenito c6299b
%attr(0755,root,root) %{_sysconfdir}/selinux/%{type}/src/policy/support/set_tunables
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/config
Chris PeBenito c6299b
%config(noreplace) %{_sysconfdir}/selinux/%{type}/src/policy/config/local.users
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/config/appconfig-targeted
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/config/appconfig-targeted/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/config/appconfig-strict
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/config/appconfig-strict/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy
Chris PeBenito c6299b
%config(noreplace) %{_sysconfdir}/selinux/%{type}/src/policy/policy/users
Chris PeBenito c6299b
%config(noreplace) %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules.conf
Chris PeBenito c6299b
%config(noreplace) %{_sysconfdir}/selinux/%{type}/src/policy/policy/tunables.conf
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/flask
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/policy/flask/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/kernel
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/kernel/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/apps
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/apps/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/services
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/services/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/system
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/system/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/admin
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/policy/modules/admin/*
Chris PeBenito c6299b
%dir %{_sysconfdir}/selinux/%{type}/src/policy/policy/support
Chris PeBenito c6299b
%config %{_sysconfdir}/selinux/%{type}/src/policy/policy/support/*
Chris PeBenito c6299b
Chris PeBenito c6299b
%changelog