# # spec file for package selinux-policy # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: selinux-policy Version: 2.20081210 Release: 1 Url: http://oss.tresys.com/projects/refpolicy/ License: GPL v2 Group: System/Base Summary: SELinux policies Source: refpolicy-%{version}.tar.bz2 Source1: config Patch0: %{name}-build_conf.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: checkpolicy policycoreutils libsepol-devel python python-xml m4 BuildArch: noarch %description SELinux policies %package refpolicy-standard Group: System/Base Summary: SELinux policy - Tresys Standard Refpolicy Provides: selinux-policy %description refpolicy-standard SELinux policy - based on reference policy from Tresys - standard %package refpolicy-mcs Group: System/Base Summary: SELinux policy - Tresys MCS Refpolicy Provides: selinux-policy %description refpolicy-mcs SELinux policy - based on reference policy from Tresys - mcs %package refpolicy-mls Group: System/Base Summary: SELinux policy - Tresys MLS Refpolicy Provides: selinux-policy %description refpolicy-mls SELinux policy - based on reference policy from Tresys - mls %prep %setup -q -c -n selinux-policy -T tar xfj %{SOURCE0} && mv refpolicy refpolicy-standard tar xfj %{SOURCE0} && mv refpolicy refpolicy-mcs tar xfj %{SOURCE0} && mv refpolicy refpolicy-mls %patch0 %build for i in standard mcs mls; do cd refpolicy-$i make conf make policy cd .. done %install for i in standard mcs mls; do cd refpolicy-$i make DESTDIR=$RPM_BUILD_ROOT install sed -i "s:^# edit $RPM_BUILD_ROOT:# edit :" $RPM_BUILD_ROOT%{_sysconfdir}/selinux/refpolicy-$i/contexts/files/file_contexts.homedirs cd .. done install -m 600 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/selinux/ #mkdir $RPM_BUILD_ROOT/selinux %clean rm -rf $RPM_BUILD_ROOT %files refpolicy-standard %defattr(-,root,root) %doc refpolicy-standard/COPYING refpolicy-standard/Changelog refpolicy-standard/README %dir %{_sysconfdir}/selinux %dir %{_sysconfdir}/selinux/refpolicy-standard #%dir /selinux %{_sysconfdir}/selinux/config %{_sysconfdir}/selinux/refpolicy-standard/* %files refpolicy-mcs %defattr(-,root,root) %doc refpolicy-mcs/COPYING refpolicy-mcs/Changelog refpolicy-mcs/README %dir %{_sysconfdir}/selinux %dir %{_sysconfdir}/selinux/refpolicy-mcs #%dir /selinux %{_sysconfdir}/selinux/config %{_sysconfdir}/selinux/refpolicy-mcs/* %files refpolicy-mls %defattr(-,root,root) %doc refpolicy-mls/COPYING refpolicy-mls/Changelog refpolicy-mls/README %dir %{_sysconfdir}/selinux %dir %{_sysconfdir}/selinux/refpolicy-mls #%dir /selinux %{_sysconfdir}/selinux/config %{_sysconfdir}/selinux/refpolicy-mls/* %changelog