NAME="cpio"
DESC="Tools for archiving"
VERSION="2.14"
FILES=("https://ftp.gnu.org/gnu/cpio/cpio-$VERSION.tar.bz2")
HASHES=("b153e1843561841d37190e48b891188d")
DEPENDS=()

PACKAGE() {
  tar xf $NAME-$VERSION.tar.bz2 
	cd $NAME-$VERSION
	
	./configure --prefix=/usr \
            --enable-mt   \
            --with-rmt=/usr/libexec/rmt &&
	make &&
	makeinfo --html            -o doc/html      doc/cpio.texi &&
	makeinfo --html --no-split -o doc/cpio.html doc/cpio.texi &&
	makeinfo --plaintext       -o doc/cpio.txt  doc/cpio.texi

	make DESTDIR=$ROOTDIR install &&
	install -v -m755 -d $ROOTDIR/usr/share/doc/cpio-$VERSION/html
	install -v -m644    doc/html/* \
											$ROOTDIR/usr/share/doc/cpio-$VERSION/html
	install -v -m644    doc/cpio.{html,txt} \
											$ROOTDIR/usr/share/doc/cpio-$VERSION

  cd .. && rm -rf $NAME-$VERSION
}
