# Below I pass --disable-nls (new for version 2.6) to configure because I
# live in the US and only read/write (well) English. If this is not the
# case for you, you may want to leave that off.
cd
test -f installed/cpio-2.9.tar.bz2 && mv installed/cpio-2.9.tar.bz2 .
test ! -f cpio-2.9.tar.bz2 &&
wget http://ftp.gnu.org/gnu/cpio/cpio-2.9.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "cpio-*" -exec rm -r {} \;
tar xjvf ~/cpio-2.9.tar.bz2
cd cpio-2.9
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --disable-nls --enable-mt
make
# Become root to install it
su
test -x /sbin/removepkg && /sbin/removepkg cpio
# 'make install' would put cpio and mt into /usr/bin and rmt into
# /usr/libexec. We install things like Slackware does, cpio in /bin, mt
# in /bin but named mt-GNU (I think because of mt-st), and we skip rmt all
# together (because an rmt gets installed with tar).
install -s src/cpio /bin/
install -s src/mt /bin/mt-GNU
install -m 644 doc/cpio.1 doc/mt.1 /usr/man/man1/
ln -sf /usr/man/man1/mt.1 /usr/man/man1/mt-GNU.1
which makeinfo > /dev/null 2>&1 &&
( makeinfo doc/cpio.texi ; install -m 644 doc/cpio.info /usr/info/ )