summaryrefslogtreecommitdiff
blob: 2d14683b749d744701f7b001e413d27f1d3ce1e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

ETYPE="sources"
K_WANT_GENPATCHES="base extras"
K_GENPATCHES_VER="12"

inherit eutils kernel-2
detect_version
detect_arch

CCS_TGP="ccs-patch-1.7.1-20091220"
CCS_TGP_SRC="mirror://sourceforge.jp/tomoyo/43375/${CCS_TGP}.tar.gz"

DESCRIPTION="TOMOYO Linux sources for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
HOMEPAGE="http://tomoyo.sourceforge.jp/index.html.en"
SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${CCS_TGP_SRC}"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="sys-apps/ccs-tools"

K_EXTRAEINFO="Before booting with TOMOYO enabled kernel, you need to
run this command to initialize TOMOYO policies:
# /usr/lib/ccs/init_policy.sh"

src_unpack() {
	kernel-2_src_unpack

	cd "${WORKDIR}"
	unpack "${CCS_TGP}.tar.gz"
	cp -dpR security include "${S}" || die

	if [ -f "${FILESDIR}/${PF}.patch" ]; then
		cd "${WORKDIR}/patches/"
		epatch "${FILESDIR}/${PF}.patch"
	fi

	cd "${S}"
	epatch "${WORKDIR}/patches/ccs-patch-${PV}.diff"
}