From 06b92806b88874f54e739b349e9ce20f17012963 Mon Sep 17 00:00:00 2001 From: Alin Năstac Date: Thu, 6 Jan 2005 23:12:23 +0000 Subject: remove calls to EXPORT_SYMBOL_GPL functions from slamr module (#75656) --- net-dialup/slmodem/ChangeLog | 14 +- net-dialup/slmodem/Manifest | 13 +- net-dialup/slmodem/files/digest-slmodem-2.9.10-r2 | 1 - net-dialup/slmodem/files/digest-slmodem-2.9.10-r3 | 1 - net-dialup/slmodem/files/digest-slmodem-2.9.10-r4 | 1 + .../files/slmodem-2.9.10-pci-workaround.patch | 23 ++++ net-dialup/slmodem/slmodem-2.9.10-r1.ebuild | 4 +- net-dialup/slmodem/slmodem-2.9.10-r2.ebuild | 144 --------------------- net-dialup/slmodem/slmodem-2.9.10-r3.ebuild | 144 --------------------- net-dialup/slmodem/slmodem-2.9.10-r4.ebuild | 139 ++++++++++++++++++++ 10 files changed, 179 insertions(+), 305 deletions(-) delete mode 100644 net-dialup/slmodem/files/digest-slmodem-2.9.10-r2 delete mode 100644 net-dialup/slmodem/files/digest-slmodem-2.9.10-r3 create mode 100644 net-dialup/slmodem/files/digest-slmodem-2.9.10-r4 create mode 100644 net-dialup/slmodem/files/slmodem-2.9.10-pci-workaround.patch delete mode 100644 net-dialup/slmodem/slmodem-2.9.10-r2.ebuild delete mode 100644 net-dialup/slmodem/slmodem-2.9.10-r3.ebuild create mode 100644 net-dialup/slmodem/slmodem-2.9.10-r4.ebuild (limited to 'net-dialup') diff --git a/net-dialup/slmodem/ChangeLog b/net-dialup/slmodem/ChangeLog index 33cbedca883f..e8352e466a21 100644 --- a/net-dialup/slmodem/ChangeLog +++ b/net-dialup/slmodem/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-dialup/slmodem -# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.34 2004/12/29 22:38:21 mrness Exp $ +# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.35 2005/01/06 23:12:23 mrness Exp $ + +*slmodem-2.9.10-r4 (07 Jan 2005) + + 07 Jan 2005; Alin Nastac + +files/slmodem-2.9.10-pci-workaround.patch, -slmodem-2.9.10-r2.ebuild, + -slmodem-2.9.10-r3.ebuild, +slmodem-2.9.10-r4.ebuild: + Fix slamr module for kernels >= 2.6.10, thanks to Daniel Drake + . See bug #75656. *slmodem-2.9.10-r3 (29 Dec 2004) @@ -19,7 +27,7 @@ +files/slmodem-2.9.10-usb_endpoint_halted-gentoo.patch, +files/slusb.hotplug, +slmodem-2.9.10-r2.ebuild: Solve undefined symbol error for slusb when is compiled against kernel - versions >= 2.69. See bug #74073. + versions >= 2.6.9. See bug #74073. *slmodem-2.9.10-r2 (14 Dec 2004) diff --git a/net-dialup/slmodem/Manifest b/net-dialup/slmodem/Manifest index 4529c7cbede1..481aa3cc5d4d 100644 --- a/net-dialup/slmodem/Manifest +++ b/net-dialup/slmodem/Manifest @@ -1,25 +1,18 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 075f91989789dd232a547218cbaacf28 slmodem-2.9.10-r1.ebuild 3964 MD5 3fe3a33ae66faf17ff21ee73e21d69a6 slmodem-2.9.10-r3.ebuild 4097 MD5 536adbca9848d8a84bb81c32b49e227f slmodem-2.9.10-r2.ebuild 3895 MD5 dcd0f77f2d71d5158bdc7701e3f98b58 ChangeLog 8294 MD5 93dd8a9d0c0f815e8445d9f0c1fc0910 metadata.xml 578 +MD5 725673878f3528f218900eba0ac34615 slmodem-2.9.10-r4.ebuild 4029 MD5 a5c2c40e3a6c4665033c97bb9088f03d files/slusb.hotplug 262 MD5 026f2e2fae1fbd999455b36630164a88 files/slmodem-2.9.10-usb_endpoint_halted-gentoo.patch 830 MD5 8834a62c67909059cef10887bfbcc853 files/slmodem-2.9.modules 494 +MD5 66761da676b75588b6070bb128104c13 files/slmodem-2.9.10-pci-workaround.patch 872 MD5 67543ad2e41e6dbc2150057340bb82b1 files/slmodem-2.9.conf 752 MD5 64d03a3c87a5330faa6b8dd9d344b6a3 files/slmodem-2.9.init 2657 MD5 ccc7e1460f0678c4e3e8b8c3747834a5 files/digest-slmodem-2.9.10-r1 66 MD5 ccc7e1460f0678c4e3e8b8c3747834a5 files/digest-slmodem-2.9.10-r2 66 MD5 ccc7e1460f0678c4e3e8b8c3747834a5 files/digest-slmodem-2.9.10-r3 66 +MD5 ccc7e1460f0678c4e3e8b8c3747834a5 files/digest-slmodem-2.9.10-r4 66 MD5 c80ecf5c3d5605220e4b0055850260a5 files/slmodem-2.9.devfs 786 MD5 190cd2721bad42e351959ae4c90fa812 files/slmodem-2.9.10-fix-for-2.6.10.patch 521 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.6 (GNU/Linux) - -iD8DBQFB0763jtv59x0+BrURAgkYAKCdtj2pzyHv49fdl66yBoj964lqwwCfSq6T -YVfsnQTb+TajUd2xBVoXG7M= -=4Xqk ------END PGP SIGNATURE----- diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.10-r2 b/net-dialup/slmodem/files/digest-slmodem-2.9.10-r2 deleted file mode 100644 index b6aff29497e8..000000000000 --- a/net-dialup/slmodem/files/digest-slmodem-2.9.10-r2 +++ /dev/null @@ -1 +0,0 @@ -MD5 cbc4918f2ee9ed4952d3f4309d364b35 slmodem-2.9.10.tar.gz 806884 diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.10-r3 b/net-dialup/slmodem/files/digest-slmodem-2.9.10-r3 deleted file mode 100644 index b6aff29497e8..000000000000 --- a/net-dialup/slmodem/files/digest-slmodem-2.9.10-r3 +++ /dev/null @@ -1 +0,0 @@ -MD5 cbc4918f2ee9ed4952d3f4309d364b35 slmodem-2.9.10.tar.gz 806884 diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.10-r4 b/net-dialup/slmodem/files/digest-slmodem-2.9.10-r4 new file mode 100644 index 000000000000..b6aff29497e8 --- /dev/null +++ b/net-dialup/slmodem/files/digest-slmodem-2.9.10-r4 @@ -0,0 +1 @@ +MD5 cbc4918f2ee9ed4952d3f4309d364b35 slmodem-2.9.10.tar.gz 806884 diff --git a/net-dialup/slmodem/files/slmodem-2.9.10-pci-workaround.patch b/net-dialup/slmodem/files/slmodem-2.9.10-pci-workaround.patch new file mode 100644 index 000000000000..a24ef1279e23 --- /dev/null +++ b/net-dialup/slmodem/files/slmodem-2.9.10-pci-workaround.patch @@ -0,0 +1,23 @@ +get_device, put_device and device_release_driver are no longer available to non-GPL modules. +The whole process of unregistering the device from another driver seems dodgy, lets just skip it + +--- slmodem-2.9.10/drivers/amrmo_init.c.orig 2005-01-03 14:52:23.178287912 +0000 ++++ slmodem-2.9.10/drivers/amrmo_init.c 2005-01-03 15:06:46.603027400 +0000 +@@ -718,15 +718,8 @@ + dev->driver->remove(dev); + dev->driver = NULL; + #else +- struct device *reldev = get_device(&dev->dev); +- AMRMO_DBG("device %04x:%04x is grabbed by driver %s: try to release\n", +- dev->vendor,dev->device, +- (reldev&&reldev->driver)? +- reldev->driver->name:"unknown"); +- if (reldev) { +- device_release_driver(reldev); +- put_device(reldev); +- } ++ AMRMO_DBG("device %04x:%04x is grabbed by another driver, ignoring", ++ dev->vendor,dev->device); + #endif + } + } diff --git a/net-dialup/slmodem/slmodem-2.9.10-r1.ebuild b/net-dialup/slmodem/slmodem-2.9.10-r1.ebuild index ff6a7d6068ac..e22c005213ff 100644 --- a/net-dialup/slmodem/slmodem-2.9.10-r1.ebuild +++ b/net-dialup/slmodem/slmodem-2.9.10-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.10-r1.ebuild,v 1.5 2004/12/29 22:38:21 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.10-r1.ebuild,v 1.6 2005/01/06 23:12:23 mrness Exp $ inherit kernel-mod eutils diff --git a/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild b/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild deleted file mode 100644 index 4e61417728a2..000000000000 --- a/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild,v 1.5 2004/12/29 22:38:21 mrness Exp $ - -inherit eutils linux-info - -DESCRIPTION="Driver for Smart Link modem" -HOMEPAGE="http://www.smlink.com/" -SRC_URI="http://www.smlink.com/main/down/${P}.tar.gz" -LICENSE="Smart-Link" -SLOT="0" -KEYWORDS="~x86 -*" -IUSE="alsa usb" - -DEPEND="virtual/libc - alsa? ( media-libs/alsa-lib ) - virtual/os-headers - >=sys-apps/sed-4" - -RDEPEND="virtual/libc - alsa? ( media-libs/alsa-lib )" - -pkg_setup() { - check_modules_supported -} - -src_unpack() { - unpack ${A} - cd ${S} - epatch ${FILESDIR}/${P}-usb_endpoint_halted-gentoo.patch || die "failed to patch" -} - -src_compile() { - if use alsa - then - export SUPPORT_ALSA=1 - else - unset SUPPORT_ALSA - fi - - # http://marc.theaimsgroup.com/?l=gentoo-dev&m=109672618708314&w=2 - if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]; then - sed -i 's:SUBDIRS=:M=:g' drivers/Makefile - fi - - unset ARCH - - emake \ - KERNEL_DIR="${ROOT}/usr/src/linux" \ - modem drivers || die "Failed to compile driver" -} - -src_install() { - if kernel_is 2 6 ; then - KV_OBJ="ko" - else - KV_OBJ="o" - fi - - insinto /lib/modules/${KV}/extra - doins drivers/slamr.${KV_OBJ} - doins drivers/slusb.${KV_OBJ} - - newsbin modem/modem_test slmodem_test - dosbin modem/slmodemd - dodir /var/lib/slmodem - fowners root:dialout /var/lib/slmodem - keepdir /var/lib/slmodem - - dodoc COPYING Changes README - - # Install /etc/{devfs,modules,init,conf}.d/slmodem files - insinto /etc/conf.d/; newins ${FILESDIR}/${PN}-2.9.conf ${PN} - insopts -m0755; insinto /etc/init.d/; newins ${FILESDIR}/${PN}-2.9.init ${PN} - sed -i -e "s/ALSACONF//g" -e "s/PCICONF//g" -e "s/USBCONF//g" ${D}/etc/conf.d/slmodem - - # Make some devices if we aren't using devfs - # If we are using devfs, restart it - if [ -e ${ROOT}/dev/.devfsd ] ; then - # devfs - insinto /etc/devfs.d/; newins ${FILESDIR}/${PN}-2.9.devfs ${PN} - insinto /etc/modules.d/; newins ${FILESDIR}/${PN}-2.9.modules ${PN} - chmod 644 ${D}/etc/modules.d/slmodem - elif [ -e ${ROOT}/dev/.udev ] ; then - # udev - # check Symlink - dodir /etc/udev/rules.d/ - echo 'KERNEL="slamr", NAME="slamr0"' > \ - ${D}/etc/udev/rules.d/55-${PN}.rules - echo 'KERNEL="slusb", NAME="slusb0"' >> \ - ${D}/etc/udev/rules.d/55-${PN}.rules - dodir /etc/udev/permissions.d - echo 'slamr*:root:dialout:0660' > \ - ${D}/etc/udev/permissions.d/55-${PN}.permissions - else - make -C drivers DESTDIR=${D} KERNEL_DIR="${ROOT}/usr/src/linux" install-devices - fi - - # Install hotplug script - insinto /etc/hotplug/usb; insopts -m0755; newins ${FILESDIR}/slusb.hotplug slusb - - dodir /etc/hotplug/blacklist.d - echo -e "slusb\nslamr\nsnd-intel8x0m" >> ${D}/etc/hotplug/blacklist.d/55-${PN} -} - -pkg_postinst() { - # Make some devices if we aren't using devfs - # If we are using devfs, restart it - if [ -e ${ROOT}/dev/.devfsd ] - then - ebegin "Restarting devfsd to reread devfs rules" - killall -HUP devfsd - eend 0 - einfo "modules-update to complete configuration." - - elif [ -e ${ROOT}/dev/.udev ] - then - ebegin "Restarting udev to reread udev rules" - udevstart - eend 0 - fi - - echo - - einfo "You must edit /etc/conf.d/${PN} for your configuration" - - ewarn "To avoid problems add slusb/slamr to /etc/hotplug/blacklist" - - einfo "To add slmodem to your startup - type : rc-update add slmodem default" - - if use alsa; - then - einfo "I hope you have already added alsa to your startup: " - einfo "otherwise type: rc-update add alsasound boot" - einfo - einfo "If you need to use snd-intel8x0m from the kernel" - einfo "compile it as a module and edit /etc/module.d/alsa" - einfo 'to: "alias snd-card-(number) snd-intel8x0m"' - fi - - einfo "Checking kernel module dependencies" - test -r "${ROOT}/usr/src/linux/System.map" && \ - depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV} -} diff --git a/net-dialup/slmodem/slmodem-2.9.10-r3.ebuild b/net-dialup/slmodem/slmodem-2.9.10-r3.ebuild deleted file mode 100644 index a40d830d8391..000000000000 --- a/net-dialup/slmodem/slmodem-2.9.10-r3.ebuild +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.10-r3.ebuild,v 1.3 2004/12/30 08:39:09 mrness Exp $ - -inherit eutils linux-mod - -DESCRIPTION="Driver for Smart Link modem" -HOMEPAGE="http://www.smlink.com/" -SRC_URI="http://www.smlink.com/main/down/${P}.tar.gz" -LICENSE="Smart-Link" -SLOT="0" -KEYWORDS="~x86 -*" -IUSE="alsa usb" - -DEPEND="virtual/libc - alsa? ( media-libs/alsa-lib ) - virtual/os-headers - >=sys-apps/sed-4" - -RDEPEND="virtual/libc - alsa? ( media-libs/alsa-lib )" - -pkg_setup() { - MODULE_NAMES="" - if kernel_is ge 2 6 10; then - ewarn "slamr isn't compatible with kernel versions >= 2.6.10!" - ewarn "It will not be installed" - else - MODULE_NAMES="slamr(extra:${S}/drivers)" - fi - useq usb && MODULE_NAMES="${MODULE_NAMES} slusb(extra:${S}/drivers)" - BUILD_TARGETS="all" - - local CONFIG_CHECK="" - if useq alsa; then - CONFIG_CHECK="${CONFIG_CHECK} SND" - fi - if useq usb; then - CONFIG_CHECK="${CONFIG_CHECK} USB" - fi - - linux-mod_pkg_setup -} - -src_unpack() { - unpack ${A} - cd ${S} - epatch ${FILESDIR}/${P}-usb_endpoint_halted-gentoo.patch || die "failed to apply fix for usb_endpoint" - - convert_to_m drivers/Makefile - - if kernel_is ge 2 6 10; then - epatch ${FILESDIR}/${P}-fix-for-2.6.10.patch || die "failed to apply fix for kernels >= 2.6.10" - fi -} - -src_compile() { - local MAKE_PARAMS="" - if useq alsa; then - MAKE_PARAMS="SUPPORT_ALSA=1" - fi - emake ${MAKE_PARAMS} modem || die "failed to build modem" - - linux-mod_src_compile -} - -src_install() { - linux-mod_src_install - - cd ${S} - newsbin modem/modem_test slmodem_test - dosbin modem/slmodemd - dodir /var/lib/slmodem - fowners root:dialout /var/lib/slmodem - keepdir /var/lib/slmodem - - dodoc COPYING Changes README - - # Install /etc/{devfs,modules,init,conf}.d/slmodem files - insinto /etc/conf.d/; newins ${FILESDIR}/${PN}-2.9.conf ${PN} - insopts -m0755; insinto /etc/init.d/; newins ${FILESDIR}/${PN}-2.9.init ${PN} - sed -i -e "s/ALSACONF//g" -e "s/PCICONF//g" -e "s/USBCONF//g" ${D}/etc/conf.d/slmodem - - # Make some devices if we aren't using devfs - # If we are using devfs, restart it - if [ -e ${ROOT}/dev/.devfsd ] ; then - # devfs - insinto /etc/devfs.d/; newins ${FILESDIR}/${PN}-2.9.devfs ${PN} - elif [ -e ${ROOT}/dev/.udev ] ; then - # udev - # check Symlink - dodir /etc/udev/rules.d/ - echo 'KERNEL="slamr", NAME="slamr0"' > \ - ${D}/etc/udev/rules.d/55-${PN}.rules - echo 'KERNEL="slusb", NAME="slusb0"' >> \ - ${D}/etc/udev/rules.d/55-${PN}.rules - dodir /etc/udev/permissions.d - echo 'slamr*:root:dialout:0660' > \ - ${D}/etc/udev/permissions.d/55-${PN}.permissions - fi - - #Create device nodes, add module aliases and install hotplug script - make -C drivers DESTDIR=${D} KERNEL_DIR="${ROOT}/usr/src/linux" install-devices - insinto /etc/modules.d/; insopts -m0644; newins ${FILESDIR}/${PN}-2.9.modules ${PN} - useq usb && - ( insinto /etc/hotplug/usb; insopts -m0755; newins ${FILESDIR}/slusb.hotplug slusb ) - - dodir /etc/hotplug/blacklist.d - echo -e "slusb\nslamr\nsnd-intel8x0m" >> ${D}/etc/hotplug/blacklist.d/55-${PN} -} - -pkg_postinst() { - linux-mod_pkg_postinst - - # Make some devices if we aren't using devfs - # If we are using devfs, restart it - if [ -e ${ROOT}/dev/.devfsd ]; then - ebegin "Restarting devfsd to reread devfs rules" - killall -HUP devfsd - eend $? - - elif [ -e ${ROOT}/dev/.udev ]; then - ebegin "Restarting udev to reread udev rules" - udevstart - eend $? - fi - - if [ ! -e ${ROOT}/dev/ppp ]; then - mknod ${ROOT}/dev/ppp c 108 0 - fi - - ewarn "To avoid problems, slusb/slamr have been added to /etc/hotplug/blacklist" - einfo "You must edit /etc/conf.d/${PN} for your configuration" - einfo "To add slmodem to your startup - type : rc-update add slmodem default" - - if use alsa; then - einfo "I hope you have already added alsa to your startup: " - einfo "otherwise type: rc-update add alsasound boot" - einfo - einfo "If you need to use snd-intel8x0m from the kernel" - einfo "compile it as a module and edit /etc/module.d/alsa" - einfo 'to: "alias snd-card-(number) snd-intel8x0m"' - fi -} diff --git a/net-dialup/slmodem/slmodem-2.9.10-r4.ebuild b/net-dialup/slmodem/slmodem-2.9.10-r4.ebuild new file mode 100644 index 000000000000..2b7277373a5d --- /dev/null +++ b/net-dialup/slmodem/slmodem-2.9.10-r4.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.10-r4.ebuild,v 1.1 2005/01/06 23:12:23 mrness Exp $ + +inherit eutils linux-mod + +DESCRIPTION="Driver for Smart Link modem" +HOMEPAGE="http://www.smlink.com/" +SRC_URI="http://www.smlink.com/main/down/${P}.tar.gz" +LICENSE="Smart-Link" +SLOT="0" +KEYWORDS="~x86 -*" +IUSE="alsa usb" + +DEPEND="virtual/libc + alsa? ( media-libs/alsa-lib ) + virtual/os-headers + >=sys-apps/sed-4" + +RDEPEND="virtual/libc + alsa? ( media-libs/alsa-lib )" + +pkg_setup() { + MODULE_NAMES="slamr(extra:${S}/drivers)" + useq usb && MODULE_NAMES="${MODULE_NAMES} slusb(extra:${S}/drivers)" + BUILD_TARGETS="all" + + local CONFIG_CHECK="" + if useq alsa; then + CONFIG_CHECK="${CONFIG_CHECK} SND" + fi + if useq usb; then + CONFIG_CHECK="${CONFIG_CHECK} USB" + fi + + linux-mod_pkg_setup +} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-usb_endpoint_halted-gentoo.patch || die "failed to apply usb_endpoint patch" + epatch ${FILESDIR}/${P}-pci-workaround.patch || die "failed to apply pci workaround patch" + + convert_to_m drivers/Makefile + + if kernel_is ge 2 6 10; then + epatch ${FILESDIR}/${P}-fix-for-2.6.10.patch || die "failed to apply fix for kernels >= 2.6.10" + fi +} + +src_compile() { + local MAKE_PARAMS="" + if useq alsa; then + MAKE_PARAMS="SUPPORT_ALSA=1" + fi + emake ${MAKE_PARAMS} modem || die "failed to build modem" + + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install + + cd ${S} + newsbin modem/modem_test slmodem_test + dosbin modem/slmodemd + dodir /var/lib/slmodem + fowners root:dialout /var/lib/slmodem + keepdir /var/lib/slmodem + + dodoc COPYING Changes README + + # Install /etc/{devfs,modules,init,conf}.d/slmodem files + insinto /etc/conf.d/; newins ${FILESDIR}/${PN}-2.9.conf ${PN} + insopts -m0755; insinto /etc/init.d/; newins ${FILESDIR}/${PN}-2.9.init ${PN} + sed -i -e "s/ALSACONF//g" -e "s/PCICONF//g" -e "s/USBCONF//g" ${D}/etc/conf.d/slmodem + + # Make some devices if we aren't using devfs + # If we are using devfs, restart it + if [ -e ${ROOT}/dev/.devfsd ] ; then + # devfs + insinto /etc/devfs.d/; newins ${FILESDIR}/${PN}-2.9.devfs ${PN} + elif [ -e ${ROOT}/dev/.udev ] ; then + # udev + # check Symlink + dodir /etc/udev/rules.d/ + echo 'KERNEL="slamr", NAME="slamr0"' > \ + ${D}/etc/udev/rules.d/55-${PN}.rules + echo 'KERNEL="slusb", NAME="slusb0"' >> \ + ${D}/etc/udev/rules.d/55-${PN}.rules + dodir /etc/udev/permissions.d + echo 'slamr*:root:dialout:0660' > \ + ${D}/etc/udev/permissions.d/55-${PN}.permissions + fi + + #Create device nodes, add module aliases and install hotplug script + make -C drivers DESTDIR=${D} KERNEL_DIR="${ROOT}/usr/src/linux" install-devices + insinto /etc/modules.d/; insopts -m0644; newins ${FILESDIR}/${PN}-2.9.modules ${PN} + useq usb && + ( insinto /etc/hotplug/usb; insopts -m0755; newins ${FILESDIR}/slusb.hotplug slusb ) + + dodir /etc/hotplug/blacklist.d + echo -e "slusb\nslamr\nsnd-intel8x0m" >> ${D}/etc/hotplug/blacklist.d/55-${PN} +} + +pkg_postinst() { + linux-mod_pkg_postinst + + # Make some devices if we aren't using devfs + # If we are using devfs, restart it + if [ -e ${ROOT}/dev/.devfsd ]; then + ebegin "Restarting devfsd to reread devfs rules" + killall -HUP devfsd + eend $? + + elif [ -e ${ROOT}/dev/.udev ]; then + ebegin "Restarting udev to reread udev rules" + udevstart + eend $? + fi + + if [ ! -e ${ROOT}/dev/ppp ]; then + mknod ${ROOT}/dev/ppp c 108 0 + fi + + ewarn "To avoid problems, slusb/slamr have been added to /etc/hotplug/blacklist" + einfo "You must edit /etc/conf.d/${PN} for your configuration" + einfo "To add slmodem to your startup - type : rc-update add slmodem default" + + if use alsa; then + einfo "I hope you have already added alsa to your startup: " + einfo "otherwise type: rc-update add alsasound boot" + einfo + einfo "If you need to use snd-intel8x0m from the kernel" + einfo "compile it as a module and edit /etc/module.d/alsa" + einfo 'to: "alias snd-card-(number) snd-intel8x0m"' + fi +} -- cgit v1.2.3-65-gdbad