summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c15f2962f97aff6527a85592370c31c17dff5500 (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
44
45
46
47
48
49
50
# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
# Adapted from the net-tools package in [core].
pkgname=net-tools-mptcp
_srcname=net-tools
_mptcpv=0.91
pkgver=0.91.1.r0.g888d808
pkgrel=1
epoch=1
pkgdesc="Configuration tools for Linux networking, with Multipath TCP support"
arch=('i686' 'x86_64')
license=('GPL2')
url="http://multipath-tcp.org/pmwiki.php/Users/Tools"
depends=('glibc')
makedepends=('git')
provides=('net-tools')
# mptcp-net-tools is the old name of the AUR package
conflicts=('mptcp-net-tools' 'net-tools')
# Build fails with -jX for X > 1.  Force sequential build
options=(!makeflags)
source=("git://github.com/multipath-tcp/net-tools#branch=mptcp_v${_mptcpv}")
sha1sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_srcname}"
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

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

package() {
  cd "${srcdir}/${_srcname}"
  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
}