upgpkg: ocaml 5.0.0-1
[arch-packages.git] / iproute2 / repos / core-x86_64 / PKGBUILD
blob9cbb31b02ac579d0edcaf0927dcb433c296cacef
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=6.3.0
7 pkgrel=2
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' 'libcap' 'libelf' 'libbpf')
13 makedepends=('db5.3')
14 optdepends=('db5.3: userspace arp daemon'
15             'linux-atm: ATM support'
16             'python: for routel')
17 provides=('iproute')
18 backup=('etc/iproute2/bpf_pinning'
19         'etc/iproute2/ematch_map'
20         'etc/iproute2/group'
21         'etc/iproute2/nl_protos'
22         'etc/iproute2/rt_dsfield'
23         'etc/iproute2/rt_protos'
24         'etc/iproute2/rt_realms'
25         'etc/iproute2/rt_scopes'
26         'etc/iproute2/rt_tables')
27 makedepends=('linux-atm')
28 options=('staticlibs')
29 validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger
30 source=("https://www.kernel.org/pub/linux/utils/net/${pkgname}/${pkgname}-${pkgver}.tar."{xz,sign}
31         '0001-make-iproute2-fhs-compliant.patch'
32         '0002-bdb-5-3.patch')
33 sha256sums=('dfb2a98db96e7a653cffc6693335a1a466e29a34b6ac528be48f35e1d2766732'
34             'SKIP'
35             '758b82bd61ed7512d215efafd5fab5ae7a28fbfa6161b85e2ce7373285e56a5d'
36             '611c1ad7946aab226a5f4059922d9430f51b3377e33911427f8fdf7f7d31f7d6')
38 prepare() {
39   cd "${srcdir}/${pkgname}-${pkgver}"
41   # set correct fhs structure
42   patch -Np1 -i "${srcdir}"/0001-make-iproute2-fhs-compliant.patch
44   # use Berkeley DB 5.3
45   patch -Np1 -i "${srcdir}"/0002-bdb-5-3.patch
47   # do not treat warnings as errors
48   sed -i 's/-Werror//' Makefile
52 build() {
53   cd "${srcdir}/${pkgname}-${pkgver}"
55   export CFLAGS+=' -ffat-lto-objects'
57   ./configure
58   make DBM_INCLUDE='/usr/include/db5.3'
61 package() {
62   cd "${srcdir}/${pkgname}-${pkgver}"
64   make DESTDIR="${pkgdir}" SBINDIR="/usr/bin" install
66   # libnetlink isn't installed, install it FS#19385
67   install -Dm0644 include/libnetlink.h "${pkgdir}/usr/include/libnetlink.h"
68   install -Dm0644 lib/libnetlink.a "${pkgdir}/usr/lib/libnetlink.a"