# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils linux-info DESCRIPTION="A GPL version of the divactrl utility for supported active ISDN cards from Eicon Networks" HOMEPAGE="http://www.melware.de/en/" SRC_URI="ftp://ftp.melware.de/divas/v3/divas4linux-melware-3.0.2-106.650-1.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="net-dialup/diva-kernel" RDEPEND="net-dialup/diva-kernel net-dialup/diva-firmware net-dialup/diva-scripts" S=${WORKDIR}/divas4linux-melware-3.0.2-106.650-1/divactrl src_unpack() { unpack divas4linux-melware-3.0.2-106.650-1.tar.bz2 cd "${S}" epatch "${FILESDIR}"/Makefile.in.patch } src_compile() { if kernel_is 2 6 then mkdir -p ./dlinux/drivers/isdn/hardware; \ ln -s `pwd`/../kernel26 ./dlinux/drivers/isdn/hardware/eicon; \ else enotice "No Kernel 2.4 support implemented in this ebuild yet." # mkdir -p ./dlinux/drivers/isdn; \ # ln -s `pwd`/../kernel24 ./dlinux/drivers/isdn/eicon; \ fi econf || die "econf failed" ./configure \ --host=${CHOST} \ --prefix=${D} \ --datadir=${D}/usr/lib/divas \ --with-firmware=/usr/lib/divas \ --with-kernel=`pwd`/dlinux \ --sbindir=/sbin \ --infodir=/usr/share/info \ --mandir=/usr/share/man || die "./configure failed" emake || die "emake failed" } src_install() { mkdir -p "${D}"/usr/lib/divas cp "${WORKDIR}"/divas4linux-melware-3.0.2-106.650-1/divactrl/divactrl "${D}"/usr/lib/divas } pkg_postinst() { echo einfo "divactrl has beed installed" einfo "" einfo "The active Diva Server ISDN cards do not have ROM on board, thus the" einfo "divactrl utility needs to upload the firmware binary to the" einfo "Diva card upon startup, which is then run by the on-board processor." echo ewarn "Two more manual commandline steps are necessary to get the card up and running." echo ewarn "STEP 1:" ewarn "You have to run the Config script to build a working configuration for your card." ewarn "" ewarn "/usr/lib/eicon/divas/Config" echo ewarn "STEP 2:" ewarn "Now you have to make sure your card gets loaded upon boot by running." ewarn "" ewarn "rc-update add diva default" echo }