core/iproute2/PKGBUILD

55 lines
1.6 KiB
Bash
Raw Normal View History

2010-11-07 21:51:29 +08:00
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
2010-03-13 23:25:19 +08:00
pkgname=iproute2
2013-05-26 16:22:24 +08:00
pkgver=3.9.0
pkgrel=1
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')
2013-05-26 16:22:24 +08:00
source=(http://www.kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz
iproute2-fhs.patch)
sha1sums=('3f48a6d3019f1766f26cda6c4de5d3858837d92b'
'35b8cf2dc94b73eccad427235c07596146cd6f6c')
2013-05-26 16:34:01 +08:00
build() {
2013-05-26 16:22:24 +08:00
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
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() {
2013-05-26 16:22:24 +08:00
cd $srcdir/$pkgname-$pkgver
make DESTDIR="$pkgdir" install
2010-03-13 23:25:19 +08:00
2013-05-26 16:22:24 +08:00
# allow loopback to be started before /usr is mounted, this may not be supported in the future
mkdir -p "$pkgdir/sbin"
mv "$pkgdir/usr/sbin/ip" "$pkgdir/sbin/ip"
ln -s /sbin/ip "$pkgdir/usr/sbin/ip"
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"
2010-03-13 23:25:19 +08:00
}