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

# source: james
TARBALL=net-tools-$PKGVER.tar.xz
MD5SUM=78aae762c95e2d731faf88d482e4cde5
SRC_URL=http://downloads.sourceforge.net/net-tools/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="net-tools: net-tools $PKGVER (Linux networking tools)  
net-tools:  
net-tools: This package includes the important tools for controlling the 
net-tools: network subsystem of the Linux kernel. This includes arp, ifconfig, 
net-tools: netstat, rarp, nameif and route. Additionally, this package 
net-tools: contains utilities relating to particular network hardware types 
net-tools: (plipconfig, slattach, mii-tool) and advanced aspects of IP 
net-tools: configuration (iptunnel, ipmaddr).  
net-tools: 
net-tools: https://sourceforge.net/projects/net-tools/
net-tools: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package

### build
pkg_build() {
	cd /tmp/net-tools*

	# use our pre-defined config
	cp -f ../pkg/config.make config.make &&
	cp -f ../pkg/config.h config.h &&
	
	# build
	make COPTS="$CFLAGS -D_GNU_SOURCE" \
	    PROGS="ifconfig arp netstat route rarp slattach plipconfig \
		nameif iptunnel ipmaddr mii-tool" &&
	
	# install programs
	cp netstat /bin &&
	cp arp /usr/sbin &&
	for p  in ifconfig nameif plipconfig rarp route slattach ipmaddr iptunnel mii-tool; do
		cp $p /sbin
	done &&
	
	# install man
	for p in arp.8 ethers.5 ifconfig.8 mii-tool.8 nameif.8 netstat.8 plipconfig.8 rarp.8 route.8 slattach.8; do
		section=${p##*.}
		cp -v man/en_US/$p /usr/share/man/man$section
	done &&

	# rename ifconfig to nt-ifconfig (we decide later what we want to use)
	mv -v /sbin/{,nt-}ifconfig &&
	mv -v /usr/share/man/man8/{,nt-}ifconfig.8 &&
	
	# done	
	pkg_build_slackdesc
}


