diff options
author | Alin Năstac <mrness@gentoo.org> | 2004-11-22 18:20:17 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2004-11-22 18:20:17 +0000 |
commit | 6f69b7075fc631b81af2cf110947fed3e6151946 (patch) | |
tree | 19baa0b2b874fa93b9408632ba92beeb3463c98e /net-dialup | |
parent | New versions, 1.4.5 was requested in bug #72034 (diff) | |
download | historical-6f69b7075fc631b81af2cf110947fed3e6151946.tar.gz historical-6f69b7075fc631b81af2cf110947fed3e6151946.tar.bz2 historical-6f69b7075fc631b81af2cf110947fed3e6151946.zip |
add support for user configurable env. variable FCDSL_CARDS
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/fcdsl/ChangeLog | 6 | ||||
-rw-r--r-- | net-dialup/fcdsl/Manifest | 10 | ||||
-rw-r--r-- | net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild | 50 |
3 files changed, 49 insertions, 17 deletions
diff --git a/net-dialup/fcdsl/ChangeLog b/net-dialup/fcdsl/ChangeLog index 1ce6b0ee142c..d2e3a710f6bf 100644 --- a/net-dialup/fcdsl/ChangeLog +++ b/net-dialup/fcdsl/ChangeLog @@ -1,6 +1,10 @@ # 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.4 2004/11/21 21:24:47 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/ChangeLog,v 1.5 2004/11/22 18:20:17 mrness Exp $ + + 22 Nov 2004; Alin Nastac <mrness@gentoo.org> fcdsl-2.6.20.7-r1.ebuild: + Add support for env variable FCDSL_CARDS. If is non-empty, only these modules + will be installed. See #71781 for more details. 21 Nov 2004; Alin Nastac <mrness@gentoo.org> fcdsl-2.6.20.7-r1.ebuild: Install all modules and remove card detection from compile function. See bug diff --git a/net-dialup/fcdsl/Manifest b/net-dialup/fcdsl/Manifest index 17990c7b8dfa..3b8653353a42 100644 --- a/net-dialup/fcdsl/Manifest +++ b/net-dialup/fcdsl/Manifest @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 4030b9716af322c98c3502ddb48c7e98 ChangeLog 932 +MD5 022a9aa4339d4899491bb1c1e6a692fc ChangeLog 1136 MD5 7e441fe8845d85e66f3cf257959d2572 fcdsl-2.6.20.7.ebuild 7203 MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 -MD5 8e68f625521a14ed31d4381a83a5ca9f fcdsl-2.6.20.7-r1.ebuild 6866 +MD5 c845dade301e078af7def1b2339950b1 fcdsl-2.6.20.7-r1.ebuild 7451 MD5 364100988c059984dab986c49888df6f files/digest-fcdsl-2.6.20.7 72 MD5 364100988c059984dab986c49888df6f files/digest-fcdsl-2.6.20.7-r1 72 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) -iD8DBQFBoQ0ejtv59x0+BrURAto1AJ4yqaN1DKd1cw2fks/JdtAewI+JrgCeKYKx -fVsw0fpr9A1sy81aDGk1V+Q= -=+w7i +iD8DBQFBoi3yjtv59x0+BrURAsWHAKCykeuuxcLhBvjgRY+HVAeYsaT0vgCg0wUv +bd6ChtnlTkAoT+mh8Cw/4Y0= +=haeL -----END PGP SIGNATURE----- diff --git a/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild b/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild index 4735e5e93805..c277b22aad80 100644 --- a/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild +++ b/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.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-r1.ebuild,v 1.5 2004/11/21 21:47:59 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/fcdsl-2.6.20.7-r1.ebuild,v 1.6 2004/11/22 18:20:17 mrness Exp $ inherit kernel-mod rpm eutils @@ -70,6 +70,19 @@ detect_fcdsl_card() { fi } +is_module_selected() { + if [ -z "${FCDSL_CARDS}" ] ; then + return 0 + fi + for USERCARD in ${FCDSL_CARDS} ; do + if [ "$1" = ${USERCARD} ]; then + return 0 + fi + done + + return 1 +} + pkg_setup() { if ! kernel-mod_is_2_6_kernel; then die "This package works only with 2.6 kernel!" @@ -77,16 +90,29 @@ pkg_setup() { 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 + + #Check existence of user selected cards + for USERCARD in ${FCDSL_CARDS} ; do + for ((CARD=0; CARD < ${#FCDSL_MODULES[*]}; CARD++)); do + if [ "$USERCARD" = "${FCDSL_MODULES[CARD]}" ]; then + continue 2 + fi + done + die "Card ${USERCARD} not present in ${P}" + done } src_compile() { ( unset ARCH 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." - kernel-mod_src_compile || die "Could not compile driver for ${FCDSL_NAMES[CARD]}." + if is_module_selected "${FCDSL_MODULES[CARD]}"; then + 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." + kernel-mod_src_compile || die "Could not compile driver for ${FCDSL_NAMES[CARD]}." + fi done ) } @@ -101,16 +127,18 @@ src_install() { 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 + if is_module_selected "${FCDSL_MODULES[CARD]}"; then + 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 + 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/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]} + 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]} + fi done insinto /etc/drdsl |