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