|
|
LICENSE="SpeedTouch-USB-Firmware" | LICENSE="SpeedTouch-USB-Firmware" |
SLOT="0" | SLOT="0" |
KEYWORDS="~x86" | KEYWORDS="~x86" |
IUSE="" |
IUSE="atm" |
|
|
# 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. |
|
| |
RDEPEND=">=net-dialup/ppp-2.4.3-r11 | RDEPEND=">=net-dialup/ppp-2.4.3-r11 |
>=sys-apps/hotplug-20040923-r1 |
>=sys-fs/udev-086 |
>=sys-fs/udev-079-r1 |
|
!net-dialup/speedtouch" | !net-dialup/speedtouch" |
DEPEND="${RDEPEND} | DEPEND="${RDEPEND} |
app-arch/unzip" | app-arch/unzip" |
|
|
fi | fi |
| |
if ! has_version '>=sys-apps/baselayout-1.12.0_pre16' ; then | 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 "The best way of using this driver is through the pppd net module of" |
ewarn ">=sys-apps/baselayout-1.12.0_pre16 package, which is also the only" |
ewarn ">=sys-apps/baselayout-1.12.0_pre16, which is also the only" |
ewarn "documented mode of using ${CATEGORY}/${PN}." | ewarn "documented mode of using ${CATEGORY}/${PN}." |
ewarn "Please install baselayout-1.12.0_pre16 or else you will be on your own!" | ewarn "Please install baselayout-1.12.0_pre16 or else you will be on your own!" |
ebeep | ebeep |
|
|
ln -sfn speedtch-${stub}${n}.bin.4 speedtch-${n}.bin.3 | ln -sfn speedtch-${stub}${n}.bin.4 speedtch-${n}.bin.3 |
done | done |
| |
insinto /etc/hotplug/usb |
# Documentation necessary to complete the setup |
insopts -m 644 |
|
doins "${FILESDIR}/speedtch.usermap" || die "doins usermap failed" |
|
|
|
# The documentation necessary to complete the setup |
|
dodoc "${FILESDIR}/README" || die "dodoc failed" | dodoc "${FILESDIR}/README" || die "dodoc failed" |
} | } |
| |
pkg_postinst() { | 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" | 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 \ | 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 | 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" |
if use atm ; then |
einfo " - CONFIG_PPPOATM is needed only for PPPoA links." |
# Check for PPPoA support |
echo |
if ! built_with_use net-dialup/ppp atm ; then |
|
eerror "PPPoA support: net-dialup/ppp should be built with 'atm' USE flag enabled!" |
# Check user space for PPPoA support |
eerror "Run the following command if you need PPPoA support:" |
if ! built_with_use net-dialup/ppp atm ; then |
eerror " euse -E atm && emerge net-dialup/ppp" |
eerror "PPPoA support: net-dialup/ppp should be built with 'atm' USE flag enabled!" |
echo |
ewarn "Run the following command if you need PPPoA support:" |
fi |
einfo " euse -E atm && emerge net-dialup/ppp" |
else |
echo |
# Check for PPPoE support |
fi |
einfo "Defaulting to PPPoE - the 'atm' USE flag is not enabled" |
# Check user space PPPoE support |
if ! has_version net-misc/br2684ctl ; then |
if ! has_version net-misc/br2684ctl ; then |
eerror "PPPoE support: net-misc/br2684ctl is not installed!" |
eerror "PPPoE support: net-misc/br2684ctl is not installed!" |
eerror "Run the following command if you need PPPoE support:" |
ewarn "Run the following command if you need PPPoE support:" |
eerror " emerge net-misc/br2684ctl" |
einfo " emerge net-misc/br2684ctl" |
echo |
echo |
fi |
fi | fi |
| |
ewarn "To complete the installation, you must read the documentation available in" | ewarn "To complete the installation, you must read the documentation available in" |
ewarn " ${ROOT}usr/share/doc/${PF}" |
ewarn " ${ROOT}usr/share/doc/${PF}" |
} | } |