summaryrefslogtreecommitdiff
path: root/sys-kernel/easy-kernel/easy-kernel-4.4.39_p6.ebuild
blob: 93afa5ba47a7e63bc88facbaa0c0d33ef921ab60 (plain) (blame)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 2015-2016 Adélie Linux Team
# Distributed under the terms of the NCSA License

EAPI=6

DESCRIPTION="The Linux kernel - easy edition"
SLOT="0"
KEYWORDS="arm mips ppc x86 x86_64 ~alpha ~arm64 ~hppa ~ppc64 ~sparc64"

SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.xz
	mirror://foxkit/${P}.patch.xz"

DEPEND="app-arch/lzop"
RDEPEND="!sys-kernel/kernel-kit
	${DEPEND}"
RESTRICT="test"  # no way you can test a kernel.

S="${WORKDIR}/linux-4.4"

src_prepare() {
	eapply "${WORKDIR}"/${P}.patch
	default
}

src_configure() {
	cp "${FILESDIR}"/config_${PV}_${ARCH} "${S}"/.config || \
		die "No configuration available for your architecture."

    case ${ARCH} in
		ppc)    export ARCH="powerpc" ;;
		ppc64)  export ARCH="powerpc64" ;;
	esac

	emake silentoldconfig
}

src_compile() {
    case ${ARCH} in
		ppc)    export ARCH="powerpc" ;;
		ppc64)  export ARCH="powerpc64" ;;
	esac

	emake
	emake modules
	emake firmware
}

src_install() {
    case ${ARCH} in
		ppc)    export ARCH="powerpc" ;;
		ppc64)  export ARCH="powerpc64" ;;
	esac

	dodir /boot
	emake install INSTALL_PATH="${D}/boot"
	emake modules_install INSTALL_MOD_PATH="${D}"
	emake firmware_install INSTALL_FW_PATH="${D}/lib/firmware"
}