Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 178173 | Differences between
and this patch

Collapse All | Expand All

(-)slmodem-2.9.11_pre20061021-r2.ebuild (-38 / +25 lines)
Lines 1-13 Link Here
1
# Copyright 1999-2007 Gentoo Foundation
1
# Copyright 1999-2007 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.11_pre20061021-r2.ebuild,v 1.2 2007/05/06 08:12:57 genone Exp $
3
# $Header: $
4
4
5
inherit eutils linux-mod multilib
5
inherit eutils linux-mod multilib
6
6
7
DESCRIPTION="Driver for Smart Link modem"
7
DESCRIPTION="Driver for Smart Link modem"
8
HOMEPAGE="http://linmodems.technion.ac.il/packages/smartlink/"
8
HOMEPAGE="http://linmodems.technion.ac.il/packages/smartlink/"
9
SRC_URI="http://linmodems.technion.ac.il/packages/smartlink/${P/_pre/-}.tar.gz
9
SRC_URI="http://linmodems.technion.ac.il/packages/smartlink/${P/_pre/-}.tar.gz
10
	http://linmodems.technion.ac.il/packages/smartlink/ungrab-winmodem.tar.gz"
10
	http://linmodems.technion.ac.il/packages/smartlink/ungrab-winmodem-${PV/*_pre/}.tar.gz"
