# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils linux-mod linux-info toolchain-funcs DESCRIPTION="A GPL version of the kernel modules for ISDN cards from Eicon Networks" HOMEPAGE="http://www.melware.de/en/" SRC_URI="ftp://ftp.melware.de/divas/v3/divas4linux-melware-3.0.g-106.628.1-1.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND=">=virtual/linux-sources-2.6" S=${WORKDIR}/divas4linux-melware-3.0.g-106.628.1-1/kernel26 pkg_setup(){ linux-mod_pkg_setup ebegin "Checking for ISDN support enabled" linux_chkconfig_present ISDN eend $? if [[ $? -ne 0 ]] ; then eerror "You don't have ISDN support enabled, the diva modules" eerror "will not work." fi ebegin "Checking for ISDN_CAPI support enabled" linux_chkconfig_present ISDN_CAPI eend $? if [[ $? -ne 0 ]] ; then eerror "You don't have ISDN_CAPI support enabled, the diva modules" eerror "will not work." fi ebegin "Checking for ISDN_CAPI_MIDDLEWARE support enabled" linux_chkconfig_present ISDN_CAPI_MIDDLEWARE eend $? if [[ $? -ne 0 ]] ; then eerror "You don't have ISDN_CAPI_MIDDLEWARE support enabled, the diva modules" eerror "will not work." fi ebegin "Checking for ISDN_CAPI_CAPI_20 support enabled" linux_chkconfig_present ISDN_CAPI_CAPI20 eend $? if [[ $? -ne 0 ]] ; then eerror "You don't have ISDN_CAPI_CAPI20 support enabled, the diva modules" eerror "will not work." fi ebegin "Checking for ISDN_CAPI_CAPIFS_BOOL support enabled" linux_chkconfig_present ISDN_CAPI_CAPIFS_BOOL eend $? if [[ $? -ne 0 ]] ; then eerror "You don't have ISDN_CAPI_CAPIFS_BOOL support enabled, the diva modules" eerror "will not work." fi ebegin "Checking for ISDN_CAPI_CAPIFS support enabled" linux_chkconfig_present ISDN_CAPI_CAPIFS eend $? if [[ $? -ne 0 ]] ; then eerror "You don't have ISDN_CAPI_CAPIFS support enabled, the diva modules" eerror "will not work." fi ebegin "Checking for CAPI_EICON support disabled" ! linux_chkconfig_present CAPI_EICON eend $? if [[ $? -ne 0 ]] ; then eerror "You have CAPI_EICON kernel support enabled, the diva modules" eerror "will not work, these ebuilds provide their own kernel modules." fi } src_compile() { if kernel_is 2 6 then set_arch_to_kernel addwrite "/usr/src/${FK}" cp 2.6.x/Makefile . export _POSIX2_VERSION="199209" if use_m ; then make -C ${KV_DIR} M="`pwd`/kernelcapi" GCC_VER_MAJ=$(gcc-major-version) \ modules || ewarn "kernelcapi module not built" make -C ${KV_DIR} M="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \ modules || ewarn "modules not built" fi set_arch_to_portage else enotice "At the moment only kernel 2.6 is supported by these ebuilds." fi } src_install() { linux-mod_src_install mkdir -p "${D}"/usr/lib/divas mv "${WORKDIR}"/divas4linux-melware-3.0.g-106.628.1-1/kernel26/*.ko "${D}"/usr/lib/divas mv "${WORKDIR}"/divas4linux-melware-3.0.g-106.628.1-1/kernel26/kernelcapi/*.ko "${D}"/usr/lib/divas }