zeroconf: add a .bb for the zeroconf package, see bug #268
authorPhilipp Zabel <philipp.zabel@gmail.com>
Sun, 28 Aug 2005 16:51:31 +0000 (16:51 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 28 Aug 2005 16:51:31 +0000 (16:51 +0000)
packages/zeroconf/.mtn2git_empty [new file with mode: 0644]
packages/zeroconf/zeroconf-0.6.1/.mtn2git_empty [new file with mode: 0644]
packages/zeroconf/zeroconf-0.6.1/busybox.patch [new file with mode: 0644]
packages/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch [new file with mode: 0644]
packages/zeroconf/zeroconf-0.6.1/zeroconf-default [new file with mode: 0644]
packages/zeroconf/zeroconf_0.6.1.bb [new file with mode: 0644]

diff --git a/packages/zeroconf/.mtn2git_empty b/packages/zeroconf/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/zeroconf/zeroconf-0.6.1/.mtn2git_empty b/packages/zeroconf/zeroconf-0.6.1/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/zeroconf/zeroconf-0.6.1/busybox.patch b/packages/zeroconf/zeroconf-0.6.1/busybox.patch
new file mode 100644 (file)
index 0000000..1c69561
--- /dev/null
@@ -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 (file)
index 0000000..6c4008b
--- /dev/null
@@ -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 (file)
index 0000000..cc07b27
--- /dev/null
@@ -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 (file)
index 0000000..8dfa8ec
--- /dev/null
@@ -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
+}