sys-cluster/kube-controller-manager: Remove old
[gentoo.git] / sys-cluster / drbd-kernel / drbd-kernel-8.3.6.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="2"
5
6 inherit eutils versionator linux-mod
7
8 LICENSE="GPL-2"
9 KEYWORDS="~amd64 x86"
10
11 MY_PN="${PN/-kernel/}"
12 MY_P="${MY_PN}-${PV}"
13 MY_MAJ_PV="$(get_version_component_range 1-2 ${PV})"
14
15 HOMEPAGE="http://www.drbd.org"
16 DESCRIPTION="mirror/replicate block-devices across a network-connection"
17 SRC_URI="http://oss.linbit.com/drbd/${MY_MAJ_PV}/${MY_PN}-${PV}.tar.gz"
18
19 IUSE=""
20
21 DEPEND="virtual/linux-sources"
22 RDEPEND=""
23 SLOT="0"
24
25 S="${WORKDIR}/${MY_P}"
26
27 src_prepare() {
28         epatch "${FILESDIR}"/${P}-linux-2.6.32.patch
29 }
30
31 pkg_setup() {
32         if ! kernel_is -ge 2 6; then
33                 die "Unsupported kernel, drbd-${PV} needs kernel 2.6.x ."
34         fi
35
36         MODULE_NAMES="drbd(block:${S}/drbd)"
37         BUILD_TARGETS="default"
38         CONFIG_CHECK="CONNECTOR"
39         CONNECTOR_ERROR="You must enable \"CONNECTOR - unified userspace <-> kernelspace linker\" in your kernel configuration, because drbd needs it."
40         linux-mod_pkg_setup
41         BUILD_PARAMS="-j1 KDIR=${KV_DIR} O=${KV_OUT_DIR}"
42 }
43
44 pkg_postinst() {
45         linux-mod_pkg_postinst
46
47         einfo ""
48         einfo "Please remember to re-emerge drbd when you upgrade your kernel!"
49         einfo ""
50 }