11
11
12
LICENSE="Smart-Link"
12
LICENSE="Smart-Link"
13
SLOT="0"
13
SLOT="0"
Lines 24-30 Link Here
24
pkg_setup() {
24
pkg_setup() {
25
	use amd64 && multilib_toolchain_setup x86
25
	use amd64 && multilib_toolchain_setup x86
26
26
27
	MODULE_NAMES="ungrab-winmodem(:${WORKDIR}/ungrab-winmodem)"
27
	MODULE_NAMES="ungrab-winmodem(:${WORKDIR}/ungrab-winmodem-${PV/*_pre/})"
28
	if ! use amd64; then
28
	if ! use amd64; then
29
		MODULE_NAMES="${MODULE_NAMES} slamr(net:${S}/drivers)"
29
		MODULE_NAMES="${MODULE_NAMES} slamr(net:${S}/drivers)"
30
		if use usb; then
30
		if use usb; then
Lines 40-53 Link Here
40
src_unpack() {
40
src_unpack() {
41
	unpack ${A}
41
	unpack ${A}
42
	cd "${WORKDIR}"
42
	cd "${WORKDIR}"
43
	sed -i "s:SUBDIRS=\$(shell pwd):SUBDIRS=${WORKDIR}/ungrab-winmodem:" \
43
	sed -i "s:SUBDIRS=\$(shell pwd):SUBDIRS=${WORKDIR}/ungrab-winmodem-${PV/*_pre/}:" \
44
		ungrab-winmodem/Makefile
44
		ungrab-winmodem-${PV/*_pre/}/Makefile
45
	convert_to_m ungrab-winmodem/Makefile
45
	convert_to_m ungrab-winmodem-${PV/*_pre/}/Makefile
46
47
	epatch "${FILESDIR}"/${PN}-ungrab-winmodem-hp500.patch
46
48
47
	epatch "${FILESDIR}/${P%%_*}-kernel-2.6.19.patch"
48
	cd "${S}"
49
	cd "${S}"
49
	epatch "${FILESDIR}/${P%%_*}-makefile.patch"
50
	epatch "${FILESDIR}/${P%%_*}-makefile.patch"
50
51
52
51
	cd "${S}"/drivers
53
	cd "${S}"/drivers
52
	sed -i "s:SUBDIRS=\$(shell pwd):SUBDIRS=${S}/drivers:" Makefile
54
	sed -i "s:SUBDIRS=\$(shell pwd):SUBDIRS=${S}/drivers:" Makefile
53
	convert_to_m Makefile
55
	convert_to_m Makefile
Lines 90-152 Link Here
90
92
91
93
92
	# Add module aliases and install hotplug script
94
	# Add module aliases and install hotplug script
93
	insinto /etc/modules.d/; newins "${FILESDIR}/slmodem-modules" ${PN}
95
	insinto /etc/modules.d/
96
	newins "${FILESDIR}/slmodem-modules-r1" ${PN}
94
	if use usb; then
97
	if use usb; then
95
		exeinto /etc/hotplug/usb; newexe "${FILESDIR}/slusb.hotplug" slusb
98
		exeinto /lib/udev/
99
		newexe "${FILESDIR}/slusb-udev.script" slmodem_usb.sh
96
	fi
100
	fi
97
101
98
	dodir /etc/hotplug/blacklist.d
102
	dodir /etc/modprobe.d
99
	echo -e "slusb\nslamr\nsnd-intel8x0m" >> "${D}/etc/hotplug/blacklist.d/${PN}"
103
	echo -e "slusb\nslamr\nsnd-intel8x0m" >> "${D}/etc/modprobe.d/blacklist-${PN}"
100
104
101
	# Add configuration for devfs, udev
105
	# Add configuration for udev
102
	insinto /etc/devfs.d/; newins "${FILESDIR}/${PN}-2.9.devfs" ${PN}
103
	dodir /etc/udev/rules.d/
106
	dodir /etc/udev/rules.d/
104
	echo 'KERNEL=="slamr", NAME="slamr0" GROUP="dialout"' > \
107
	echo 'KERNEL=="slamr", NAME="slamr0" GROUP="dialout"' > \
105
		 "${D}/etc/udev/rules.d/55-${PN}.rules"
108
		 "${D}/etc/udev/rules.d/55-${PN}.rules"
106
	if use usb; then
109
	if use usb; then
107
		echo 'KERNEL=="slusb", NAME="slusb0" GROUP="dialout"' >> \
110
		echo 'KERNEL=="slusb", NAME="slusb0" GROUP="dialout" RUN+="/lib/udev/slmodem_usb.sh"' >> \
108
			 "${D}/etc/udev/rules.d/55-${PN}.rules"
111
			 "${D}/etc/udev/rules.d/55-${PN}.rules"
109
	fi
112
	fi
110
113
111
	dodoc Changes README "${WORKDIR}/ungrab-winmodem/Readme.txt"
114
	dodoc Changes README
112
}
115
	newdoc "${WORKDIR}"/ungrab-winmodem-${PV/*_pre}/Readme.txt README-ungrab-winmodem.txt
113
114
pkg_preinst() {
115
	linux-mod_pkg_preinst
116
117
	# Remove obsolete devfs configuration files if the box use udev
118
	if [ -e "${ROOT}/dev/.udev" ]; then
119
		rm -r "${D}/etc/devfs.d"
120
	fi
121
}
116
}
122
117
123
pkg_postinst() {
118
pkg_postinst() {
124
	linux-mod_pkg_postinst
119
	linux-mod_pkg_postinst
125
120
126
	# Make some devices if we aren't using devfs or udev
121
	# Make some devices if we aren't using devfs or udev
127
	if [ -e "${ROOT}/dev/.devfsd" ]; then
122
	if [ -e "${ROOT}/dev/.udev" ]; then
128
		ebegin "Restarting devfsd to reread devfs rules"
123
		ebegin "Reloading udev rules..."
129
			killall -HUP devfsd
124
			udevcontrol reload_rules && udevtrigger
130
		eend $?
131
132
	elif [ -e "${ROOT}/dev/.udev" ]; then
133
		ebegin "Restarting udev to reread udev rules"
134
			udevstart
135
		eend $?
125
		eend $?
136
	else
126
	else
137
		cd "${S}/drivers"
127
		cd "${S}/drivers"
138
		make DESTDIR="${ROOT}" install-devices
128
		make DESTDIR="${ROOT}" install-devices
139
	fi
129
	fi
140
130
141
	if [ ! -e "${ROOT}/dev/ppp" ]; then
131
	ewarn "To avoid problems, slusb/slamr have been added to /etc/modprobe.d/blacklist-${PN}"
142
		mknod "${ROOT}/dev/ppp" c 108 0
143
	fi
144
145
	ewarn "To avoid problems, slusb/slamr have been added to /etc/hotplug/blacklist"
146
	elog "You must edit /etc/conf.d/${PN} for your configuration"
132
	elog "You must edit /etc/conf.d/${PN} for your configuration"
147
	elog "To add slmodem to your startup - type : rc-update add slmodem default"
133
	elog "To add slmodem to your startup - type : rc-update add slmodem default"
148
	elog
134
	elog
149
	
135
150
	if use alsa; then
136
	if use alsa; then
151
		elog "I hope you have already added alsa to your startup: "
137
		elog "I hope you have already added alsa to your startup: "
152
		elog "otherwise type: rc-update add alsasound boot"
138
		elog "otherwise type: rc-update add alsasound boot"
Lines 162-165 Link Here
162
	elog "If you see the following in dmesg:"
148
	elog "If you see the following in dmesg:"
163
	elog "    slamr: device 10b9:5457 is grabbed by driver serial"
149
	elog "    slamr: device 10b9:5457 is grabbed by driver serial"
164
	elog "you need to modprobe ungrab-winmodem before slamr"
150
	elog "you need to modprobe ungrab-winmodem before slamr"
151
	elog "See /etc/modules.d/slmodem for details."
165
}
152
}

Return to bug 178173