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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Oct 9 23:44:57 2006 UTC (7 years, 10 months ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
First mainstream reference policy testing release.
(Portage version: 2.1.2_pre2-r5)
 (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-99999999.ebuild,v 1.4 2006/09/29 02:39:05 pebenito Exp $
4
5 POLICY_TYPES="strict targeted"
6 OPTS="MONOLITHIC=n DISTRO=gentoo QUIET=y"
7
8 IUSE=""
9
10 inherit eutils subversion
11
12 DESCRIPTION="Gentoo base policy for SELinux"
13 HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/"
14 LICENSE="GPL-2"
15 SLOT="0"
16
17 KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~mips ~alpha"
18 #KEYWORDS="x86 ppc sparc amd64 mips alpha"
19
20 RDEPEND=">=sys-apps/policycoreutils-1.28"
21 DEPEND="${RDEPEND}
22 sys-devel/m4
23 >=sys-apps/checkpolicy-1.28"
24
25 S=${WORKDIR}/
26
27 ESVN_REPO_URI="http://oss.tresys.com/repos/refpolicy/trunk"
28 ESVN_PROJECT="refpolicy"
29
30 src_unpack() {
31 subversion_src_unpack
32 mkdir ${S}/refpolicy
33 mv ${S}/* ${S}/refpolicy
34
35 for i in ${POLICY_TYPES}; do
36 mkdir -p ${S}/${i}/policy
37 cp ${FILESDIR}/modules.conf.${i} ${S}/${i}/policy/modules.conf
38 done
39 }
40
41 src_compile() {
42 cd ${S}/refpolicy
43
44 make ${OPTS} generate || die "Failed to create generated module files"
45
46 make ${OPTS} xml || "XML generation failed."
47
48 for i in ${POLICY_TYPES}; do
49 # make ${OPTS} TYPE=${i} NAME=${i} LOCAL_ROOT=${S}/${i} conf \
50 # || die "${i} modules.conf update failed"
51
52 make ${OPTS} TYPE=${i} NAME=${i} LOCAL_ROOT=${S}/${i} base \
53 || die "${i} compile failed"
54 done
55 }
56
57 src_install() {
58 OPTS="${OPTS} DESTDIR=${D}"
59
60 cd ${S}/refpolicy
61
62 for i in ${POLICY_TYPES}; do
63 make ${OPTS} TYPE=${i} NAME=${i} LOCAL_ROOT=${S}/${i} install \
64 || die "${i} install failed."
65
66 make ${OPTS} TYPE=${i} NAME=${i} install-headers \
67 || die "${i} headers install failed."
68
69 echo "run_init_t" > ${D}/etc/selinux/${i}/contexts/run_init_type
70
71 echo "textrel_shlib_t" >> ${D}/etc/selinux/${i}/contexts/customizable_types
72
73 # libsemanage won't make this on its own
74 keepdir /etc/selinux/${i}/policy
75 done
76
77 dodoc doc/Makefile.example doc/example.{te,fc,if}
78
79 insinto /etc/selinux
80 doins ${FILESDIR}/semanage.conf
81 doins ${FILESDIR}/config
82 }
83
84 pkg_postinst() {
85 if has "loadpolicy" $FEATURES ; then
86 for i in ${POLICY_TYPES}; do
87 einfo "Inserting base module into ${i} module store."
88
89 cd /usr/share/selinux/${i}
90 semodule -s ${i} -b base.pp
91 done
92 else
93 echo
94 echo
95 eerror "Policy has not been loaded. It is strongly suggested"
96 eerror "that the policy be loaded before continuing!!"
97 echo
98 einfo "Automatic policy loading can be enabled by adding"
99 einfo "\"loadpolicy\" to the FEATURES in make.conf."
100 echo
101 echo
102 ebeep 4
103 epause 4
104 fi
105 }

  ViewVC Help
Powered by ViewVC 1.1.20