1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils versionator linux-mod
11 MY_PN="${PN/-kernel/}"
13 MY_MAJ_PV="$(get_version_component_range 1-2 ${PV})"
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"
21 DEPEND="virtual/linux-sources"
25 S="${WORKDIR}/${MY_P}"
28 epatch "${FILESDIR}"/${P}-linux-2.6.32.patch
32 if ! kernel_is -ge 2 6; then
33 die "Unsupported kernel, drbd-${PV} needs kernel 2.6.x ."
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."
41 BUILD_PARAMS="-j1 KDIR=${KV_DIR} O=${KV_OUT_DIR}"
45 linux-mod_pkg_postinst
48 einfo "Please remember to re-emerge drbd when you upgrade your kernel!"