# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

pkgname=net-tools
pkgver=2.10
pkgrel=2
pkgdesc="Configuration tools for Linux networking"
arch=('x86_64')
license=('GPL2')
url="http://net-tools.sourceforge.net/"
depends=('glibc')
source=("https://downloads.sourceforge.net/project/net-tools/$pkgname-$pkgver.tar.xz")
options=(!makeflags)
sha256sums=('b262435a5241e89bfa51c3cabd5133753952f7a7b7b93f32e08cb9d96f580d69')

build() {
  cd ${pkgname}-${pkgver}
  export BINDIR='/usr/bin' SBINDIR='/usr/bin'
  yes "" | make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

  # the following is provided by yp-tools
  rm "${pkgdir}"/usr/bin/{nis,yp}domainname
  # hostname is provided by inetutils
  rm "${pkgdir}"/usr/bin/{hostname,dnsdomainname,domainname}
  rm -r "${pkgdir}"/usr/share/man/man1
}
