Bump nogo-sources to 2.6.31 (no tuxonice, reiser4, atop)
[gentoo-overlay-ibormuth.git] / sys-kernel / nogo-sources / nogo-sources-2.6.31.ebuild
Commit [+]AuthorDateLineData
1d08bd48
IB
Ingo Bormuth2009-08-25 19:58:09 +02001# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
5ETYPE="sources"
6inherit kernel-2
7detect_version
8detect_arch
9
10#------------------------------------------------------------------------
11
12K_WANT_GENPATCHES="base extras"
13K_GENPATCHES_OKV="${OKV}"
c869919a Ingo Bormuth2009-09-11 08:48:17 +020014K_GENPATCHES_VER="1"
1d08bd48
IB
Ingo Bormuth2009-08-25 19:58:09 +020015
16TUXONICE_OKV="${OKV}"
17TUXONICE_VER="3.0.1"
18#TUXONICE_PATCH="tuxonice-${TUXONICE_VER}-for-${TUXONICE_OKV}.patch.bz2"
19TUXONICE_PATCH="current-tuxonice-for-2.6.30.patch-20090620-v1.bz2"
20
c869919a Ingo Bormuth2009-09-11 08:48:17 +020021REISER4_OKV="2.6.30" #${OKV}"
1d08bd48
IB
Ingo Bormuth2009-08-25 19:58:09 +020022REISER4_VER=""
23REISER4_PATCH="reiser4-for-${REISER4_OKV}${REISER4_VER}.patch.bz2"
24
25ATOP_OKV="2.6.28"
26ATOP_VER=""
27ATOP_PATCH="atoppatch-kernel-${ATOP_OKV}${ATOP_VER}.tar.gz"
28
29#------------------------------------------------------------------------
30
31KEYWORDS="" #~amd64 ~x86"
32use tuxonice && die "No TuxOnIce support yet for this version."
33use reiset4 && die "No Reiser4e support yet for this version."
34use atop && die "No ATop support yet for this version."
35
36IUSE="atop currentconfig oneslot reiser4 toshiba-acpi tuxonice"
37
38use oneslot && SLOT="0"
39
40DESCRIPTION="Kernel, optionally with atop, genpatches, reiser4, tuxonice, toshiba-acpi."
41
42HOMEPAGE="http://www.kernel.org
43 ATOP: http://www.atcomputing.nl/Tools/atop
44 GENPATCHES: http://dev.gentoo.org/~dsd/genpatches
45 REISER4: http://www.kernel.org/pub/linux/kernel/people/edward/reiser4
46 TOSHIBA-ACPI: http://memebeam.org/toys/ExperimentalToshibaAcpiDriver
47 TUXONICE: http://www.tuxonice.net"
48
49SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}
50 atop? ( http://www.atcomputing.nl/Tools/atop/packages/${ATOP_PATCH} )
51 reiser4? ( mirror://kernel/linux/kernel/people/edward/reiser4/reiser4-for-2.6/${REISER4_PATCH} )
52 tuxonice? ( http://www.tuxonice.net/downloads/all/${TUXONICE_PATCH} )"
53
54RDEPEND="${RDEPEND}
55 tuxonice? ( >=sys-apps/tuxonice-userui-0.7.3
56 ( || ( sys-power/hibernate-script sys-power/pm-utils ) ) )
57 reiser4? ( >=sys-fs/reiser4progs-1.0.6 )
58 atop? ( sys-process/atop )"
59
60UNIPATCH_STRICTORDER="yes"
61UNIPATCH_LIST=""
62
63if use tuxonice
64then
65 if [[ ${#TUXONICE_VER} -lt 30 ]] # official or local patch generated from git ?
66 then
67 UNIPATCH_LIST="${UNIPATCH_LIST} ${DISTDIR}/${TUXONICE_PATCH}"
68 else
69 UNIPATCH_LIST="${UNIPATCH_LIST} ${FILESDIR}/${TUXONICE_PATCH}"
70 fi
71fi
72
73if use reiser4
74then
75 UNIPATCH_LIST="${UNIPATCH_LIST}
76 ${DISTDIR}/${REISER4_PATCH}"
77fi
78
79if use toshiba-acpi
80then
81 UNIPATCH_LIST="${UNIPATCH_LIST}
82 ${FILESDIR}/linux-2.6.29-toshiba_acpi.patch"
83fi
84
85src_unpack() {
86 kernel-2_src_unpack
87 cd "${S}"
88
89 # Due to stupid naming atop patches don't work with unipatch
90 if use atop && [ -e "${DISTDIR}/${ATOP_PATCH}" ]
91 then
92 echo "Atop Patch:"
93 ( ( ( tar -xzOf "${DISTDIR}/${ATOP_PATCH}" --exclude "README*" \
94 || die "${ATOP_PATCH} is invalid (not yet available ?)" \
95 ) | patch -p1 \
96 ) || die "${ATOP_PATCH} failed (old version ?)"
97 )
98 echo "Fix Atop:"
99 patch -p1 < "${FILESDIR}/linux-2.6.29-atop_fix.patch" || die "Fix Atop Failed."
100
101 fi
102
103 # Copy current config from /proc
104 if use currentconfig ; then
105 if [ -e "/usr/src/linux-${KV_FULL}/.config" ]; then
106 ewarn "Kernel config file already exist."
107 ewarn "I will NOT overwrite that."
108 else
109 echo "Copying kernel config file."
110 zcat /proc/config > .config || ewarn "Can't copy /proc/config"
111 fi
112 fi
113}
114
115nogo_info() {
116 if use ${1}
117 then
118 einfo " + ${1} (${2})"
119 else
120 einfo " - ${1}"
121 fi
122}
123
124pkg_postinst() {
125 kernel-2_pkg_postinst
126 echo
127 ewarn "========"
128 ewarn "WARNING:"
129 ewarn "========"
130 ewarn
131 ewarn "This is an experimental kernel version."
132 echo
133 einfo "Features:"
134 echo
135 nogo_info atop "${ATOP_PATCH}"
136 nogo_info reiser4 "${REISER4_PATCH}"
137 nogo_info tuxonice "${TUXONICE_PATCH}"
138 nogo_info toshiba-acpi "local"
139 echo
140 ewarn "Do NOT ask for official gentoo support."
141 ewarn "I am BY NO MEANS responsible for breaking your system."
142 ewarn "ALWAYS keep a second stable and bootable kernel apart in your boot manager."
143}
144