diff options
author | Dan Armak <danarmak@gentoo.org> | 2001-08-22 16:50:03 +0000 |
---|---|---|
committer | Dan Armak <danarmak@gentoo.org> | 2001-08-22 16:50:03 +0000 |
commit | 4d93dcea96202a5cd25f3587685cd2b69aab1a8a (patch) | |
tree | db8b5d4b126b7e961e199b9b8f381618eebe7260 | |
parent | digests and some kdeutils typo fixes (diff) | |
download | gentoo-2-4d93dcea96202a5cd25f3587685cd2b69aab1a8a.tar.gz gentoo-2-4d93dcea96202a5cd25f3587685cd2b69aab1a8a.tar.bz2 gentoo-2-4d93dcea96202a5cd25f3587685cd2b69aab1a8a.zip |
notes: 1. to accomodate kernel ebuild structure, no modules are built.
2. included startup script is functional, but someone more familiar with
pcmcia-cs should edit it, at least to introduce gentoo-style printouts.
I only did this because I needed it and the system team should "maintain"
it, not me.
-rw-r--r-- | sys-apps/pcmcia-cs/files/digest-pcmcia-cs-3.1.28 | 1 | ||||
-rw-r--r-- | sys-apps/pcmcia-cs/files/pcmcia | 93 | ||||
-rw-r--r-- | sys-apps/pcmcia-cs/files/pcmcia.settings | 10 | ||||
-rw-r--r-- | sys-apps/pcmcia-cs/pcmcia-cs-3.1.28.ebuild | 47 |
4 files changed, 151 insertions, 0 deletions
diff --git a/sys-apps/pcmcia-cs/files/digest-pcmcia-cs-3.1.28 b/sys-apps/pcmcia-cs/files/digest-pcmcia-cs-3.1.28 new file mode 100644 index 000000000000..d87957417c6d --- /dev/null +++ b/sys-apps/pcmcia-cs/files/digest-pcmcia-cs-3.1.28 @@ -0,0 +1 @@ +MD5 0c875cfd8985b3c02439042798023d6f pcmcia-cs-3.1.28.tar.gz diff --git a/sys-apps/pcmcia-cs/files/pcmcia b/sys-apps/pcmcia-cs/files/pcmcia new file mode 100644 index 000000000000..5a8ce4509bfe --- /dev/null +++ b/sys-apps/pcmcia-cs/files/pcmcia @@ -0,0 +1,93 @@ +#!/bin/sh +#RCUPDATE:3 4:69:This line is required for script management +# Originally distributed with pcmcia-cs-3.1.28, with support for several +# distros/init schemes. Adapted for gentoo and cleared of extraneous stuff +# by Woodchip. +# Note: some things/functionality included aren't used by gentoo, but +# I didn't want to delete things I wasn't sure about. -Dan Armak + +. /etc/rc.d/config/functions + +SERVICE=pcmcia +opts="start stop restart" + +. /etc/rc.d/config/pcmcia + +cleanup() +{ + while read SN CLASS MOD INST DEV EXTRA ; do + if [ "$SN" != "Socket" ] ; then + /etc/pcmcia/$CLASS stop $DEV 2> /dev/null + fi + done +} + +start() { + if [ -d /var/lib/pcmcia ] ; then + SC=/var/lib/pcmcia/scheme + RUN=/var/lib/pcmcia + else + SC=/var/run/pcmcia-scheme + RUN=/var/run + fi + if [ -L $SC -o ! -O $SC ] ; then rm -f $SC ; fi + if [ ! -f $SC ] ; then umask 022 ; touch $SC ; fi + if [ "$SCHEME" ] ; then umask 022 ; echo $SCHEME > $SC ; fi + fgrep -q pcmcia /proc/devices + if [ $? -ne 0 ] ; then + if [ -d /lib/modules/preferred ] ; then + PC=/lib/modules/preferred/pcmcia + else + PC=/lib/modules/`uname -r`/pcmcia + fi + if [ -d $PC ] ; then + echo -n " modules" + /sbin/insmod $PC/pcmcia_core.o $CORE_OPTS 2>&1 > /dev/null + /sbin/insmod $PC/$PCIC.o $PCIC_OPTS 2>&1 > /dev/null + /sbin/insmod $PC/ds.o 2>&1 > /dev/null + else + echo " module directory $PC not found." + break + fi + fi + if [ -s /var/run/cardmgr.pid ] && \ + kill -0 `cat /var/run/cardmgr.pid` 2>/dev/null ; then + echo " cardmgr is already running." + else + if [ -r $RUN/stab ] ; then + cat $RUN/stab | cleanup + fi + /sbin/cardmgr $CARDMGR_OPTS 2>&1 > /dev/null + fi + mkdir -p /var/lock/subsys + touch /var/lock/subsys/pcmcia 2>&1 > /dev/null +} + +stop() { + if [ -s /var/run/cardmgr.pid ] ; then + PID=`cat /var/run/cardmgr.pid` + kill $PID + echo -n " cardmgr" + # Give cardmgr a few seconds to handle the signal + kill -0 $PID 2>/dev/null && sleep 2 && \ + kill -0 $PID 2>/dev/null && sleep 2 && \ + kill -0 $PID 2>/dev/null && sleep 2 && \ + kill -0 $PID 2>/dev/null + fi + killall -q "CardBus Watcher" + if fgrep -q "ds " /proc/modules ; then + echo -n " modules" + /sbin/rmmod ds + /sbin/rmmod $PCIC + /sbin/rmmod pcmcia_core + fi + rm -f /var/lock/subsys/pcmcia +} + +restart() { + stop + start +} + +doservice ${@} + diff --git a/sys-apps/pcmcia-cs/files/pcmcia.settings b/sys-apps/pcmcia-cs/files/pcmcia.settings new file mode 100644 index 000000000000..2d985fe41231 --- /dev/null +++ b/sys-apps/pcmcia-cs/files/pcmcia.settings @@ -0,0 +1,10 @@ +# Should be either i82365 or tcic +PCIC=i82365 +# Put socket driver timing parameters here +PCIC_OPTS= +# Put pcmcia_core options here +CORE_OPTS= +# Put cardmgr options here +CARDMGR_OPTS= +# To set the PCMCIA scheme at startup... +SCHEME= diff --git a/sys-apps/pcmcia-cs/pcmcia-cs-3.1.28.ebuild b/sys-apps/pcmcia-cs/pcmcia-cs-3.1.28.ebuild new file mode 100644 index 000000000000..3557f12b5487 --- /dev/null +++ b/sys-apps/pcmcia-cs/pcmcia-cs-3.1.28.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Craig Joly <joly@ee.ualberta.ca> + +S=${WORKDIR}/${P} +DESCRIPTION="PCMCIA tools for Linux" +SRC_URI="http://prdownloads.sourceforge.net/pcmcia-cs/${P}.tar.gz" +HOMEPAGE="http://pcmcia-cs.sourceforge.net" +DEPEND="sys-devel/gcc + X? ( virtual/x11 x11-libs/xforms )" + +src_compile() { + + ./Configure -n --target=${D} --cardbus --pnp --apm --target=${D} || die "failed configuring" + emake all || die "failed compiling" + +} + +src_install () { + + make install || die "failed installing" + + cd ${D} + # remove things it installed but we don't want: + # remove non-gentoo-conforming init scripts, we have our own + rm etc/rc.d/rc.pcmcia + # remove kernel modules, we have our own kernel ebuild tangle + rm -rf lib + # remove X util if USE X isn't set + # this is simply much easier than patching configure or the makefiles + # not to build them in the first place + use X || rm -rf usr/X11R6 + + # install our own init script + insinto /etc/rc.d/config + newins ${FILESDIR}/pcmcia.settings pcmcia + insinto /etc/rc.d/init.d + insopts -m 0755 + doins ${FILESDIR}/pcmcia + + cd ${S} + # install docs + dodoc BUGS CHANGES COPYING LICENSE MAINTAINERS README README-2.4 \ + SUPPORTED.CARDS doc/* + +} + |