jobcore/iproute2/PKGBUILD

90 lines
3.1 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
## rebuild after any libbpf upgrade ##
pkgname=iproute2
pkgver=6.8.0
pkgrel=02
pkgdesc='IP Routing Utilities'
url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
depends=('glibc' 'iptables' 'libcap' 'libelf' 'libbpf')
makedepends=('db5.3')
optdepends=('db5.3: userspace arp daemon'
'libcap: tipc'
'linux-atm: ATM support'
'python: for routel')
provides=('iproute')
backup=('etc/iproute2/bpf_pinning'
'etc/iproute2/ematch_map'
'etc/iproute2/group'
'etc/iproute2/nl_protos'
'etc/iproute2/rt_dsfield'
'etc/iproute2/rt_protos'
'etc/iproute2/rt_realms'
'etc/iproute2/rt_scopes'
'etc/iproute2/rt_tables')
makedepends=('linux-atm' 'bison' 'gettext')
#options=('staticlibs' 'debug') ## uncomment this and comment the following to have the debug pkg produced
options=('staticlibs')
source=("https://www.kernel.org/pub/linux/utils/net/${pkgname}/${pkgname}-${pkgver}.tar."{xz,sign}
"sha256sums::https://mirrors.edge.kernel.org/pub/linux/utils/net/$pkgname/sha256sums.asc"
'0001-make-iproute2-fhs-compliant.patch'
'0002-bdb-5-3.patch')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
# set correct fhs structure
patch -Np1 -i "${srcdir}"/0001-make-iproute2-fhs-compliant.patch
# use Berkeley DB 5.3
patch -Np1 -i "${srcdir}"/0002-bdb-5-3.patch
# do not treat warnings as errors
sed -i 's/-Werror//' Makefile
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
export CFLAGS+=' -ffat-lto-objects'
./configure
make DBM_INCLUDE='/usr/include/db5.3'
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" SBINDIR="/usr/bin" install
# libnetlink isn't installed, install it FS#19385
install -Dm0644 include/libnetlink.h "${pkgdir}/usr/include/libnetlink.h"
install -Dm0644 lib/libnetlink.a "${pkgdir}/usr/lib/libnetlink.a"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL2')
validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger
# https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/sha256sums.asc
# 03a6cca3d71a908d1f15f7b495be2b8fe851f941458dc4664900d7f45fcf68ce iproute2-6.8.0.tar.xz
sha256sums=(03a6cca3d71a908d1f15f7b495be2b8fe851f941458dc4664900d7f45fcf68ce # iproute2-6.8.0.tar.xz
c4bfe16e16fe98de2eeb3fb9592ca485dbfbb2fe45f6978942bef3be3d7143ff # iproute2-6.8.0.tar.sign
cfa016ef326b969dd3bcfa92954a3dd9d1f520d51ab3c89697cacc5a9b39ff6f # sha256sums
758b82bd61ed7512d215efafd5fab5ae7a28fbfa6161b85e2ce7373285e56a5d # 0001-make-iproute2-fhs-compliant.patch
611c1ad7946aab226a5f4059922d9430f51b3377e33911427f8fdf7f7d31f7d6) # 0002-bdb-5-3.patch
## 49e83a969042a47f6add653d859304f07f3e3585fd0d88f81b989891c23f91e1 iproute2-6.8.0-02-x86_64.pkg.tar.lz
## 49e83a969042a47f6add653d859304f07f3e3585fd0d88f81b989891c23f91e1 iproute2-6.8.0-02-x86_64.pkg.tar.lz