--- /usr/portage/net-dialup/fritzcapi/fritzcapi-2.6.26.7-r3.ebuild 2004-12-12 23:14:02.000000000 +0100 +++ fritzcapi-2.6.26.7-r3.ebuild 2004-12-18 23:11:12.000000000 +0100 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-dialup/fritzcapi/fritzcapi-2.6.26.7-r3.ebuild,v 1.1 2004/12/12 22:14:02 mrness Exp $ -inherit kernel-mod rpm eutils +inherit linux-mod rpm eutils S="${WORKDIR}/usr/src/kernel-modules/fritzcapi" @@ -17,24 +17,26 @@ IUSE="pcmcia usb" RDEPEND=">=net-dialup/capi4k-utils-20040810" -DEPEND="${RDEPEND} - virtual/linux-sources" FRITZCAPI_MODULES=("fcclassic" "fcpci" "fcpcmcia" "fcpnp" "fcusb" "fcusb2" "fxusb_CZ" "fxusb") FRITZCAPI_TARGETS=("fritz.classic" "fritz.pci" "fritz.pcmcia" "fritz.pnp" "fritz.usb" "fritz.usb2" "fritz.xusb_CZ" "fritz.xusb") +BUILD_PARAMS="KDIR=${KV_DIR}" +BUILD_TARGETS="all" + pkg_setup() { - if ! kernel-mod_is_2_6_kernel; then + linux-mod_pkg_setup + if ! kernel_is 2 6; then die "This package works only with 2.6 kernel!" fi - if ! kernel-mod_configoption_present ISDN_CAPI_CAPI20; then + if ! linux_chkconfig_present ISDN_CAPI_CAPI20; then die "For using the driver you need a kernel with enabled CAPI support." fi - kernel-mod_check_modules_supported local USERCARD CARD FRITZCAPI_BUILD_CARDS="" FRITZCAPI_BUILD_TARGETS="" + MODULE_NAMES="" if [ -n "${FRITZCAPI_CARDS}" ]; then #Check existence of user selected cards for USERCARD in ${FRITZCAPI_CARDS} ; do @@ -68,28 +70,17 @@ fi FRITZCAPI_BUILD_CARDS="${FRITZCAPI_BUILD_CARDS} ${FRITZCAPI_MODULES[CARD]}" FRITZCAPI_BUILD_TARGETS="${FRITZCAPI_BUILD_TARGETS} ${FRITZCAPI_TARGETS[CARD]}" + MODULE_NAMES="${MODULE_NAMES} ${FRITZCAPI_MODULES[CARD]}(:${S}/${FRITZCAPI_TARGETS[CARD]}/src)" done fi einfo "Selected cards: ${FRITZCAPI_BUILD_CARDS}" } -src_unpack() { - rpm_src_unpack ${A} || die "Could not unpack RPM package." -} - -src_compile() { - ( - unset ARCH - emake KERNEL_SOURCE="${ROOT}/usr/src/linux" TARGETS="${FRITZCAPI_BUILD_TARGETS}" modules || \ - die "emake modules failed" - ) -} - src_install() { + linux-mod_src_install + dodir /lib/firmware /etc - insinto /lib/modules/${KV_VERSION_FULL}/extra - doins fritz.*/src/*.ko echo -e "# card\tfile\tproto\tio\tirq\tmem\tcardnr\toptions" >${D}/etc/capi.conf echo "#" >>${D}/etc/capi.conf @@ -116,11 +107,9 @@ } pkg_postinst() { - einfo "Checking kernel module dependencies" - [ -r "${ROOT}/usr/src/linux/System.map" ] && \ - depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV} + linux-mod_pkg_postinst - einfo "If your device need a firmware, you should edit copy the firmware files" + einfo "If your device needs a firmware, you should edit copy the firmware files" einfo "in /lib/firmware and edit /etc/capi.conf." einfo [ "${FRITZCAPI_BUILD_TARGETS/usb2/}" != "${FRITZCAPI_BUILD_TARGETS}" ] && (