# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

K_PREPATCHED="yes"
UNIPATCH_STRICTORDER="yes"
K_NOUSENAME="yes"
#K_WANT_GENPATCHES="base"
#K_GENPATCHES_VER="1"
ETYPE="sources"
inherit kernel-2
detect_version

# A few hacks to set ck version via _p instead of -r
MY_P=${P/_p*/}
MY_PR=${PR/r/-r}
MY_PR=${MY_PR/-r0/}
EXTRAVERSION=-archck${PV/*_p/}${MY_PR}
KV_FULL=${OKV}${EXTRAVERSION}
KV_CK=${KV_FULL/-r*/}
detect_version

IUSE=""
#IUSE="ck-plus"
#if use ck-plus; then
#	CK_PATCH="patch-${KV_CK}+.bz2"
#else
	CK_PATCH="patch-${KV_CK}.bz2"
#fi

UNIPATCH_LIST="${DISTDIR}/${CK_PATCH}"

DESCRIPTION="ArchCK is a derivation of the CK patchset that is taking a similar
path to the old CKO patchset. It aims to include a variety of popular features
and updates that have not currently made it to the vanilla kernel. Con Kolivas'
CK patchset is central to ArchCK. ArchCK also includes a few patches for the
Arch LiveCD Archie."
HOMEPAGE="http://iphitus.loudas.com/archck.php"
SRC_URI="${KERNEL_URI}
http://iphitus.loudas.com/arch/ck/2.6.13/${CK_PATCH}"

KEYWORDS="~x86 ~amd64 ~ppc64"

pkg_postinst() {
	postinst_sources

   ewarn "IMPORTANT:"
	ewarn "This is a experimental kernel version, I'm not responsible for breaking your system"
	ewarn "ALWAYS keep a second stable and bootable kernel apart in your boot manager"

#	if use ck-plus; then
#		ewarn "You have ck-plus enabled... this increases the possibility of"
#		ewarn "your archck kernel being unstable."
#	fi
}