# fdutils 5.5
# ===========
# Slackware 9.0, 9.1, 10.0, 10.1, and 10.2's 'floppy' packages include
# fdutils version 5.4 and the 20020222 patch.
# Slackware has the 'floppy' package which includes fdutils and mtools.
# If you follow this howto and remove 'floppy', you should continue to the
# mtools howto to re-install it.
# The general concensus these days seems to be that your kernel headers
# (/usr/include/linux, asm) should be the ones that were used to build
# glibc. So, if you use a glibc package from your distribution which had a
# 2.4.x kernel installed when glibc was built, you should leave the 2.4.x
# headers installed. [ I say 'these days' because people used to just
# create a /usr/include/linux symlink pointing to /usr/src/linux/include ]
#
# FYI, I had kernel-headers-2.6.13 from Slackware 'testing' installed for
# something else and was unable to build fdutils. After removing that and
# re-installing kernel-headers-2.4.31, it worked OK.
# Prerequisites:
# texinfo
# flex (make will run 'lex')
cd
test -f installed/fdutils-5.5.tar.gz && mv installed/fdutils-5.5.tar.gz .
test ! -f fdutils-5.5.tar.gz &&
wget http://fdutils.linux.lu/fdutils-5.5.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "fdutils-*" -exec rm -r {} \;
tar xzvf ~/fdutils-5.5.tar.gz
cd fdutils-5.5
test $UID = 0 && chown -R root:root .
chmod -R u+w .
# If you have a bash script installed as /usr/bin/lex that runs 'flex -l $*',
# remove the -l (original lex compatibility) if you have flex 2.5.31
# installed before you run make or it'll probably fail. This does not
# appear to be necessary with flex 2.5.27 Put the -l back in there after
# fdutils is installed because -l is usually a safe bet with other things.
# Patch it to skip building or installing 'setfdprm', which is also part of
# util-linux
wget -nc http://englanders.cc/pub/linux/patches/fdutils-5.5-setfdprm.patch &&
patch -p1 < fdutils-5.5-setfdprm.patch
./configure --prefix=/usr --sysconfdir=/etc
# It doesn't check to see if you have tex installed before trying to use
# it. If you have it installed and want to try building the software and
# the docs, run 'make'. Otherwise, to skip the docs, run this:
make compile
# Become root to back things up and install it
su
# Back up mtools configuration (because 'removepkg floppy' will remove it):
test -f /etc/mtools.conf &&
( mkdir -p -m 0700 ~/backup ; cp /etc/mtools.conf ~/backup/ )
test -x /sbin/removepkg && /sbin/removepkg floppy
# Same deal about tex as noted above. If docs were built with tex above,
# run 'make install', otherwise run this to install everything else:
make install-prog
install -m 644 doc/*.1 /usr/man/man1/
( cd /usr/man/man1
ln -sf fdmount.1 fdumount.1
ln -sf fdmount.1 fdlist.1
ln -sf fdmount.1 fdmountd.1
ln -sf xdfcopy.1 xdfformat.1 )
install -m 644 doc/fd.4 /usr/man/man4/
# Unless you use devfs or udev, (re-)create the floppy device files in /dev
# (you probably don't need to do this, but it can't hurt...). After running
# this, to grant access to the floppy drive, just add any user you want to
# have access to the 'floppy' group.
/usr/bin/MAKEFLOPPIES -g
gpasswd -a jason floppy