1
0
selinux-policy/selinux-policy.spec

111 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# 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
# default is refpolicy-standard (mentioned in config)
Requires: selinux-policy-refpolicy-standard
%description
SELinux policy
%package refpolicy-standard
Group: System/Base
Summary: SELinux policy - Tresys Standard Refpolicy
Requires: 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
Requires: 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
Requires: 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/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/selinux
%{_sysconfdir}/selinux/config
%files refpolicy-standard
%defattr(-,root,root)
%doc refpolicy-standard/COPYING refpolicy-standard/Changelog refpolicy-standard/README
%dir %{_sysconfdir}/selinux/refpolicy-standard
%{_sysconfdir}/selinux/refpolicy-standard/*
%files refpolicy-mcs
%defattr(-,root,root)
%doc refpolicy-mcs/COPYING refpolicy-mcs/Changelog refpolicy-mcs/README
%dir %{_sysconfdir}/selinux/refpolicy-mcs
%{_sysconfdir}/selinux/refpolicy-mcs/*
%files refpolicy-mls
%defattr(-,root,root)
%doc refpolicy-mls/COPYING refpolicy-mls/Changelog refpolicy-mls/README
%dir %{_sysconfdir}/selinux/refpolicy-mls
%{_sysconfdir}/selinux/refpolicy-mls/*
%changelog