core/iproute2/PKGBUILD

53 lines
1.4 KiB
Bash
Raw Normal View History

2010-03-13 23:25:19 +08:00
pkgname=iproute2
2016-03-14 09:51:40 +08:00
pkgver=4.4.0
2016-03-28 23:09:23 +08:00
pkgrel=2
2010-03-13 23:25:19 +08:00
pkgdesc="IP Routing Utilities"
2013-05-26 16:22:24 +08:00
arch=('x86_64')
2010-03-13 23:25:19 +08:00
license=('GPL2')
2013-05-26 16:22:24 +08:00
url="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
depends=('glibc' 'db' 'iptables')
makedepends=('linux-atm')
optdepends=('linux-atm: ATM support')
groups=('base')
2010-03-13 23:25:19 +08:00
provides=('iproute')
conflicts=('iproute')
replaces=('iproute')
options=('!makeflags')
backup=('etc/iproute2/ematch_map' 'etc/iproute2/rt_dsfield' 'etc/iproute2/rt_protos' \
'etc/iproute2/rt_realms' 'etc/iproute2/rt_scopes' 'etc/iproute2/rt_tables')
2016-03-28 23:09:23 +08:00
source=("http://www.kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz"
iproute2-fhs.patch)
2016-03-14 09:51:40 +08:00
sha256sums=('bc91c367288a19f78ef800cd6840363be1f22da8436fbae88e1a7250490d6514'
2016-03-28 23:09:23 +08:00
'7ab86ebccbdbd2e0218400588a3e6a8404e2ee0004794dacba2a01256540150e')
2013-05-26 16:22:24 +08:00
2014-09-27 12:12:32 +08:00
prepare() {
cd "$srcdir/$pkgname-$pkgver"
2010-03-13 23:25:19 +08:00
# set correct fhs structure
2013-05-26 16:22:24 +08:00
patch -Np1 -i "$srcdir/iproute2-fhs.patch"
2010-11-07 21:51:29 +08:00
2013-05-26 16:22:24 +08:00
# do not treat warnings as errors
sed -i 's/-Werror//' Makefile
2014-09-27 12:12:32 +08:00
}
build() {
cd "$srcdir/$pkgname-$pkgver"
2010-03-13 23:25:19 +08:00
2013-05-26 16:22:24 +08:00
./configure
2010-11-07 21:51:29 +08:00
make
}
package() {
2014-09-27 12:12:32 +08:00
cd "$pkgname-$pkgver"
2013-05-26 16:22:24 +08:00
make DESTDIR="$pkgdir" install
2010-03-13 23:25:19 +08:00
2010-11-07 21:51:29 +08:00
# libnetlink isn't installed, install it FS#19385
2013-05-26 16:22:24 +08:00
install -Dm644 include/libnetlink.h "$pkgdir/usr/include/libnetlink.h"
install -Dm644 lib/libnetlink.a "$pkgdir/usr/lib/libnetlink.a"
2016-03-28 23:09:23 +08:00
# move binaries
cd "${pkgdir}"
mv usr/sbin usr/bin
2010-03-13 23:25:19 +08:00
}