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

# source: debian
TARBALL=net-tools_1.60.orig.tar.gz
MD5SUM=ecaf37acb5b5daff4bdda77785fd916d
SRC_URL=http://ftp.de.debian.org/debian/pool/main/n/net-tools/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC='net-tools: net-tools 1.60debian26 (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: 
net-tools: 
'

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/net-tools*  &&
	zcat $CHROOT_DIR/tmp/pkg/net-tools_1.60-26.diff.gz | patch -Np1 &&
	for p in $(cat debian/patches/series); do
		patch -Np1 -i debian/patches/$p
	done
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/net-tools*
	
	# use debian config, good one
	cp -f debian/config.make config.make &&
	cp -f debian/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 &&
	
	# done	
	pkg_build_slackdesc
}


