From 29f8d29bd3736c86e5a26c16d93a8c7009684c6a Mon Sep 17 00:00:00 2001 From: Petteri Räty Date: Tue, 27 Sep 2005 09:06:28 +0000 Subject: Fixed pcmcia script installation and white space issues. svn path=/; revision=69 --- net-wireless/linux-wlan-ng/Manifest | 2 +- .../linux-wlan-ng/linux-wlan-ng-0.2.2.ebuild | 98 ++++++++++++---------- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/net-wireless/linux-wlan-ng/Manifest b/net-wireless/linux-wlan-ng/Manifest index ced9baa..8f54c2f 100644 --- a/net-wireless/linux-wlan-ng/Manifest +++ b/net-wireless/linux-wlan-ng/Manifest @@ -1,5 +1,5 @@ MD5 8b7af809b4d627dc06e78bfb7fabdbfb linux-wlan-ng-0.2.1_pre23.ebuild 3719 -MD5 9d9fe4ef9a5009cd10d7f4a78f92cc99 linux-wlan-ng-0.2.2.ebuild 3706 +MD5 e5a45ea90fe2068fbb46680fbbf9dd95 linux-wlan-ng-0.2.2.ebuild 3755 MD5 6a67e8a3881cabac13ab5275f7c72ea9 linux-wlan-ng-0.2.1_pre26.ebuild 2982 MD5 f8feecc7b03a51a0f9759d410393a6c5 ChangeLog 10150 MD5 32831d719499c83f7942f6432ef58278 metadata.xml 252 diff --git a/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.2.ebuild b/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.2.ebuild index 16d2bb6..cb04f8b 100644 --- a/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.2.ebuild +++ b/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.2.ebuild @@ -13,7 +13,7 @@ LICENSE="MPL-1.1" SLOT="0" KEYWORDS="~amd64 ~hppa ~ppc x86" -IUSE="debug doc" +IUSE="debug doc pcmcia" DEPEND="~net-wireless/linux-wlan-ng-modules-${PV} ~net-wireless/linux-wlan-ng-utils-${PV} @@ -30,18 +30,21 @@ CONFIG_FILE="${S}/default.config" CONFIG_DIR="/etc/conf.d" config_by_usevar() { - local config=${3} - [[ -z ${config} ]] && config=${CONFIG_FILE} - - if use ${2}; then - echo "${1}=y" >> ${config} - else - echo "${1}=n" >> ${config} - fi + local config=${3} + [[ -z ${config} ]] && config=${CONFIG_FILE} + + if use ${2}; then + echo "${1}=y" >> ${config} + else + echo "${1}=n" >> ${config} + fi } set_option() { - echo "${1}=${2}" >> ${CONFIG_FILE} + local config=${3} + [[ -z ${config} ]] && config=${CONFIG_FILE} + + echo "${1}=${2}" >> ${config} } src_unpack() { @@ -57,27 +60,22 @@ src_unpack() { #IMHO this should not be done but better to not upset users at this point sed -i -e "s:/etc/wlan:/etc/conf.d:g" ${S}/etc/wlan/Makefile - sed -i -e "s:/etc/wlan/wlan.conf:/etc/conf.d/wlan.conf:g" \ - -e "s:/etc/wlan/wlancfg:/etc/conf.d/wlancfg:g" \ - ${S}/etc/wlan/shared + sed -i -e "s:/etc/wlan/wlan.conf:/etc/conf.d/wlan.conf:g" \ + -e "s:/etc/wlan/wlancfg:/etc/conf.d/wlancfg:g" \ + ${S}/etc/wlan/shared cp ${S}/config.in ${config} set_option TARGET_ROOT_ON_HOST ${D} - set_option LINUX_SRC ${KERNEL_DIR} - set_option PRISM2_USB n - set_option PRISM2_PCI n - set_option PRISM2_PLX n - set_option PRISM2_PCMCIA n - - - if [[ -n "${PCMCIA_VERSION}" ]]; then - set_option PCMCIA_SRC ${PCMCIA_SOURCE_DIR} - fi - - if kernel_is gt 2 4; then - set_option KERN_25 y - fi + set_option LINUX_SRC ${KERNEL_DIR} + set_option PRISM2_USB n + set_option PRISM2_PCI n + set_option PRISM2_PLX n + set_option PRISM2_PCMCIA n + + if kernel_is gt 2 4; then + set_option KERN_25 y + fi config_by_usevar WLAN_DEBUG debug } @@ -87,7 +85,13 @@ src_compile() { emake default_config || die "emake default_config failed" set_arch_to_portage - echo FIRMWARE_DIR="/lib/firmware" >> config.mk + CONFIG_FILE="config.mk" + + set_option FIRMWARE_DIR "/lib/firmware" + config_by_usevar PRISM2_PCMCIA pcmcia + + #For the scripts that go to /etc + set_option TARGET_PCMCIA_DIR ${D}/etc/pcmcia cd ${S}/src/ for dir in ${COMPILE_DIRS}; do @@ -125,22 +129,26 @@ src_install() { } pkg_postinst() { - einfo "/etc/init.d/wlan is used to control startup and shutdown of non-PCMCIA devices." - einfo "/etc/init.d/pcmcia from pcmcia-cs is used to control startup and shutdown of" - einfo "PCMCIA devices." - einfo "" - einfo "Modify ${CONFIG_DIR}/wlan.conf to set global parameters." - einfo "Modify ${CONFIG_DIR}/wlancfg-* to set individual card parameters." - einfo "There are detailed instructions in these config files." - einfo "" - einfo "Three keygen programs are included: nwepgen, keygen, and lwepgen." - einfo "keygen seems provide more usable keys at the moment." - einfo "" - einfo "Be sure to add iface_wlan0 parameters to /etc/conf.d/net." - einfo "" - ewarn "Wireless cards which you want to use drivers other than wlan-ng for" - ewarn "need to have the appropriate line removed from /etc/pcmcia/wlan-ng.conf" - ewarn "Do 'cardctl info' to see the manufacturer ID and remove the corresponding" - ewarn "line from that file." + einfo "/etc/init.d/wlan is used to control startup and shutdown of non-PCMCIA devices." + if use pcmcia; then + einfo "/etc/init.d/pcmcia from pcmcia-cs is used to control startup and shutdown of" + einfo "PCMCIA devices." + fi + einfo "" + einfo "Modify ${CONFIG_DIR}/wlan.conf to set global parameters." + einfo "Modify ${CONFIG_DIR}/wlancfg-* to set individual card parameters." + einfo "There are detailed instructions in these config files." + einfo "" + einfo "Three keygen programs are included: nwepgen, keygen, and lwepgen." + einfo "keygen seems provide more usable keys at the moment." + einfo "" + einfo "Be sure to add iface_wlan0 parameters to /etc/conf.d/net." + einfo "" + if use pcmcia; then + ewarn "Wireless cards which you want to use drivers other than wlan-ng for" + ewarn "need to have the appropriate line removed from /etc/pcmcia/wlan-ng.conf" + ewarn "Do 'cardctl info' to see the manufacturer ID and remove the corresponding" + ewarn "line from that file." + fi } -- cgit v1.2.3-65-gdbad