Pham Ngoc Hai personal web site

Syndicate

vhba-1.0.0.ebuild with scsi_cmnd patch
 
Written by Pham Ngoc Hai, on 04-03-2008 18:10

New ebuild for vhba-1.0.0 module with scsi_cmnd patch applied:

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

inherit linux-info linux-mod eutils

DESCRIPTION="VHBA module provides Virtual (SCSI) Host Bus Adapter \
           for the cdemu suite"
HOMEPAGE="http://cdemu.org"
SRC_URI="mirror://sourceforge/cdemu/vhba-module-${PV}.tar.bz2"

LICENSE="GPL-V2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~hppa ~ppc"
IUSE=""

DEPEND=">=virtual/linux-sources-2.6.19"
RDEPEND=""

S="${WORKDIR}/vhba-module-${PV}"
MODULE_NAMES="vhba(block:${S})"
BUILD_TARGETS="clean modules"

pkg_setup() {
      CONFIG_CHECK="~BLK_DEV_SR ~CHR_DEV_SG"
      check_extra_config
      BUILD_PARAMS="KERNELDIR=${KV_DIR}"
      linux-mod_pkg_setup
}

src_unpack() {
      unpack ${A}
        cd ${S}
        einfo "Patching Makefile"
        epatch "${FILESDIR}"/makefile.patch || die "Failed to patch Makefile"
        if kernel_is 2 6 24 ; then
                einfo "Patching scatterlist"
                epatch "${FILESDIR}"/scatterlist.patch || die "Failed to patch scatterlist"
        fi
      if kernel_is 2 6 25 ; then
                einfo "Patching scatterlist"
                epatch "${FILESDIR}"/scatterlist.patch || die "Failed to patch scatterlist"
        einfo "Patching scsi_cmnd"
        epatch "${FILESDIR}"/scsicmnd.patch || die "Failed to patch scsicmnd"
      fi
}

src_compile() {
      linux-mod_src_compile || die "Error: building module failed!"
}

src_install() {
      KV_OBJ="ko"
      linux-mod_src_install || die "Error: installing module failed!"
      UDEV_RULES="/etc/udev/rules.d/70-vhba.rules"
      einfo "Generating UDEV-rules ..."
      mkdir -p "${D}"/${UDEV_RULES%/*}
      echo -e "# do not edit this file, it will be overwritten on update\n#" \
        > "${D}"/${UDEV_RULES}
      echo -e "KERNEL==\"vhba_ctl\", NAME=\"%k\", MODE=\"0660\", OWNER=\"root\",GROUP=\"cdemu\"" >> "${D}"/${UDEV_RULES}
}

pkg_postinst() {
      einfo "Generating cdemu group ..."
      enewgroup cdemu

      elog "Don't forget to add yourself to the cdemu group "
      elog "if you want to be able to use virtual cdemu devices."
      linux-mod_pkg_postinst
}

pkg_postrm() {
      linux-mod_pkg_postrm
}
 

This ebuild is also available in my gentoo overlay

Last update: 04-03-2008 18:10

Published in : Computer stuff, Gentoo
Keywords : vhba ebuild /setup/work/cdemu-1.0/vhba-module-org/vhba.c:491: error: ‘struct scsi_cmnd’ has no member named ‘request_bufflen’ /setup/work/cdemu-1.0/vhba-module-org/vhba.c:496: error: ‘struct scsi_cmnd’ has no member named ‘use_sg’ /setup/work/cdemu-1.0/vhba-module-org/vhba.c:500: error: ‘struct scsi_cmnd’ has no member named ‘request_buffer’
Quote this article in website Favoured Print Send to friend Related articles Save this to del.icio.us

Users' Comments (0) RSS feed comment

No comment posted

Add your comment



mXcomment 1.0.9 © 2007-2010 - visualclinic.fr
License Creative Commons - Some rights reserved
< Prev   Next >


Search

Calendar

 Aug   September 2010   Oct

SMTWTFS
   1  2  3  4
  5  6  7  8  91011
12131415161718
19202122232425
2627282930 
Techies Resources ESL

Random Photos






Donate

Enter Amount:

Sponsored Links

Copyright © 2007 Joomla Templates By Joomladesigns.  Modified By Pham Ngoc Hai