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

TARBALL=texinfo-$PKGVER.tar.xz
MD5SUM=be9500f3a361525622850ecb1b1fc024
BUNDLE=fatdog-base-11.3.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/900/$BUNDLE

SLACKREQ=
SLACKDESC="texinfo: texinfo $PKGVER (Info-pages utilities)  
texinfo:  
texinfo: The Texinfo package contains programs for reading, writing, and 
texinfo: converting info pages.  
texinfo: 
texinfo: 
texinfo: 
texinfo: 
texinfo: 
texinfo: 
texinfo:
"


### override download for LFS sources bundle
# $1-src-dir $2-tarball 
pkg_download() {
	echo downloading $BUNDLE for $TARBALL
	wget -P $1 $SRC_URL
	tar -xf $1/$BUNDLE --strip-components=1 -C $1 
	rm $1/$BUNDLE
}

### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	# LFS 11.0 - glibc 2.34 patch
	#cd /tmp/texinfo*       &&
	#./configure $CONFFLAGS &&
	#sed -e 's/__attribute_nonnull__/__nonnull/' \
	#	-i gnulib/lib/malloc/dynarray-skeleton.c &&
	#make $MAKEFLAGS && make install &&

	pkg_build_autoconf && 
	make TEXMF=/usr/share/texmf install-tex &&
	pkg_build_slackdesc	&&
	
	cat > /usr/sbin/update-infodir << "EOF"
#!/bin/sh
cd /usr/share/info
rm -v dir
for f in *
do install-info $f dir 2>/dev/null
done
EOF
	chmod +x /usr/sbin/update-infodir
}
