archrelease: copy trunk to extra-x86_64
[arch-packages.git] / iproute2 / trunk / PKGBUILD
blobbc22479aa292d7a519d13695a65ea260c75702f3
1 # Maintainer: Christian Hesse <mail@eworm.de>
2 # Maintainer: Ronald van Haren <ronald.archlinux.org>
3 # Contributor: Judd Vinet <jvinet@zeroflux.org>
5 pkgname=iproute2
6 pkgver=5.18.0
7 pkgrel=1
8 pkgdesc='IP Routing Utilities'
9 arch=('x86_64')
10 license=('GPL2')
11 url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
12 depends=('glibc' 'iptables' 'libelf' 'libbpf')
13 optdepends=('db: userspace arp daemon'
14             'libcap: tipc'
15             'linux-atm: ATM support')
16 provides=('iproute')
17 backup=('etc/iproute2/bpf_pinning'
18         'etc/iproute2/ematch_map'
19         'etc/iproute2/group'
20         'etc/iproute2/nl_protos'
21         'etc/iproute2/rt_dsfield'
22         'etc/iproute2/rt_protos'
23         'etc/iproute2/rt_realms'
24         'etc/iproute2/rt_scopes'
25         'etc/iproute2/rt_tables')
26 makedepends=('linux-atm')
27 options=('staticlibs' 'debug')
28 validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger
29 source=("https://www.kernel.org/pub/linux/utils/net/${pkgname}/${pkgname}-${pkgver}.tar."{xz,sign}
30         '0001-make-iproute2-fhs-compliant.patch')
31 sha256sums=('5ba3d464d51c8c283550d507ffac3d10f7aec587b7c66b0ccb6950643646389e'
32             'SKIP'
33             '758b82bd61ed7512d215efafd5fab5ae7a28fbfa6161b85e2ce7373285e56a5d')
35 prepare() {
36   cd "${srcdir}/${pkgname}-${pkgver}"
38   # set correct fhs structure
39   patch -Np1 -i "${srcdir}"/0001-make-iproute2-fhs-compliant.patch
41   # do not treat warnings as errors
42   sed -i 's/-Werror//' Makefile
46 build() {
47   cd "${srcdir}/${pkgname}-${pkgver}"
49   export CFLAGS+=' -ffat-lto-objects'
51   ./configure
52   make
55 package() {
56   cd "${srcdir}/${pkgname}-${pkgver}"
58   make DESTDIR="${pkgdir}" SBINDIR="/usr/bin" install
60   # libnetlink isn't installed, install it FS#19385
61   install -Dm0644 include/libnetlink.h "${pkgdir}/usr/include/libnetlink.h"
62   install -Dm0644 lib/libnetlink.a "${pkgdir}/usr/lib/libnetlink.a"