# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.7.14.ebuild,v 1.1 2003/10/29 05:12:59 spyderous Exp $ inherit kernel-mod DESCRIPTION="Driver for Smart Link modem" HOMEPAGE="http://www.smlink.com/" SRC_URI="ftp://ftp.smlink.com/linux/unsupported/${P}.tar.gz" LICENSE="Smart-Link" SLOT="0" KEYWORDS="x86" IUSE="" RDEPEND="virtual/glibc" pkg_setup() { check_KV } src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${PF}-makefile-fixup.patch #don't need this as of 2.9.6 #epatch ${FILESDIR}/${PN}-${PV:0:3}-devfs-2.4-kernels.patch } src_compile() { # No good way of compiling external modules yet if [ "${KV_MAJOR}" = "2" -a "${KV_MINOR}" = "6" ] then addwrite /usr/src/linux fi emake || die } src_install() { make install || die dodoc README README.1st Changes # Install /etc/{devfs,modules,init,conf}.d/slmodem files insinto /etc/devfs.d/; newins ${FILESDIR}/${PN}-${PV:0:3}.devfs ${PN} insinto /etc/modules.d/; newins ${FILESDIR}/${PN}-${PV:0:3}.modules ${PN} insinto /etc/conf.d/; newins ${FILESDIR}/rc.conf-${PV:0:3} ${PN} exeinto /etc/init.d/; newexe ${FILESDIR}/rc.init-${PV:0:3} ${PN} # slmodemd wants this dodir /var/lib/slmodem } pkg_postinst() { # Make some devices if we aren't using devfs if [ ! -e ${ROOT}dev/.devfsd ] then ebegin "Creating /dev nodes" local MODEM="slamr slusb" # slamr = 212, slusb = 213 local MAJOR="212" for i in ${MODEM} do local C="0" while [ "${C}" -lt "4" ] do if [ ! -c ${ROOT}dev/${MODEM}${C} ] then mknod ${ROOT}dev/${MODEM}${C} c ${MAJOR} 0 fi C="`expr ${C} + 1`" done MAJOR="`expr ${MAJOR} + 1`" done eend 0 else ebegin "Restarting devfsd to create /dev/modem symlink" killall -HUP devfsd eend 0 fi echo einfo "You must edit /etc/conf.d/${PN} and /etc/modules.d/${PN}" einfo "After that, run modules-update to complete configuration." echo ewarn "IMPORTANT: There is a new, required userland daemon." echo }