/[gentoo-x86]/sec-policy/selinux-base-policy/selinux-base-policy-20061008.ebuild
Gentoo

Contents of /sec-policy/selinux-base-policy/selinux-base-policy-20061008.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Oct 15 20:24:23 2006 UTC (7 years, 9 months ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Update for testing fixes.
(Portage version: 2.1.2_pre2-r8)
 (Signed Manifest commit)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-20061008.ebuild,v 1.1 2006/10/09 23:44:44 pebenito Exp $
4
5 IUSE=""
6
7 inherit eutils
8
9 DESCRIPTION="Gentoo base policy for SELinux"
10 HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/"
11 SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2"
12 LICENSE="GPL-2"
13 SLOT="0"
14
15 #KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~mips ~alpha"
16 KEYWORDS="x86 ppc sparc amd64 mips alpha"
17
18 RDEPEND=">=sys-apps/policycoreutils-1.30.30"
19 DEPEND="${RDEPEND}
20 sys-devel/m4
21 >=sys-apps/checkpolicy-1.30.12"
22
23 S=${WORKDIR}/
24
25 src_unpack() {
26 unpack ${A}
27
28 for i in ${POLICY_TYPES}; do
29 mkdir -p ${S}/${i}/policy
30 cp ${FILESDIR}/modules.conf.${i} ${S}/${i}/policy/modules.conf
31 done
32 }
33
34 src_compile() {
35 local OPTS="MONOLITHIC=n DISTRO=gentoo QUIET=y"
36
37 cd ${S}/refpolicy
38
39 make ${OPTS} generate || die "Failed to create generated module files"
40
41 make ${OPTS} xml || "XML generation failed."
42
43 for i in ${POLICY_TYPES}; do
44 # make ${OPTS} TYPE=${i} NAME=${i} LOCAL_ROOT=${S}/${i} conf \
45 # || die "${i} modules.conf update failed"
46
47 make ${OPTS} TYPE=${i} NAME=${i} LOCAL_ROOT=${S}/${i} base \
48 || die "${i} compile failed"
49 done
50 }
51
52 src_install() {
53 local OPTS="MONOLITHIC=n DISTRO=gentoo QUIET=y DESTDIR=${D}"
54
55 cd ${S}/refpolicy
56
57 for i in ${POLICY_TYPES}; do
58 make ${OPTS} TYPE=${i} NAME=${i} LOCAL_ROOT=${S}/${i} install \
59 || die "${i} install failed."
60
61 make ${OPTS} TYPE=${i} NAME=${i} install-headers \
62 || die "${i} headers install failed."
63
64 echo "run_init_t" > ${D}/etc/selinux/${i}/contexts/run_init_type
65
66 echo "textrel_shlib_t" >> ${D}/etc/selinux/${i}/contexts/customizable_types
67
68 # libsemanage won't make this on its own
69 keepdir /etc/selinux/${i}/policy
70 done
71
72 dodoc doc/Makefile.example doc/example.{te,fc,if}
73
74 insinto /etc/selinux
75 doins ${FILESDIR}/config
76 }
77
78 pkg_postinst() {
79 if has "loadpolicy" $FEATURES ; then
80 for i in ${POLICY_TYPES}; do
81 einfo "Inserting base module into ${i} module store."
82
83 cd /usr/share/selinux/${i}
84 semodule -s ${i} -b base.pp
85 done
86 else
87 echo
88 echo
89 eerror "Policy has not been loaded. It is strongly suggested"
90 eerror "that the policy be loaded before continuing!!"
91 echo
92 einfo "Automatic policy loading can be enabled by adding"
93 einfo "\"loadpolicy\" to the FEATURES in make.conf."
94 echo
95 echo
96 ebeep 4
97 epause 4
98 fi
99 }

  ViewVC Help
Powered by ViewVC 1.1.20