summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7331dffcd977ae7163d11ec45c70603e1671aaf9 (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
41
42
43
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=net-tools-git
pkgver=1.60.r366.gaebd88e
pkgrel=1
pkgdesc="The collection of base networking utilities for Linux"
arch=('i686' 'x86_64')
url="https://sourceforge.net/projects/net-tools/"
license=('GPL2')
depends=('glibc')
makedepends=('git')
provides=('net-tools')
conflicts=('net-tools')
source=("git+https://git.code.sf.net/p/net-tools/code")
sha256sums=('SKIP')


pkgver() {
  cd "code"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "code"

  yes "" | make config
  make
}

package() {
  cd "code"

  make DESTDIR="$pkgdir" BINDIR="/usr/bin" SBINDIR="/usr/bin" install

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

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