70 lines
1.4 KiB
Bash
70 lines
1.4 KiB
Bash
# Copyright 1999-2011 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gfs-kernel/gfs-kernel-2.03.09.ebuild,v 1.7 2011/04/28 18:59:44 ulm Exp $
|
|
|
|
inherit eutils linux-mod versionator
|
|
|
|
CLUSTER_RELEASE="${PV}"
|
|
MY_P="cluster-${CLUSTER_RELEASE}"
|
|
|
|
MAJ_PV="$(get_major_version)"
|
|
MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
|
|
|
|
DESCRIPTION="GFS kernel module"
|
|
HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
|
|
SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
|
|
|
|
LICENSE="GPL-2"
|
|
SLOT="0"
|
|
KEYWORDS="amd64 x86"
|
|
|
|
IUSE=""
|
|
|
|
DEPEND="virtual/linux-sources"
|
|
RDEPEND="${DEPEND}"
|
|
|
|
S="${WORKDIR}/${MY_P}/${PN}"
|
|
|
|
pkg_setup() {
|
|
linux-mod_pkg_setup
|
|
case ${KV_FULL} in
|
|
2.2.*|2.4.*) die "${P} supports only 2.6 kernels";;
|
|
esac
|
|
}
|
|
|
|
src_unpack() {
|
|
unpack ${A}
|
|
cd "${S}"
|
|
|
|
}
|
|
|
|
src_compile() {
|
|
set_arch_to_kernel
|
|
|
|
(cd "${WORKDIR}"/${MY_P};
|
|
./configure \
|
|
--cc=$(tc-getCC) \
|
|
--cflags="-Wall" \
|
|
--kernel_src="${KERNEL_DIR}" \
|
|
--disable_kernel_check \
|
|
) || die "configure problem"
|
|
|
|
(cd "${S}"/src/gfs;
|
|
emake clean all \
|
|
) || die "compile problem"
|
|
}
|
|
|
|
src_install() {
|
|
(cd "${S}"/src/gfs;
|
|
emake DESTDIR="${D}" module_dir="${D}"/lib/modules/${KV_FULL} install \
|
|
) || die "install problem"
|
|
|
|
}
|
|
|
|
pkg_postinst() {
|
|
linux-mod_pkg_postinst
|
|
|
|
einfo ""
|
|
einfo "Please remember to re-emerge ${PN} when you upgrade your kernel!"
|
|
einfo ""
|
|
}
|