| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-apache/selinux-apache-2.20120215-r1.ebuild,v 1.1 2012/04/26 18:38:44 swift Exp $
|
| 4 |
EAPI="4"
|
| 5 |
|
| 6 |
IUSE="kerberos"
|
| 7 |
MODS="apache"
|
| 8 |
BASEPOL="2.20120215-r8"
|
| 9 |
|
| 10 |
inherit selinux-policy-2
|
| 11 |
|
| 12 |
DESCRIPTION="SELinux policy for Apache HTTPD"
|
| 13 |
DEPEND="${DEPEND}
|
| 14 |
kerberos? ( sec-policy/selinux-kerberos )"
|
| 15 |
RDEPEND="${DEPEND}"
|
| 16 |
|
| 17 |
KEYWORDS="~amd64 ~x86"
|
| 18 |
S="${WORKDIR}/"
|
| 19 |
|
| 20 |
src_unpack() {
|
| 21 |
selinux-policy-2_src_unpack
|
| 22 |
}
|
| 23 |
|
| 24 |
src_prepare() {
|
| 25 |
selinux-policy-2_src_prepare
|
| 26 |
if ! use kerberos ; then
|
| 27 |
[ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted mcs mls";
|
| 28 |
for i in ${POLICY_TYPES}; do
|
| 29 |
sed -i -e "/httpd_keytab_t/d" \
|
| 30 |
"${S}/${i}/apache.fc"
|
| 31 |
done
|
| 32 |
fi
|
| 33 |
}
|
| 34 |
|
| 35 |
pkg_postinst() {
|
| 36 |
selinux-policy-2_pkg_postinst
|
| 37 |
if use kerberos ; then
|
| 38 |
einfo "If you decide to uninstall Kerberos, you should clear the"
|
| 39 |
einfo "kerberos use flag here, and then emerge this module again."
|
| 40 |
einfo "Failure to do so may result in policy compile errors in the"
|
| 41 |
einfo "future."
|
| 42 |
else
|
| 43 |
einfo "If you install Kerberos later, you should set the kerberos"
|
| 44 |
einfo "use flag here, and then emerge this module again in order to"
|
| 45 |
einfo "get all of the relevant policy changes. Failure to do so may"
|
| 46 |
einfo "result in errors authenticating against kerberos servers by"
|
| 47 |
einfo "Apache."
|
| 48 |
fi
|
| 49 |
}
|