diff options
author | Alin Năstac <mrness@gentoo.org> | 2006-09-22 12:32:10 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2006-09-22 12:32:10 +0000 |
commit | f1f1eefcec01b5a093c3150f7376ecd12329ef72 (patch) | |
tree | ed7ca210d8d12a0f162fb378ba8cca9e60af3d33 /net-dialup/slmodem | |
parent | fix the plugins wrt multilib-strict (diff) | |
download | historical-f1f1eefcec01b5a093c3150f7376ecd12329ef72.tar.gz historical-f1f1eefcec01b5a093c3150f7376ecd12329ef72.tar.bz2 historical-f1f1eefcec01b5a093c3150f7376ecd12329ef72.zip |
Create device file with the correct major number (#148503).
Package-Manager: portage-2.1.1
Diffstat (limited to 'net-dialup/slmodem')
-rw-r--r-- | net-dialup/slmodem/ChangeLog | 9 | ||||
-rw-r--r-- | net-dialup/slmodem/files/digest-slmodem-2.9.11_pre20051101-r2 | 6 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.11.init | 28 | ||||
-rw-r--r-- | net-dialup/slmodem/slmodem-2.9.11_pre20051101-r2.ebuild | 155 |
4 files changed, 186 insertions, 12 deletions
diff --git a/net-dialup/slmodem/ChangeLog b/net-dialup/slmodem/ChangeLog index 81e408e1e338..f32c0ce9b70d 100644 --- a/net-dialup/slmodem/ChangeLog +++ b/net-dialup/slmodem/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-dialup/slmodem # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.70 2006/09/12 09:38:02 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.71 2006/09/22 12:32:10 mrness Exp $ + +*slmodem-2.9.11_pre20051101-r2 (22 Sep 2006) + + 22 Sep 2006; Alin Nastac <mrness@gentoo.org> files/slmodem-2.9.11.init, + -slmodem-2.9.11_pre20051101-r1.ebuild, + +slmodem-2.9.11_pre20051101-r2.ebuild: + Create device file with the correct major number (#148503). 12 Sep 2006; Alin Nastac <mrness@gentoo.org> slmodem-2.9.11_pre20051101-r1.ebuild: diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.11_pre20051101-r2 b/net-dialup/slmodem/files/digest-slmodem-2.9.11_pre20051101-r2 new file mode 100644 index 000000000000..047a97ea184a --- /dev/null +++ b/net-dialup/slmodem/files/digest-slmodem-2.9.11_pre20051101-r2 @@ -0,0 +1,6 @@ +MD5 56bb1ddf621b2fe26caf746aed0ac26f slmodem-2.9.11-20051101.tar.gz 833644 +RMD160 044dd97f763c68ff5c5609cb925146c5302bfb61 slmodem-2.9.11-20051101.tar.gz 833644 +SHA256 d5c456b1bab05a1606f7deaf4d5f1b9151d23377e7eb421b81082f9285de5172 slmodem-2.9.11-20051101.tar.gz 833644 +MD5 a23326976632fe7774e110cbc0636f70 ungrab-winmodem.tar.gz 1872 +RMD160 c7058f884ddf6345ddcd15c984364f4741464fbf ungrab-winmodem.tar.gz 1872 +SHA256 b9d966fa13b05876c2921f4bd030dfb151e6810958202010fab661d1689e4e11 ungrab-winmodem.tar.gz 1872 diff --git a/net-dialup/slmodem/files/slmodem-2.9.11.init b/net-dialup/slmodem/files/slmodem-2.9.11.init index e7811769530d..203af28b989d 100644 --- a/net-dialup/slmodem/files/slmodem-2.9.11.init +++ b/net-dialup/slmodem/files/slmodem-2.9.11.init @@ -27,20 +27,26 @@ function loadsalsa { } function loadsmodule { - modprobe ${MODULE}; - - if [ "$?" -gt 0 ] - then + modprobe ${MODULE} + + if [ "$?" -gt 0 ]; then eerror "Missing ${MODULE}. Please set up /etc/conf.d/slmodem" return 1; - fi + fi if [ -z "${MDEV}" ]; then MDEV="/dev/${MODULE}0"; fi - if [ ! -c "${MDEV}" ]; then mknod ${MDEV} c 242 0; fi - - if [ ! -c /dev/ppp ]; then mknod /dev/ppp c 108 0; fi + if [ ! -c "${MDEV}" ]; then + case ${MODULE} in + slamr) + mknod ${MDEV} c 242 0 + ;; + slusb) + mknod ${MDEV} c 243 0 + ;; + esac + fi - ebegin "Starting slmodemd for ${DEV}" + ebegin "Starting slmodemd for ${DEV}" start-stop-daemon --start --background --nicelevel=${NICE} --make-pidfile \ --pidfile /var/run/slmodemd.pid --startas /usr/sbin/slmodemd \ -- -country=${COUNTRY} -g=${GROUP} ${MDEV} @@ -50,6 +56,7 @@ function loadsmodule { start() { checkconfig || return 1 + if [ ! -c /dev/ppp ]; then mknod /dev/ppp c 108 0; fi # either if we use alsa or not, the only thing we need is # ttySL0, which is created by slmodemd when started (points to a pts) @@ -74,8 +81,7 @@ stop() { [ -e /var/run/slmodemd.pid ] && rm /var/run/slmodemd.pid unlink ${LN_DEV} 2> /dev/null eend ${result} - if [ ! "${MODULE}" == "alsa" ]; - then + if [ ! "${MODULE}" == "alsa" ]; then ebegin "Waiting for ${MODULE} modem driver unload" if [ "$RC_NOCOLOR" != "yes" ]; then echo -e "\e[A\e[44G " diff --git a/net-dialup/slmodem/slmodem-2.9.11_pre20051101-r2.ebuild b/net-dialup/slmodem/slmodem-2.9.11_pre20051101-r2.ebuild new file mode 100644 index 000000000000..735a8ba7bc84 --- /dev/null +++ b/net-dialup/slmodem/slmodem-2.9.11_pre20051101-r2.ebuild @@ -0,0 +1,155 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.11_pre20051101-r2.ebuild,v 1.1 2006/09/22 12:32:10 mrness Exp $ + +inherit eutils linux-mod multilib + +DESCRIPTION="Driver for Smart Link modem" +HOMEPAGE="http://linmodems.technion.ac.il/packages/smartlink/" +SRC_URI="http://linmodems.technion.ac.il/packages/smartlink/${P/_pre/-}.tar.gz + http://linmodems.technion.ac.il/packages/smartlink/ungrab-winmodem.tar.gz" + +LICENSE="Smart-Link" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="alsa usb" + +DEPEND="alsa? ( media-libs/alsa-lib ) + amd64? ( app-emulation/emul-linux-x86-soundlibs )" + +QA_EXECSTACK="usr/sbin/slmodem_test usr/sbin/slmodemd" + +S=${WORKDIR}/${P/_pre/-} + +pkg_setup() { + use amd64 && multilib_toolchain_setup x86 + + MODULE_NAMES="ungrab-winmodem(:${WORKDIR}/ungrab-winmodem)" + if ! use amd64; then + MODULE_NAMES="${MODULE_NAMES} slamr(net:${S}/drivers)" + if use usb; then + MODULE_NAMES="${MODULE_NAMES} slusb(net:${S}/drivers)" + CONFIG_CHECK="USB" + fi + fi + BUILD_TARGETS="all" + linux-mod_pkg_setup + BUILD_PARAMS="KERNEL_DIR=${KV_DIR}" +} + +src_unpack() { + unpack ${A} + sed -i "s:SUBDIRS=\$(shell pwd):SUBDIRS=${WORKDIR}/ungrab-winmodem:" \ + "${WORKDIR}/ungrab-winmodem/Makefile" + convert_to_m "${WORKDIR}/ungrab-winmodem/Makefile" + + cd "${S}" + epatch "${FILESDIR}/${P%%_*}-makefile.patch" + epatch "${FILESDIR}/${P%%_*}-kernel-2.6.18.patch" + cd drivers + sed -i "s:SUBDIRS=\$(shell pwd):SUBDIRS=${S}/drivers:" Makefile + convert_to_m Makefile + sed -i "s:.*=[ \t]*THIS_MODULE.*::" st7554.c amrmo_init.c old_st7554.c + sed -i 's:MODULE_PARM(\([^,]*\),"i");:module_param(\1, int, 0);:' st7554.c \ + amrmo_init.c old_st7554.c +} + +src_compile() { + local MAKE_PARAMS="" + if use alsa || use amd64; then + MAKE_PARAMS="SUPPORT_ALSA=1" + fi + emake ${MAKE_PARAMS} modem || die "failed to build modem" + + use amd64 && multilib_toolchain_setup amd64 + 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 + + newconfd "${FILESDIR}/${PN}-2.9.conf" ${PN} + newinitd "${FILESDIR}/${PN}-2.9.11.init" ${PN} + + # configure for alsa - or not for alsa + if use alsa; then + sed -i -e "s/# MODULE=alsa/MODULE=alsa/" \ + -e "s/# HW_SLOT=modem:1/HW_SLOT=modem:1/" "${D}/etc/conf.d/slmodem" + else + sed -i "s/# MODULE=slamr/MODULE=slamr/" "${D}/etc/conf.d/slmodem" + fi + + + # Add module aliases and install hotplug script + insinto /etc/modules.d/; newins "${FILESDIR}/${PN}-2.9.11.modules" ${PN} + if use usb; then + exeinto /etc/hotplug/usb; newexe "${FILESDIR}/slusb.hotplug" slusb + fi + + dodir /etc/hotplug/blacklist.d + echo -e "slusb\nslamr\nsnd-intel8x0m" >> "${D}/etc/hotplug/blacklist.d/${PN}" + + # Add configuration for devfs, udev + if [ -e "${ROOT}/dev/.devfsd" ] ; then + insinto /etc/devfs.d/; newins "${FILESDIR}/${PN}-2.9.devfs" ${PN} + elif [ -e "${ROOT}/dev/.udev" ] ; then + dodir /etc/udev/rules.d/ + echo 'KERNEL=="slamr", NAME="slamr0" GROUP="dialout"' > \ + "${D}/etc/udev/rules.d/55-${PN}.rules" + if use usb; then + echo 'KERNEL=="slusb", NAME="slusb0" GROUP="dialout"' >> \ + "${D}/etc/udev/rules.d/55-${PN}.rules" + fi + fi + + dodoc Changes README "${WORKDIR}/ungrab-winmodem/Readme.txt" +} + +pkg_postinst() { + linux-mod_pkg_postinst + + # Make some devices if we aren't using devfs or udev + 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 $? + else + cd "${S}/drivers" + make DESTDIR="${ROOT}" install-devices + 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/modules.d/alsa" + einfo 'to: "alias snd-card-(number) snd-intel8x0m"' + fi + + einfo "You need to be in the uucp AND dialout group to make calls as a user." + einfo + einfo "If you see the following in dmesg:" + echo slamr: device 10b9:5457 is grabbed by driver serial + einfo "you need to modprobe ungrab-winmodem before slamr" +} |