### this file is sourced not run
PKGVER=2.12
PKGBUILD=1
PKGARCH=x86_64

# BLFS post-7.6 (2014-10-28) updated to 2.12
TARBALL=cpio-$PKGVER.tar.bz2
MD5SUM=93eea9f07c0058c097891c73e4955456
SRC_URL=http://ftp.gnu.org/pub/gnu/cpio/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="cpio: cpio $PKGVER (cpio archiver)  
cpio:  
cpio: The cpio package contains tools for archiving. This package only 
cpio: contains cpio, and does not include mt.  
cpio: 
cpio: 
cpio: 
cpio: 
cpio: 
cpio: 
cpio: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/cpio*
	#sed -i -e '/gets is a/d' gnu/stdio.in.h && # fix for new glibc
	
	# BLFS uses --enable-mt and set --bindir=/bin, we don't
	./configure $CONFFLAGS --disable-mt \
				--with-rmt=/usr/libexec/rmt && # this disable rmt
	make $MAKEFLAGS &&
	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 install &&
	install -v -m755 -d /usr/share/doc/cpio-$PKGVER/html &&
	install -v -m644    doc/html/* \
						/usr/share/doc/cpio-$PKGVER/html &&
	install -v -m644    doc/cpio.{html,txt} \
						/usr/share/doc/cpio-$PKGVER &&
	rm -f /usr/share/man/man1/mt.1 && # we don't have mt
	pkg_build_slackdesc
}
