From c1707f971f4316d880921e41af988c1a32e1ac49 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Sun, 28 Aug 2005 16:51:31 +0000 Subject: zeroconf: add a .bb for the zeroconf package, see bug #268 --- packages/zeroconf/.mtn2git_empty | 0 packages/zeroconf/zeroconf-0.6.1/.mtn2git_empty | 0 packages/zeroconf/zeroconf-0.6.1/busybox.patch | 13 ++++++++++ .../zeroconf/zeroconf-0.6.1/debian-zeroconf.patch | 28 ++++++++++++++++++++++ packages/zeroconf/zeroconf-0.6.1/zeroconf-default | 17 +++++++++++++ packages/zeroconf/zeroconf_0.6.1.bb | 22 +++++++++++++++++ 6 files changed, 80 insertions(+) create mode 100644 packages/zeroconf/.mtn2git_empty create mode 100644 packages/zeroconf/zeroconf-0.6.1/.mtn2git_empty create mode 100644 packages/zeroconf/zeroconf-0.6.1/busybox.patch create mode 100644 packages/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch create mode 100644 packages/zeroconf/zeroconf-0.6.1/zeroconf-default create mode 100644 packages/zeroconf/zeroconf_0.6.1.bb diff --git a/packages/zeroconf/.mtn2git_empty b/packages/zeroconf/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/zeroconf/zeroconf-0.6.1/.mtn2git_empty b/packages/zeroconf/zeroconf-0.6.1/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/zeroconf/zeroconf-0.6.1/busybox.patch b/packages/zeroconf/zeroconf-0.6.1/busybox.patch new file mode 100644 index 0000000000..1c695612ad --- /dev/null +++ b/packages/zeroconf/zeroconf-0.6.1/busybox.patch @@ -0,0 +1,13 @@ +--- zeroconf-0.6.1/zeroconf.sh.orig 2005-08-27 21:25:07 +0200 ++++ zeroconf-0.6.1/zeroconf.sh 2005-08-27 21:26:21 +0200 +@@ -30,7 +30,9 @@ + + remove_linklocal_addrs() + { +- ip addr show $IFACE | grep "inet.*169.254" | cut -d" " -f6 | xargs --replace -n 1 ip addr del {} dev $IFACE ++ for IP in `ip addr show $IFACE | grep "inet.*169.254" | cut -d" " -f6`; do ++ ip addr delete $IP dev $IFACE ++ done + } + + case $PHASE in diff --git a/packages/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch b/packages/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch new file mode 100644 index 0000000000..6c4008bc56 --- /dev/null +++ b/packages/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch @@ -0,0 +1,28 @@ +--- zeroconf-0.6.1.orig/debian-zeroconf ++++ zeroconf-0.6.1/debian-zeroconf +@@ -19,6 +19,8 @@ + [ -f /etc/default/zeroconf ] && + . /etc/default/zeroconf + ++[ -n "$DISABLE" ] && exit 0 ++ + for BLACK in $IFBLACKLIST; do + case $IFACE in + $BLACK) +@@ -31,7 +33,6 @@ + if [ -n "$FALLBACK" ]; then + /bin/ip addr show $IFACE scope global | grep -q "inet" + IP=$? +- [ $IP -eq 0 ] && exit 0 + if [ $IP -eq 0 ]; then + /bin/ip route add 169.254.0.0/16 dev $IFACE + exit 0 +@@ -39,6 +40,6 @@ + fi + + # otherwise, we are good to go +-/usr/local/sbin/zeroconf -i $IFACE ++/usr/sbin/zeroconf -i $IFACE + + exit 0 + diff --git a/packages/zeroconf/zeroconf-0.6.1/zeroconf-default b/packages/zeroconf/zeroconf-0.6.1/zeroconf-default new file mode 100644 index 0000000000..cc07b275f1 --- /dev/null +++ b/packages/zeroconf/zeroconf-0.6.1/zeroconf-default @@ -0,0 +1,17 @@ +# Default for zeroconf + +# disable zeroconf +# If you want to disable zeroconf completely, uncomment the following line +# this may be useful if you are debugging zeroconf or starting it manually +#DISABLE=yes + +# black-listed interfaces +# Interfaces which you never wish to have zeroconf run on should +# be listed here. e.g. "eth2 wlan1" in a space seperated string +IFBLACKLIST="" + +# fallback only +# If you would only like a link-local address if you were unable to +# obtain an address via DHCP then uncomment the following line +#FALLBACK=yes + diff --git a/packages/zeroconf/zeroconf_0.6.1.bb b/packages/zeroconf/zeroconf_0.6.1.bb new file mode 100644 index 0000000000..8dfa8ecb50 --- /dev/null +++ b/packages/zeroconf/zeroconf_0.6.1.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "IPv4 link-local address allocator" +HOMEPAGE = "http://www.progsoc.org/~wildfire/zeroconf/" +LICENSE = "GPL" +SECTION = "net" +PRIORITY = "optional" + +PR = "r0" + +SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${PN}-${PV}.tar.gz \ + file://debian-zeroconf.patch;patch=1 \ + file://busybox.patch;patch=1 \ + file://zeroconf-default" + +do_install () { + install -d ${D}${sbindir} + install -d ${D}${sysconfdir}/network/if-up.d + install -d ${D}${sysconfdir}/default + install -c -m 755 ${S}/zeroconf ${D}${sbindir}/zeroconf + install -c -m 755 ${S}/zeroconf.sh ${D}${sysconfdir}/zeroconf + install -c -m 755 ${S}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf + install -c ${WORKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf +} -- cgit v1.2.3