mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-18 17:53:34 +08:00
avahi-daemon support
This commit is contained in:
parent
39b88e3691
commit
24cb67ca98
@ -6,3 +6,26 @@ config BR2_PACKAGE_AVAHI
|
|||||||
discovery on a local network.
|
discovery on a local network.
|
||||||
|
|
||||||
http://www.avahi.org/
|
http://www.avahi.org/
|
||||||
|
|
||||||
|
config BR2_PACKAGE_AVAHI_AUTOIPD
|
||||||
|
bool " IPv4LL network address configuration daemon"
|
||||||
|
default y
|
||||||
|
depends on BR2_PACKAGE_AVAHI
|
||||||
|
help
|
||||||
|
Avahi-autoipd implements IPv4LL, "Dynamic Configuration of
|
||||||
|
IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for
|
||||||
|
automatic IP address configuration from the link-local
|
||||||
|
169.254.0.0/16 range without the need for a central server.
|
||||||
|
It is primarily intended to be used in ad-hoc networks which
|
||||||
|
lack a DHCP server.
|
||||||
|
|
||||||
|
config BR2_PACKAGE_AVAHI_DAEMON
|
||||||
|
bool " mDNS/DNS-SD daemon"
|
||||||
|
default n
|
||||||
|
depends on BR2_PACKAGE_AVAHI
|
||||||
|
select BR2_PACKAGE_EXPAT
|
||||||
|
help
|
||||||
|
The Avahi mDNS/DNS-SD daemon implementing Apple's ZeroConf
|
||||||
|
architecture (also known as "Rendezvous" or "Bonjour").
|
||||||
|
The daemon registers local IP addresses and services using
|
||||||
|
mDNS/DNS-SD.
|
||||||
|
20
package/avahi/S50avahi-daemon
Normal file
20
package/avahi/S50avahi-daemon
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# avahi-daemon init script
|
||||||
|
|
||||||
|
DAEMON=/usr/sbin/avahi-daemon
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
$DAEMON -c || $DAEMON -D
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
$DAEMON -c && $DAEMON -k
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
$DAEMON -c && $DAEMON -r
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: S50avahi-daemon {start|stop|reload}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
@ -16,6 +16,23 @@ AVAHI_SITE:=http://www.avahi.org/download/
|
|||||||
AVAHI_SOURCE:=avahi-$(AVAHI_VER).tar.gz
|
AVAHI_SOURCE:=avahi-$(AVAHI_VER).tar.gz
|
||||||
AVAHI_CAT:=$(ZCAT)
|
AVAHI_CAT:=$(ZCAT)
|
||||||
|
|
||||||
|
AVAHI_TARGETS:=
|
||||||
|
|
||||||
|
ifeq ($(strip $(BR2_PACKAGE_AVAHI_AUTOIPD)),y)
|
||||||
|
AVAHI_TARGETS+=$(TARGET_DIR)/usr/sbin/avahi-autoipd
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(BR2_PACKAGE_AVAHI_DAEMON)),y)
|
||||||
|
AVAHI_TARGETS+=$(TARGET_DIR)/usr/sbin/avahi-daemon
|
||||||
|
AVAHI_DISABLE_EXPAT:=
|
||||||
|
# depend on the exact library file instead of expat so avahi isn't always
|
||||||
|
# considered out-of-date
|
||||||
|
AVAHI_EXPAT_DEP:=$(STAGING_DIR)/lib/libexpat.so.1
|
||||||
|
else
|
||||||
|
AVAHI_DISABLE_EXPAT:=--disable-expat
|
||||||
|
AVAHI_EXPAT_DEP:=
|
||||||
|
endif
|
||||||
|
|
||||||
$(DL_DIR)/$(AVAHI_SOURCE):
|
$(DL_DIR)/$(AVAHI_SOURCE):
|
||||||
$(WGET) -P $(DL_DIR) $(AVAHI_SITE)/$(AVAHI_SOURCE)
|
$(WGET) -P $(DL_DIR) $(AVAHI_SITE)/$(AVAHI_SOURCE)
|
||||||
|
|
||||||
@ -26,7 +43,7 @@ $(AVAHI_DIR)/.unpacked: $(DL_DIR)/$(AVAHI_SOURCE)
|
|||||||
toolchain/patch-kernel.sh $(AVAHI_DIR) package/avahi/ \*.patch
|
toolchain/patch-kernel.sh $(AVAHI_DIR) package/avahi/ \*.patch
|
||||||
touch $(AVAHI_DIR)/.unpacked
|
touch $(AVAHI_DIR)/.unpacked
|
||||||
|
|
||||||
$(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked
|
$(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked $(AVAHI_EXPAT_DEP)
|
||||||
(cd $(AVAHI_DIR) && rm -rf config.cache && autoconf)
|
(cd $(AVAHI_DIR) && rm -rf config.cache && autoconf)
|
||||||
( \
|
( \
|
||||||
cd $(AVAHI_DIR) && \
|
cd $(AVAHI_DIR) && \
|
||||||
@ -111,7 +128,7 @@ $(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked
|
|||||||
--disable-qt4 \
|
--disable-qt4 \
|
||||||
--disable-gtk \
|
--disable-gtk \
|
||||||
--disable-dbus \
|
--disable-dbus \
|
||||||
--disable-expat \
|
$(AVAHI_DISABLE_EXPAT) \
|
||||||
--disable-gdbm \
|
--disable-gdbm \
|
||||||
--disable-python \
|
--disable-python \
|
||||||
--disable-python-dbus \
|
--disable-python-dbus \
|
||||||
@ -132,7 +149,7 @@ $(AVAHI_DIR)/.compiled: $(AVAHI_DIR)/.configured
|
|||||||
|
|
||||||
$(STAGING_DIR)/usr/sbin/avahi-autoipd: $(AVAHI_DIR)/.compiled
|
$(STAGING_DIR)/usr/sbin/avahi-autoipd: $(AVAHI_DIR)/.compiled
|
||||||
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-autoipd install
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-autoipd install
|
||||||
touch -c $(STAGING_DIR)/usr/sbin/avahi-autoipd
|
touch -c $@
|
||||||
|
|
||||||
$(TARGET_DIR)/usr/sbin/avahi-autoipd: $(STAGING_DIR)/usr/sbin/avahi-autoipd
|
$(TARGET_DIR)/usr/sbin/avahi-autoipd: $(STAGING_DIR)/usr/sbin/avahi-autoipd
|
||||||
cp $^ $@
|
cp $^ $@
|
||||||
@ -145,13 +162,34 @@ $(TARGET_DIR)/usr/sbin/avahi-autoipd: $(STAGING_DIR)/usr/sbin/avahi-autoipd
|
|||||||
chmod 0755 $(TARGET_DIR)/usr/share/udhcpc/default.script
|
chmod 0755 $(TARGET_DIR)/usr/share/udhcpc/default.script
|
||||||
$(STRIP) --strip-unneeded $@
|
$(STRIP) --strip-unneeded $@
|
||||||
|
|
||||||
avahi: uclibc busybox libdaemon $(TARGET_DIR)/usr/sbin/avahi-autoipd
|
$(STAGING_DIR)/usr/lib/libavahi-common.so: $(AVAHI_DIR)/.compiled
|
||||||
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-common install
|
||||||
|
touch -c $@
|
||||||
|
|
||||||
|
$(STAGING_DIR)/usr/lib/libavahi-core.so: $(AVAHI_DIR)/.compiled $(STAGING_DIR)/usr/lib/libavahi-common.so
|
||||||
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-core install
|
||||||
|
touch -c $@
|
||||||
|
|
||||||
|
$(STAGING_DIR)/usr/sbin/avahi-daemon: $(AVAHI_DIR)/.compiled $(STAGING_DIR)/usr/lib/libavahi-core.so $(STAGING_DIR)/usr/lib/libavahi-common.so
|
||||||
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-daemon install
|
||||||
|
touch -c $@
|
||||||
|
|
||||||
|
$(TARGET_DIR)/usr/sbin/avahi-daemon: $(STAGING_DIR)/usr/sbin/avahi-daemon
|
||||||
|
cp $^ $@
|
||||||
|
cp -dpf $(STAGING_DIR)/lib/libavahi-*.so* $(TARGET_DIR)/usr/lib/
|
||||||
|
mkdir -p $(TARGET_DIR)/etc/avahi/services
|
||||||
|
cp -af $(BASE_DIR)/package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/
|
||||||
|
$(STRIP) --strip-unneeded $@
|
||||||
|
$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libavahi-*.so*
|
||||||
|
|
||||||
|
avahi: uclibc busybox libdaemon $(AVAHI_TARGETS)
|
||||||
|
|
||||||
avahi-clean:
|
avahi-clean:
|
||||||
$(MAKE) -C $(AVAHI_DIR) distclean
|
$(MAKE) -C $(AVAHI_DIR) distclean
|
||||||
rm -rf $(TARGET_DIR)/etc/avahi
|
rm -rf $(TARGET_DIR)/etc/avahi
|
||||||
rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
|
rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
|
||||||
rm -f $(TARGET_DIR)/etc/init.d/S*avahi*
|
rm -f $(TARGET_DIR)/etc/init.d/S*avahi*
|
||||||
|
rm -f $(TARGET_DIR)/usr/sbin/avahi-*
|
||||||
|
|
||||||
avahi-dirclean:
|
avahi-dirclean:
|
||||||
rm -rf $(AVAHI_DIR)
|
rm -rf $(AVAHI_DIR)
|
||||||
|
Loading…
Reference in New Issue
Block a user