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

TARBALL=iproute2-$PKGVER.tar.xz
MD5SUM=0681bf4664b2649ad4e12551a3a7a1f9
BUNDLE=fatdog-base-8.2.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$BUNDLE

SLACKREQ=
SLACKDESC="iproute2: iproute2 $PKGVER (IP networking utilities)  
iproute2:  
iproute2: The IPRoute2 package contains programs for basic and advanced 
iproute2: IP-based networking.  
iproute2: 
iproute2: 
iproute2: 
iproute2: 
iproute2: 
iproute2: 
iproute2:
"


### 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() {
	cd /tmp/iproute2*
	
	# don't build docs for arpd (arpd won't be built anyway because it requires Berkeley db)
	sed -i '/ARPD/d' Makefile &&
	sed -i 's/arpd.8//' man/man8/Makefile &&
	sed -i '/tc-simple/s@tc-skbmod.8 @@' man/man8/Makefile &&
	rm -fv doc/arpd.sgml &&

	make $MAKEFLAGS CC="gcc ${BUILD64}" LIBDIR=/usr/$LIBDIR	&&
	make LIBDIR=/usr/$LIBDIR \
		DOCDIR=/usr/share/doc/iproute2-$PKGVER install &&

	pkg_build_slackdesc	
}
