60 lines
1.4 KiB
Bash
60 lines
1.4 KiB
Bash
# Copyright 1999-2006 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Id:$
|
|
|
|
inherit linux-mod
|
|
|
|
DESCRIPTION="Driver for Intel 536EP modem"
|
|
HOMEPAGE="http://developer.intel.com/design/modems/products/536ep.htm"
|
|
SRC_URI="ftp://aiedownload.intel.com/df-support/9266/eng/${P}.tgz"
|
|
|
|
LICENSE="Intel"
|
|
SLOT="0"
|
|
KEYWORDS="x86"
|
|
IUSE=""
|
|
|
|
S="${WORKDIR}/Intel-536"
|
|
MODULE_NAMES="Intel536(:${S}/coredrv)"
|
|
|
|
pkg_setup() {
|
|
if kernel_is 2 4; then
|
|
BUILD_TARGETS="536core"
|
|
BUILD_PARAMS="KERNEL_SOURCE_PATH='${KV_DIR}' \
|
|
KERNEL_INCLUDES='${KV_DIR}/include' \
|
|
TARGET=TARGET_SELAH"
|
|
else
|
|
BUILD_TARGETS="536core_26"
|
|
BUILD_PARAMS="KERNEL_SOURCE_PATH='${KV_DIR}' \
|
|
KERNEL_INCLUDES='${KV_DIR}/include'"
|
|
fi
|
|
|
|
linux-mod_pkg_setup
|
|
}
|
|
|
|
src_unpack() {
|
|
unpack ${A}
|
|
cd ${S}
|
|
|
|
epatch ${FILESDIR}/${PN}-2.6.18-fix.patch
|
|
epatch ${FILESDIR}/${PN}-2.6.19-fix.patch
|
|
|
|
if kernel_is ge 2 6 20; then
|
|
epatch ${FILESDIR}/${PN}-2.6.20-fix.patch
|
|
fi
|
|
|
|
sed -si "s;/lib/modules/\`uname -r\`/build;${KV_DIR};" makefile coredrv/Makefile
|
|
sed -si "s;/lib/modules/\$(shell uname -r)/build;${KV_DIR};" makefile coredrv/Makefile
|
|
}
|
|
|
|
src_install() {
|
|
linux-mod_src_install
|
|
|
|
#install hamregistry executable
|
|
exeinto /usr/sbin
|
|
doexe "${S}/hamregistry"
|
|
|
|
#install boot script and its config
|
|
newinitd "${FILESDIR}/intel536ep.initd" intel536ep
|
|
newconfd "${FILESDIR}/intel536ep.confd" intel536ep
|
|
}
|