summaryrefslogtreecommitdiff
blob: 300a9123410e46a3828cc072b07d3181bf8355df (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/wolk-sources/wolk-sources-4.9.ebuild,v 1.4 2003/11/20 07:43:38 lostlogic Exp $

IUSE="build"

ETYPE="sources"
inherit kernel

# OKV=original kernel version, KV=patched kernel version.  They can be the same.

OKV=2.4.20
WOLK_MAJOR=4
WOLK_MINOR=9
EXTRAVERSION=-wolk${WOLK_MAJOR}.${WOLK_MINOR}s
BASE=-wolk${WOLK_MAJOR}.0s
KV=${OKV}${EXTRAVERSION}
S=${WORKDIR}/linux-${KV}

DESCRIPTION="Working Overloaded Linux Kernel"
SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2"
WOLK_PATCHLIST="linux-${OKV}${BASE}.patch.bz2"

# cheat and build it in a constant fashion
for i in `seq 1 ${WOLK_MINOR}`; do
	old="$((${i}-1))"
	new="${i}"
	WOLK_PATCHLIST="${WOLK_PATCHLIST} linux-${OKV}-wolk${WOLK_MAJOR}.${old}s-to-${WOLK_MAJOR}.${new}s.patch.bz2"
done
for i in ${WOLK_PATCHLIST}; do
	SRC_URI="${SRC_URI} mirror://sourceforge/wolk/${i}"
done;

KEYWORDS="x86"
SLOT="${KV}"
HOMEPAGE="http://wolk.sourceforge.net http://www.kernel.org"

src_unpack() {
	unpack linux-${OKV}.tar.bz2
	mv linux-${OKV} linux-${KV} || die
	cd ${WORKDIR}/linux-${KV}

	for i in ${WOLK_PATCHLIST}; do
		bzcat ${DISTDIR}/${i} | patch -p1 || die
	done
}
src_install() {
	dodir /usr/src
	echo ">>> Copying sources..."
	dodoc ${FILESDIR}/patches.txt
	mv ${WORKDIR}/linux* ${D}/usr/src
}

pkg_postinst() {
	local KERNELPATH="/usr/src/linux-${OKV}-wolk${WOLK_MAJOR}.${WOLK_MINOR}s"
	einfo
	einfo   "If you use one of the NVIDIA modules below, you will need to use the"
	einfo   "supplied rmap patch in ${KERNELPATH}/userspace-patches"
	einfo   "against your nvidia kernel driver source"
	einfo   "cd NVIDIA_kernel-1.0-XXXX "
	einfo	"patch -p1 <${KERNELPATH}/userspace-patches/"
	einfo   "NVIDIA_kernel-1.0-XXXX-2.4-rmap15b.patch"
	einfo   "There are NVIDIA_kernel-1.0-3123 and 1.0-4191 patches supplied."
	einfo
}