aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Ulf Samuelsson <ulf.samuelsson@atmel.com>2007-08-11 16:44:54 +0000
committerGravatar Ulf Samuelsson <ulf.samuelsson@atmel.com>2007-08-11 16:44:54 +0000
commit28625ea369ebc99920b5a7f626d3fa6e68d1b028 (patch)
treecc1462b6da7580927b9e411225244391641b7694 /package
parent34335d029597e5a561fdbc01f54e54b117160015 (diff)
downloadbuildroot-28625ea369ebc99920b5a7f626d3fa6e68d1b028.tar.gz
buildroot-28625ea369ebc99920b5a7f626d3fa6e68d1b028.tar.bz2
Add mdnsresponder package
Diffstat (limited to 'package')
-rw-r--r--package/Config.in1
-rw-r--r--package/mdnsresponder/Config.in17
-rw-r--r--package/mdnsresponder/mDNSResponderPosix.conf23
-rw-r--r--package/mdnsresponder/mdnsresponder.mk92
-rw-r--r--package/mdnsresponder/rc.mdnsresponder67
5 files changed, 200 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 09617df9c5..b653cfc940 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -146,6 +146,7 @@ source "package/libcgicc/Config.in"
source "package/libpcap/Config.in"
source "package/links/Config.in"
source "package/lrzsz/Config.in"
+source "package/mdnsresponder/Config.in"
source "package/mrouted/Config.in"
source "package/nbd/Config.in"
source "package/ncftp/Config.in"
diff --git a/package/mdnsresponder/Config.in b/package/mdnsresponder/Config.in
new file mode 100644
index 0000000000..3c5235ba9d
--- /dev/null
+++ b/package/mdnsresponder/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_MDNSRESPONDER
+ bool "mDNSResponder"
+ default n
+ help
+ The mDNSResponder project is a component of Bonjour,
+ Apple's initiative for zero-configuration networking.
+
+ http://developer.apple.com/networking/bonjour/index.html
+
+config BR2_PACKAGE_MDNSRESPONDER_UTILS
+ bool "client and utils"
+ default n
+ depends on BR2_PACKAGE_MDNSRESPONDER
+ help
+ Install the client applications and debug utils
+
+
diff --git a/package/mdnsresponder/mDNSResponderPosix.conf b/package/mdnsresponder/mDNSResponderPosix.conf
new file mode 100644
index 0000000000..639e7be270
--- /dev/null
+++ b/package/mdnsresponder/mDNSResponderPosix.conf
@@ -0,0 +1,23 @@
+# See http://www.dns-sd.org/ServiceTypes.html for service types and parameters.
+# Format is:
+# name
+# service type
+# port
+# [params, name=value, one per line]
+# NOTE: At least as of 107.1 there is a bug where you cannot have a blank line
+# NOTE: before the first entry if there are any leading comments.
+#yourhost
+#_ssh._tcp.
+#22
+
+#yourhost
+#_http._tcp.
+#80
+#path=/
+
+#yourhost
+#_ftp._tcp.
+#21
+#u=yourusername
+#p=password
+#path=/somepath
diff --git a/package/mdnsresponder/mdnsresponder.mk b/package/mdnsresponder/mdnsresponder.mk
new file mode 100644
index 0000000000..83e9118e55
--- /dev/null
+++ b/package/mdnsresponder/mdnsresponder.mk
@@ -0,0 +1,92 @@
+#############################################################
+#
+# mDNSResponder
+#
+#############################################################
+MDNSRESPONDER_VERSION:=107.6
+MDNSRESPONDER_SOURCE:=mDNSResponder-$(MDNSRESPONDER_VERSION).tar.gz
+MDNSRESPONDER_SITE:=http://www.opensource.apple.com/darwinsource/tarballs/other/$(MDNSRESPONDER_SOURCE)
+MDNSRESPONDER_DIR:=$(BUILD_DIR)/mDNSResponder-$(MDNSRESPONDER_VERSION)
+MDNSRESPONDER_CAT:=zcat
+MDNSRESPONDER_INSTDEPS:=
+
+ifeq ($(BR2_PACKAGE_MDNSRESPONDER_UTILS),y)
+ MDNSRESPONDER_INSTDEPS+=$(TARGET_DIR)/usr/bin/mDNSClientPosix
+endif
+
+$(DL_DIR)/$(MDNSRESPONDER_SOURCE):
+ $(WGET) -P $(DL_DIR) $(MDNSRESPONDER_SITE)
+
+$(MDNSRESPONDER_DIR)/.unpacked: $(DL_DIR)/$(MDNSRESPONDER_SOURCE)
+ $(MDNSRESPONDER_CAT) $(DL_DIR)/$(MDNSRESPONDER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(MDNSRESPONDER_DIR)/.unpacked
+
+$(MDNSRESPONDER_DIR)/.configured: $(MDNSRESPONDER_DIR)/.unpacked
+ $(SED) 's:OPTIONALTARG = nss_mdns::' $(MDNSRESPONDER_DIR)/mDNSPosix/Makefile
+ touch $(MDNSRESPONDER_DIR)/.configured
+
+$(MDNSRESPONDER_DIR)/.built: $(MDNSRESPONDER_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) os="linux" LD="$(TARGET_CC) -shared" LOCALBASE="/usr" -C $(MDNSRESPONDER_DIR)/mDNSPosix
+ touch $(MDNSRESPONDER_DIR)/.built
+
+$(STAGING_DIR)/usr/lib/libdns_sd.so: $(MDNSRESPONDER_DIR)/.built
+ # lib
+ $(INSTALL) -m 644 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/libdns_sd.so $(STAGING_DIR)/usr/lib/
+ ln -sf $(STAGING_DIR)/usr/lib/libdns_sd.so $(STAGING_DIR)/usr/lib/libdns_sd.so.1
+ # include
+ $(INSTALL) -m 644 -D $(MDNSRESPONDER_DIR)/mDNSShared/dns_sd.h $(STAGING_DIR)/usr/include/
+
+$(TARGET_DIR)/usr/sbin/mdnsd: $(STAGING_DIR)/usr/lib/libdns_sd.so
+ # sbin
+ $(INSTALL) -m 755 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/dnsextd $(TARGET_DIR)/usr/sbin/
+ $(INSTALL) -m 755 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/mDNSResponderPosix $(TARGET_DIR)/usr/sbin/
+ $(INSTALL) -m 755 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/mdnsd $(TARGET_DIR)/usr/sbin/
+ # lib
+ $(INSTALL) -m 644 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/libdns_sd.so $(TARGET_DIR)/usr/lib/
+ ln -sf $(TARGET_DIR)/usr/lib/libdns_sd.so $(TARGET_DIR)/usr/lib/libdns_sd.so.1
+ # etc
+ $(INSTALL) -m 0644 -D package/mdnsresponder/mDNSResponderPosix.conf $(TARGET_DIR)/etc/
+ # init
+ $(INSTALL) -m 0755 -D package/mdnsresponder/rc.mdnsresponder $(TARGET_DIR)/etc/init.d/S80mdnsresponder
+
+$(TARGET_DIR)/usr/bin/mDNSClientPosix: $(STAGING_DIR)/usr/lib/libdns_sd.so
+ $(INSTALL) -m 755 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/mDNSNetMonitor $(TARGET_DIR)/usr/sbin/
+ # bin
+ $(INSTALL) -m 755 -D $(MDNSRESPONDER_DIR)/Clients/build/dns-sd $(TARGET_DIR)/usr/bin/
+ $(INSTALL) -m 755 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/mDNSProxyResponderPosix $(TARGET_DIR)/usr/bin/
+ $(INSTALL) -m 755 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/mDNSIdentify $(TARGET_DIR)/usr/bin/
+ $(INSTALL) -m 755 -D $(MDNSRESPONDER_DIR)/mDNSPosix/build/prod/mDNSClientPosix $(TARGET_DIR)/usr/bin/
+
+
+mdnsresponder: uclibc $(TARGET_DIR)/usr/sbin/mdnsd $(MDNSRESPONDER_INSTDEPS)
+
+mdnsresponder-source: $(DL_DIR)/$(MDNSRESPONDER_SOURCE)
+
+mdnsresponder-clean:
+ rm -f $(MDNSRESPONDER_DIR)/.configured $(MDNSRESPONDER_DIR)/.built $(MDNSRESPONDER_DIR)/.staged
+ -$(MAKE) os=linux -C $(MDNSRESPONDER_DIR)/mDNSPosix clean
+ rm -f $(TARGET_DIR)/usr/sbin/dnsextd
+ rm -f $(TARGET_DIR)/usr/sbin/mDNSResponderPosix
+ rm -f $(TARGET_DIR)/usr/sbin/mDNSNetMonitor
+ rm -f $(TARGET_DIR)/usr/sbin/mdnsd
+ rm -f $(TARGET_DIR)/usr/bin/dns-sd
+ rm -f $(TARGET_DIR)/usr/bin/mDNSProxyResponderPosix
+ rm -f $(TARGET_DIR)/usr/bin/mDNSIdentify
+ rm -f $(TARGET_DIR)/usr/bin/mDNSClientPosix
+ rm -f $(TARGET_DIR)/usr/lib/libdns_sd.so*
+ rm -f $(STAGING_DIR)/usr/lib/libdns_sd.so*
+ rm -f $(STAGING_DIR)/usr/include/dns_sd.h
+ rm -f $(TARGET_DIR)/etc/mDNSResponderPosix.conf
+ rm -f $(TARGET_DIR)/etc/init.d/S80mdnsresponder
+
+mdnsresponder-dirclean:
+ rm -rf $(MDNSRESPONDER_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_MDNSRESPONDER)),y)
+TARGETS+=mdnsresponder
+endif
diff --git a/package/mdnsresponder/rc.mdnsresponder b/package/mdnsresponder/rc.mdnsresponder
new file mode 100644
index 0000000000..1b08cf06e1
--- /dev/null
+++ b/package/mdnsresponder/rc.mdnsresponder
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# Starts mDNSResponderPosix and mdnsd
+#
+
+umask 077
+
+start() {
+ echo -n "Starting mdnsd: "
+ start-stop-daemon --start --quiet --pidfile /var/run/mdnsd.pid \
+ --exec /usr/sbin/mdnsd
+ if [ "$?" != "0" ] ; then
+ echo "FAIL"
+ return 1
+ fi
+ echo "OK"
+
+ echo -n "Starting mDNSResponderPosix: "
+ start-stop-daemon --start --quiet --pidfile /var/run/mDNSResponderPosix.pid \
+ --exec /usr/sbin/mDNSResponderPosix \
+ -- -b -f /etc/mDNSResponderPosix.conf -P /var/run/mDNSResponderPosix.pid
+ if [ "$?" != "0" ] ; then
+ echo "FAIL"
+ return 1
+ fi
+ echo "OK"
+}
+stop() {
+ echo -n "Stopping mDNSResponderPosix: "
+ start-stop-daemon --stop --quiet --pidfile /var/run/mDNSResponderPosix.pid
+ if [ "$?" != "0" ] ; then
+ echo "FAIL"
+ return 1
+ fi
+ echo "OK"
+
+ echo -n "Stopping mdnsd: "
+ start-stop-daemon --stop --quiet --pidfile /var/run/mdnsd.pid
+ if [ "$?" != "0" ] ; then
+ echo "FAIL"
+ return 1
+ fi
+ echo "OK"
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+