diff options
author | Alin Năstac <mrness@gentoo.org> | 2004-11-20 12:37:06 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2004-11-20 12:37:06 +0000 |
commit | 9d5dedec51c76343514a7e0fbd6f4eff4a148a58 (patch) | |
tree | 918332f53f25691155e7eaca0d52188127ffa088 /net-dialup/fcdsl | |
parent | clean older versions (Manifest recommit) (diff) | |
download | gentoo-2-9d5dedec51c76343514a7e0fbd6f4eff4a148a58.tar.gz gentoo-2-9d5dedec51c76343514a7e0fbd6f4eff4a148a58.tar.bz2 gentoo-2-9d5dedec51c76343514a7e0fbd6f4eff4a148a58.zip |
improved ebuild (see #71781). set ebuilds as not SLOTable (now /lib/modules is protected)
Diffstat (limited to 'net-dialup/fcdsl')
-rw-r--r-- | net-dialup/fcdsl/ChangeLog | 9 | ||||
-rw-r--r-- | net-dialup/fcdsl/Manifest | 16 | ||||
-rw-r--r-- | net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild | 277 | ||||
-rw-r--r-- | net-dialup/fcdsl/fcdsl-2.6.20.7.ebuild | 4 | ||||
-rw-r--r-- | net-dialup/fcdsl/files/digest-fcdsl-2.6.20.7-r1 | 1 |
5 files changed, 292 insertions, 15 deletions
diff --git a/net-dialup/fcdsl/ChangeLog b/net-dialup/fcdsl/ChangeLog index e89ca83870d0..9e1408239f4b 100644 --- a/net-dialup/fcdsl/ChangeLog +++ b/net-dialup/fcdsl/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-dialup/fcdsl # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/ChangeLog,v 1.2 2004/11/07 14:30:47 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/ChangeLog,v 1.3 2004/11/20 12:37:06 mrness Exp $ + +*fcdsl-2.6.20.7-r1 (20 Nov 2004) + + 20 Nov 2004; Alin Nastac <mrness@gentoo.org> +fcdsl-2.6.20.7-r1.ebuild, + fcdsl-2.6.20.7.ebuild: + Improved ebuild, thanks to Stefan Schweizer <genstef@gentoo.org>. Closing + #71781. 07 Nov 2004; Daniel Black <dragonheart@gentoo.org> fcdsl-2.6.20.7.ebuild: removed sys-kernel/config-kernel from dependancies diff --git a/net-dialup/fcdsl/Manifest b/net-dialup/fcdsl/Manifest index 7ffe2ed50cc4..129a4c50f98d 100644 --- a/net-dialup/fcdsl/Manifest +++ b/net-dialup/fcdsl/Manifest @@ -1,14 +1,6 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 d710536be35ac789b98a69046962e005 fcdsl-2.6.20.7.ebuild 7212 -MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 MD5 f82844e6e5c237454687f26dc54d2752 ChangeLog 554 +MD5 6d9e21992a28ab7e38a1d5073daaa7ba fcdsl-2.6.20.7.ebuild 7208 +MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 +MD5 829c7d16116f5aac3acbeb708de5f10d fcdsl-2.6.20.7-r1.ebuild 7015 MD5 364100988c059984dab986c49888df6f files/digest-fcdsl-2.6.20.7 72 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.6 (GNU/Linux) - -iD8DBQFBjjGdmdTrptrqvGERAkx2AJ9FuyGIhZ9DAEawnBnQuqnubRf+xQCfZ2mo -1ONPzanXxqdMGTJzy6hiFXQ= -=dck7 ------END PGP SIGNATURE----- +MD5 364100988c059984dab986c49888df6f files/digest-fcdsl-2.6.20.7-r1 72 diff --git a/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild b/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild new file mode 100644 index 000000000000..a032f5b8c87f --- /dev/null +++ b/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild @@ -0,0 +1,277 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild,v 1.1 2004/11/20 12:37:06 mrness Exp $ + +inherit kernel-mod rpm eutils + +S="${WORKDIR}/fritz" + +DESCRIPTION="AVM FRITZ!Card DSL drivers for 2.6 kernel" +HOMEPAGE="http://www.avm.de/" +SRC_URI="ftp://ftp.suse.com/pub/suse/i386/update/9.1/rpm/src/avm_${P/2.6./2.6-}.src.rpm" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +RDEPEND=">=net-dialup/capi4k-utils-20040810" +DEPEND="${RDEPEND} + app-arch/rpm2targz + sys-apps/gawk + sys-apps/sed + virtual/linux-sources" + +FCDSL_NAMES=("AVM FRITZ!Card DSL" "AVM FRITZ!Card DSL v2.0" "AVM FRITZ!Card DSL SL" "AVM FRITZ!Card DSL USB" "AVM FRITZ!Card DSL SL USB") +FCDSL_BUSTYPES=("pci" "pci" "pci" "usb" "usb") +FCDSL_IDS=("1131:5402" "1244:2900" "1244:2700" "057c:2300" "057c:3500") +FCDSL_FIRMWARES=("fdslbase.bin" "fds2base.bin" "fdssbase.bin" "fdsubase.frm" "fdlubase.frm") +FCDSL_MODULES=("fcdsl" "fcdsl2" "fcdslsl" "fcdslusb" "fcdslslusb") + +detect_fcdsl_card() { + PCI_IDS="" + USB_IDS="" + if [ -d /sys/bus ]; then + if [ -d /sys/bus/pci/devices ]; then + cd /sys/bus/pci/devices + for PCI_DEVICE in *; do + PCI_IDS="${PCI_IDS}$(cat ${PCI_DEVICE}/vendor | sed -e 's:0\x::'):$(cat ${PCI_DEVICE}/device | sed -e 's:0\x::') " + done + unset PCI_DEVICE + fi + if [ -d /sys/bus/usb/devices ]; then + cd /sys/bus/usb/devices + for USB_DEVICE in [0-9]*; do + if [ -f ${USB_DEVICE}/idVendor ]; then + USB_IDS="${USB_IDS}$(cat ${USB_DEVICE}/idVendor):$(cat ${USB_DEVICE}/idProduct) " + fi + done + unset USB_DEVICE + fi + fi + + FCDSL_MODULE="" + for ((CARD=0; CARD < ${#FCDSL_IDS[*]}; CARD++)); do + BUS_IDS="" + if [ "${FCDSL_BUSTYPES[CARD]}" == "pci" ]; then + BUS_IDS="${PCI_IDS}" + else + BUS_IDS="${USB_IDS}" + fi + for BUS_ID in ${BUS_IDS}; do + if [ "${BUS_ID}" == "${FCDSL_IDS[CARD]}" ]; then + einfo "Found: ${FCDSL_NAMES[CARD]}" + FCDSL_FIRMWARE=${FCDSL_FIRMWARES[CARD]} + FCDSL_MODULE=${FCDSL_MODULES[CARD]} + fi + done + done + if [ "${FCDSL_MODULE}" == "" ]; then + ewarn "No AVM FRITZ!Card DSL found!" + fi +} + +pkg_setup() { + if ! kernel-mod_is_2_6_kernel; then + die "This package works only with 2.6 kernel!" + fi + if ! kernel-mod_configoption_present ISDN_CAPI_CAPI20; then + die "For using the driver you need a kernel with enabled CAPI support." + fi + kernel-mod_check_modules_supported + + detect_fcdsl_card +} + +src_unpack() { + rpm_src_unpack ${A} || die "Could not unpack RPM package." +} + +src_compile() { + unset ARCH + if [ "${FCDSL_MODULE}" == "" ]; then + for ((CARD=0; CARD < ${#FCDSL_IDS[*]}; CARD++)); do + einfo "Compiling driver for ${FCDSL_NAMES[CARD]}" + cd ${WORKDIR}/${FCDSL_MODULES[CARD]/fc/fritz.}/src || die "Could not change to ${FCDSL_NAMES[CARD]} source directory." + make || die "Could not compile driver for ${FCDSL_NAMES[CARD]}." + done + else + cd ${WORKDIR}/${FCDSL_MODULE/fc/fritz.}/src || die "Could not change to driver source directory." + make || die "Could not compile driver." + fi +} + +src_install() { + dodir /etc/drdsl /etc/modules.d /lib/modules/${KV_VERSION_FULL}/misc /usr/lib/isdn /lib/firmware /usr/sbin + + echo -e "# card\tfile\tproto\tio\tirq\tmem\tcardnr\toptions" >${D}/etc/capi.conf + echo "#" >>${D}/etc/capi.conf + + echo "# Options for AVM FRITZ!Card DSL cards" >${D}/etc/modules.d/fcdsl + echo "# Correct these settings with the output from drdsl -n" >>${D}/etc/modules.d/fcdsl + + for ((CARD=0; CARD < ${#FCDSL_MODULES[*]}; CARD++)); do + echo -e "#${FCDSL_MODULES[CARD]}\t${FCDSL_FIRMWARES[CARD]}\t-\t-\t-\t-\t-" >>${D}/etc/capi.conf + + echo "#options ${FCDSL_MODULES[CARD]} VPI=1 VCI=32 VCC=1" >>${D}/etc/modules.d/fcdsl + + insinto /lib/modules/${KV_VERSION_FULL}/misc + doins ${WORKDIR}/${FCDSL_MODULES[CARD]/fc/fritz.}/src/${FCDSL_MODULES[CARD]}.ko + + insinto /lib/firmware + newins ${WORKDIR}/${FCDSL_MODULES[CARD]/fc/fritz.}/${FCDSL_FIRMWARES[CARD]} ${PN}_${FCDSL_FIRMWARES[CARD]} + dosym /lib/firmware/${PN}_${FCDSL_FIRMWARES[CARD]} /usr/lib/isdn/${FCDSL_FIRMWARES[CARD]} + done + + if ! [ "${FCDSL_MODULE}" == "" ]; then + sed -si "s/^#\(options ${FCDSL_MODULE} VPI=1 VCI=32 VCC=1\)/\1/" ${D}/etc/modules.d/fcdsl + fi + + insinto /etc/drdsl + doins ${S}/drdsl.ini + + exeinto /usr/sbin + doexe ${S}/drdsl + + dodoc ${S}/CAPI* ${S}/compile* ${S}/license.txt ${S}/release.txt + dohtml install_passive-*.html + +} + +pkg_postinst() { + einfo "To complete the installation you have to modify the file" + einfo " /etc/modules.d/fcdsl" + einfo "with the options drdsl will give you." + echo + if [ "${FCDSL_MODULE}" == "" ]; + then + einfo "(your modulename)\t(your firmware)\t-\t-\t-\t-\t-" + else + einfo "${FCDSL_MODULE}\t${FCDSL_FIRMWARE}\t-\t-\t-\t-\t-" + fi + echo + einfo "Please enter following commands:" + einfo " depmod -ae" + einfo " capiinit start" + einfo " drdsl -n" + einfo " nano /etc/modules.d/fcdsl (=> enter the values)" + einfo " update-modules" + echo + einfo "If you want to create a peer file, please run:" + einfo " ebuild /var/db/pkg/net-dialup/${PF}/${PF}.ebuild config" + + 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} +} + +readpassword() { + + VALUE_1="" + VALUE_2="" + while true; do + einfo "Enter your password:" + read -r -s VALUE_1 + einfo "Retype your password:" + read -r -s VALUE_2 + if [ "${VALUE_1}" == "" ]; then + echo + eerror "You entered a blank password. Please try again." + echo + else + if [ "${VALUE_1}" == "${VALUE_2}" ] ; then + break + else + echo + eerror "Your password entries do not match. Please try again." + echo + fi + fi + done + eval ${1}=${VALUE_1} + + VALUE_1="" + VALUE_2="" + unset VALUE_1 + unset VALUE_2 + +} + +readvalue() { + + VALUE="" + while true; do + einfo "${2}:" + read VALUE + if [ "${VALUE}" == "" ]; then + eerror "You entered a blank value. Please try again." + echo + else + break + fi + done + eval ${1}=${VALUE} + + VALUE="" + unset VALUE + +} + +pkg_config() { + + detect_fcdsl_card + + if [ "${FCDSL_MODULE}" != "" ]; then + readvalue FCDSL_PROVIDER "Enter the name of your ISP" + if [ ! -e "/etc/ppp/peers/${FCDSL_PROVIDER}" ]; then + readvalue FCDSL_USER "Enter your user name" + if [ "$(grep "${FCDSL_USER}" /etc/ppp/pap-secrets)" == "" ]; then + readpassword FCDSL_PASSWORD + echo '"'${FCDSL_USER}'" * "'${FCDSL_PASSWORD}'"' >>/etc/ppp/pap-secrets + unset FCDSL_PASSWORD + cat <<EOF >>/etc/ppp/peers/${FCDSL_PROVIDER} +connect "" +ipcp-accept-remote +ipcp-accept-local +usepeerdns +defaultroute +user "${FCDSL_USER}" +hide-password +sync +noauth +lcp-echo-interval 5 +lcp-echo-failure 3 +lcp-max-configure 50 +lcp-max-terminate 2 +noccp +noipx +noproxyarp +mru 1492 +mtu 1492 +linkname "${FCDSL_PROVIDER}" +ipparam internet +plugin capiplugin.so +avmadsl +: +/dev/null +EOF + echo + echo + echo + einfo "Now, you can start an ADSL connection with either" + einfo " pon \"${FCDSL_PROVIDER}\"" + einfo "or" + einfo " pppd call \"${FCDSL_PROVIDER}\"" + else + ewarn "User \"${FCDSL_USER}\" always exists in \"/etc/ppp/pap-secrets\"!" + fi + else + ewarn "Peer file \"/etc/ppp/peers/${FCDSL_PROVIDER}\" always exists!" + fi + else + ewarn "No AVM FRITZ!Card DSL found!" + fi + unset FCDSL_PROVIDER + unset FCDSL_USER + +} diff --git a/net-dialup/fcdsl/fcdsl-2.6.20.7.ebuild b/net-dialup/fcdsl/fcdsl-2.6.20.7.ebuild index 10b186d68a4d..4e4cb2dde52e 100644 --- a/net-dialup/fcdsl/fcdsl-2.6.20.7.ebuild +++ b/net-dialup/fcdsl/fcdsl-2.6.20.7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/fcdsl-2.6.20.7.ebuild,v 1.2 2004/11/07 14:30:47 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/fcdsl-2.6.20.7.ebuild,v 1.3 2004/11/20 12:37:06 mrness Exp $ inherit kmod rpm eutils @@ -11,7 +11,7 @@ HOMEPAGE="http://www.avm.de/" SRC_URI="ftp://ftp.suse.com/pub/suse/i386/update/9.1/rpm/src/avm_${P/2.6./2.6-}.src.rpm" LICENSE="LGPL-2" -SLOT="${KV}" +SLOT="0" KEYWORDS="x86" IUSE="" diff --git a/net-dialup/fcdsl/files/digest-fcdsl-2.6.20.7-r1 b/net-dialup/fcdsl/files/digest-fcdsl-2.6.20.7-r1 new file mode 100644 index 000000000000..531d29dea75a --- /dev/null +++ b/net-dialup/fcdsl/files/digest-fcdsl-2.6.20.7-r1 @@ -0,0 +1 @@ +MD5 0af47b4ed612deefffa4a7673e20ae41 avm_fcdsl-2.6-20.7.src.rpm 2924582 |