aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/bridge-utils/bridge-utils.inc
blob: bd96c6ab909169353b97178b44984e34d8b374f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SUMMARY = "Tools for ethernet bridging"
HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge"
SECTION = "console/network"
LICENSE = "GPLv2"

DEPENDS = "sysfsutils"

SRC_URI = "${SOURCEFORGE_MIRROR}/bridge/bridge-utils-${PV}.tar.gz \
          file://bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch \
          file://bridge-utils-1.5-fix-error-message-for-incorrect-command.patch \
          file://bridge-utils-1.5-fix-incorrect-command-in-manual.patch \
"

inherit autotools

EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}"

do_install_append () {
    mv ${D}${sbindir}/brctl ${D}${sbindir}/brctl.${PN}
    install -d ${D}/${datadir}/bridge-utils
    install -d ${D}/${sysconfdir}/network/if-pre-up.d
    install -d ${D}/${sysconfdir}/network/if-post-down.d
}

RRECOMMENDS_${PN} = "kernel-module-bridge"

pkg_postinst_${PN} () {
    update-alternatives --install ${sbindir}/brctl brctl brctl.${PN} 100
}

pkg_prerm_${PN} () {
    update-alternatives --remove brctl brctl.${PN}
}