--- speedtouch-usb-3.0.1.2.ebuild-old 2006-03-19 09:24:58.000000000 +0000 +++ speedtouch-usb-3.0.1.2.ebuild 2006-03-19 13:21:31.000000000 +0000 @@ -12,16 +12,10 @@ LICENSE="SpeedTouch-USB-Firmware" SLOT="0" KEYWORDS="~x86" -IUSE="" - -# udev replaces hotplug, as mentioned at -# http://www.linux-usb.org/SpeedTouch/firmware/firmware.html -# hotplug only needs to be *installed*, to create /etc/hotplug/usb/ - it does -# not need to be running. +IUSE="atm" RDEPEND=">=net-dialup/ppp-2.4.3-r11 - >=sys-apps/hotplug-20040923-r1 - >=sys-fs/udev-079-r1 + >=sys-fs/udev-086 !net-dialup/speedtouch" DEPEND="${RDEPEND} app-arch/unzip" @@ -38,8 +32,8 @@ fi if ! has_version '>=sys-apps/baselayout-1.12.0_pre16' ; then - ewarn "The best way of using speedtouch driver is through pppd net module of the" - ewarn ">=sys-apps/baselayout-1.12.0_pre16 package, which is also the only" + ewarn "The best way of using this driver is through the pppd net module of" + ewarn ">=sys-apps/baselayout-1.12.0_pre16, which is also the only" ewarn "documented mode of using ${CATEGORY}/${PN}." ewarn "Please install baselayout-1.12.0_pre16 or else you will be on your own!" ebeep @@ -83,42 +77,46 @@ ln -sfn speedtch-${stub}${n}.bin.4 speedtch-${n}.bin.3 done - insinto /etc/hotplug/usb - insopts -m 644 - doins "${FILESDIR}/speedtch.usermap" || die "doins usermap failed" - - # The documentation necessary to complete the setup + # Documentation necessary to complete the setup dodoc "${FILESDIR}/README" || die "dodoc failed" } pkg_postinst() { - [[ -e /etc/hotplug/usb.usermap ]] && egrep -q " 0x06[bB]9 +0x4061 " /etc/hotplug/usb.usermap && \ + local kernel_modules + + [[ -e /etc/hotplug/usb.usermap ]] && egrep -q " 0x06[bB]9 +0x4061 " \ + /etc/hotplug/usb.usermap && \ ewarn "Please remove the SpeedTouch line from /etc/hotplug/usb.usermap" - #Check kernel configuration + # Check kernel configuration + if use atm ; then + kernel_modules="~PPPOATM" + else + kernel_modules="~PPPOE ~ATM_BR2684" + fi CONFIG_CHECK="~FW_LOADER ~NET ~PACKET ~ATM ~NETDEVICES \ - ~PPP ~PPPOATM ~ATM_BR2684 ~USB_DEVICEFS ~USB_ATM ~USB_SPEEDTOUCH" + ~PPP ${kernel_modules} ~USB_DEVICEFS ~USB_ATM ~USB_SPEEDTOUCH" check_extra_config - einfo "Note: All the above kernel configurations are required except the following:" - einfo " - CONFIG_ATM_BR2684 is needed only for PPPoE links, while" - einfo " - CONFIG_PPPOATM is needed only for PPPoA links." - echo - - # Check user space for PPPoA support - if ! built_with_use net-dialup/ppp atm ; then - eerror "PPPoA support: net-dialup/ppp should be built with 'atm' USE flag enabled!" - ewarn "Run the following command if you need PPPoA support:" - einfo " euse -E atm && emerge net-dialup/ppp" - echo - fi - # Check user space PPPoE support - if ! has_version net-misc/br2684ctl ; then - eerror "PPPoE support: net-misc/br2684ctl is not installed!" - ewarn "Run the following command if you need PPPoE support:" - einfo " emerge net-misc/br2684ctl" - echo + + if use atm ; then + # Check for PPPoA support + if ! built_with_use net-dialup/ppp atm ; then + eerror "PPPoA support: net-dialup/ppp should be built with 'atm' USE flag enabled!" + eerror "Run the following command if you need PPPoA support:" + eerror " euse -E atm && emerge net-dialup/ppp" + echo + fi + else + # Check for PPPoE support + einfo "Defaulting to PPPoE - the 'atm' USE flag is not enabled" + if ! has_version net-misc/br2684ctl ; then + eerror "PPPoE support: net-misc/br2684ctl is not installed!" + eerror "Run the following command if you need PPPoE support:" + eerror " emerge net-misc/br2684ctl" + echo + fi fi ewarn "To complete the installation, you must read the documentation available in" - ewarn " ${ROOT}usr/share/doc/${PF}" + ewarn " ${ROOT}usr/share/doc/${PF}" }