summaryrefslogtreecommitdiff
path: root/core/net-tools/PKGBUILD
blob: dc1a161973ec0489e437fd2e2a6d2c917a46ae06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: PKGBUILD 187035 2013-06-03 11:15:26Z allan $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

pkgname=net-tools
pkgver=1.60.20130531git
pkgrel=1
pkgdesc="Configuration tools for Linux networking"
arch=('i686' 'x86_64')
license=('GPL2')
url="http://net-tools.sourceforge.net/"
depends=('glibc')
makedepends=('git')
# use git snapshot currently prefered over release
source=("net-tools::git://git.code.sf.net/p/net-tools/code#commit=6a14c03f")
options=(!makeflags)
sha1sums=('SKIP')

prepare() {
  sed -i "s#/sbin#/bin#" ${srcdir}/${pkgname}/Makefile
  sed -i "s#/usr##" ${srcdir}/${pkgname}/man/Makefile
}

build() {
  cd ${srcdir}/${pkgname}
  yes "" | make
}

package() {
  cd ${srcdir}/${pkgname}
  make DESTDIR=${pkgdir}/usr update

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

  # hostname is provided by inetutils
  rm "${pkgdir}"/usr/bin/{hostname,dnsdomainname,domainname}
  rm -rf "${pkgdir}"/usr/share/man/man1
}