/[gentoo-x86]/eclass/selinux-policy-2.eclass
Gentoo

Diff of /eclass/selinux-policy-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.3 2007/07/07 16:21:07 kaiowas Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.4 2009/08/02 02:58:25 pebenito Exp $
4 4
5# Eclass for installing SELinux policy, and optionally 5# Eclass for installing SELinux policy, and optionally
6# reloading the reference-policy based modules 6# reloading the reference-policy based modules
7 7
8inherit eutils 8inherit eutils
34 modfiles="`find ${S}/refpolicy/policy/modules -iname $i.fc` $modfiles" 34 modfiles="`find ${S}/refpolicy/policy/modules -iname $i.fc` $modfiles"
35 # use .if from headers 35 # use .if from headers
36 done 36 done
37 37
38 for i in ${POLICY_TYPES}; do 38 for i in ${POLICY_TYPES}; do
39 mkdir ${S}/${i} 39 mkdir "${S}"/${i}
40 cp ${S}/refpolicy/doc/Makefile.example ${S}/${i}/Makefile 40 cp "${S}"/refpolicy/doc/Makefile.example "${S}"/${i}/Makefile
41 41
42 cp ${modfiles} ${S}/${i} 42 cp ${modfiles} "${S}"/${i}
43 43
44 if [ -n "${POLICY_PATCH}" ]; then 44 if [ -n "${POLICY_PATCH}" ]; then
45 cd ${S}/${i} 45 cd "${S}"/${i}
46 epatch "${POLICY_PATCH}" || die "failed patch ${i}" 46 epatch "${POLICY_PATCH}" || die "failed patch ${i}"
47 fi 47 fi
48 48
49 done 49 done
50} 50}
51 51
52selinux-policy-2_src_compile() { 52selinux-policy-2_src_compile() {
53 [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" 53 [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted"
54 54
55 for i in ${POLICY_TYPES}; do 55 for i in ${POLICY_TYPES}; do
56 make NAME=$i -C ${S}/${i} || die "${i} compile failed" 56 make NAME=$i -C "${S}"/${i} || die "${i} compile failed"
57 done 57 done
58} 58}
59 59
60selinux-policy-2_src_install() { 60selinux-policy-2_src_install() {
61 [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" 61 [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted"
63 63
64 for i in ${POLICY_TYPES}; do 64 for i in ${POLICY_TYPES}; do
65 for j in ${MODS}; do 65 for j in ${MODS}; do
66 echo "Installing ${i} ${j} policy package" 66 echo "Installing ${i} ${j} policy package"
67 insinto ${BASEDIR}/${i} 67 insinto ${BASEDIR}/${i}
68 doins ${S}/${i}/${j}.pp 68 doins "${S}"/${i}/${j}.pp
69 done 69 done
70 done 70 done
71} 71}
72 72
73selinux-policy-2_pkg_postinst() { 73selinux-policy-2_pkg_postinst() {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20