#!/bin/sh
# Build pcmcia.tgz.
cat << EOF

Before building this, get a non-APM kernel running, and a non-APM kernel tree
in /usr/src/linux, otherwise the binaries will *require* APM, and everyone
will complain.

EOF
sleep 15
CWD=`pwd`
cd /tmp
tar xzvf $CWD/pcmcia-cs-3.0.14.tar.gz
cd pcmcia-cs-3.0.14
mkdir -p /usr/doc/pcmcia-cs-3.0.14
cp -a BUGS CHANGES COPYING LICENSE MAINTAINERS doc/PCMCIA-HOWTO \
  doc/PCMCIA-PROG README SUPPORTED.CARDS /usr/doc/pcmcia-cs-3.0.14
chown -R root.root /usr/doc/pcmcia-cs-3.0.14
chmod 644 /usr/doc/pcmcia-cs-3.0.14/*
make clean
./Configure < $CWD/config.replies
make all
make install
# This version of rc.pcmcia has been modified for use with Slackware.
# It also polls the card slots rather than wasting an IRQ for that.
zcat $CWD/rc.pcmcia.gz > /etc/rc.d/rc.pcmcia
## The generic parallel driver causes complaints at boot time, so we will
## comment it out for now.  Don't most laptops come with parallel ports
## anyway? ;)
#( cd /etc/pcmcia ; zcat $CWD/config.parallel.diff.gz | patch -p0 --verbose )
