with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
case $with_distro in
- debian|gentoo|archlinux|suse|fedora|darwin|none)
+ debian|gentoo|archlinux|suse|fedora|darwin|freebsd|none)
;;
- netbsd|freebsd)
+ netbsd)
AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)])
;;
linux)
initscript/suse/Makefile
initscript/fedora/Makefile
initscript/darwin/Makefile
+initscript/freebsd/Makefile
avahi-dnsconfd/Makefile
avahi-utils/Makefile
avahi-python/Makefile
if TARGET_DARWIN
SUBDIRS += darwin
endif
+
+if TARGET_FREEBSD
+SUBDIRS += freebsd
+endif
--- /dev/null
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+initddir = $(sysconfdir)/rc.d
+
+EXTRA_DIST = \
+ avahi-daemon.sh.in \
+ avahi-dnsconfd.sh.in
+
+initd_SCRIPTS = \
+ avahi-daemon.sh \
+ avahi-dnsconfd.sh
+
+CLEANFILES = \
+ avahi-daemon.sh \
+ avahi-dnsconfd.sh
+
+avahi-daemon.sh: avahi-daemon.sh.in
+ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ chmod +x $@
+
+avahi-dnsconfd.sh: avahi-dnsconfd.sh.in
+ sed \
+ -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@sysconfdir\@,$(sysconfdir),g' \
+ $< > $@
+ chmod +x $@
--- /dev/null
+#!/bin/sh
+#
+# $FreeBSD: /repoman/r/pcvs/ports/net/avahi/files/avahi-daemon.sh,v 1.2 2005/11/19 05:55:56 marcus Exp $
+#
+# PROVIDE: avahi_daemon
+# REQUIRE: DAEMON dbus
+# KEYWORD: FreeBSD
+#
+# Avahi's mDNSResponder, a Zeroconf (Bonjour) service advertisement daemon.
+#
+
+avahi_daemon_enable=${avahi_daemon_enable-"NO"}
+avahi_daemon_flags=${avahi_daemon_flags-"-D"}
+
+. /etc/rc.subr
+
+name=avahi_daemon
+rcvar=`set_rcvar`
+
+start_cmd=avahi_daemon_start
+stop_cmd=avahi_daemon_stop
+
+avahi_daemon_bin=@sbindir@/avahi-daemon
+
+avahi_daemon_start() {
+ checkyesno avahi_daemon_enable && echo "Starting avahi-daemon." && \
+ ${avahi_daemon_bin} ${avahi_daemon_flags}
+}
+
+avahi_daemon_stop() {
+ checkyesno avahi_daemon_enable && echo "Stopping avahi-daemon." && \
+ ${avahi_daemon_bin} -k
+}
+
+load_rc_config ${name}
+run_rc_command "$1"
--- /dev/null
+#!/bin/sh
+#
+# $FreeBSD: /repoman/r/pcvs/ports/net/avahi/files/avahi-dnsconfd.sh,v 1.4 2005/11/19 06:36:09 ahze Exp $
+#
+# PROVIDE: avahi_dnsconfd
+# REQUIRE: DAEMON dbus avahi_daemon
+# KEYWORD: FreeBSD
+#
+# avahi-dnsconfd connects to a running avahi-daemon and runs the script
+# @sysconfdir@/avahi/dnsconf.action for each unicast DNS server that
+# is announced on the local LAN. This is useful for configuring unicast
+# DNS servers in a DHCP-like fashion with mDNS.
+#
+
+avahi_dnsconfd_enable=${avahi_dnsconfd_enable-"NO"}
+avahi_dnsconfd_flags=${avahi_dnsconfd_flags-"-D"}
+
+. /etc/rc.subr
+
+name=avahi_dnsconfd
+rcvar=`set_rcvar`
+
+start_cmd=avahi_dnsconfd_start
+stop_cmd=avahi_dnsconfd_stop
+
+avahi_dnsconfd_bin=@sbindir@/avahi-dnsconfd
+
+avahi_dnsconfd_start() {
+ checkyesno avahi_dnsconfd_enable && echo "Starting avahi-dnsconfd." && \
+ ${avahi_dnsconfd_bin} ${avahi_dnsconfd_flags}
+}
+
+avahi_dnsconfd_stop() {
+ checkyesno avahi_dnsconfd_enable && echo "Stopping avahi-dnsconfd." && \
+ ${avahi_dnsconfd_bin} -k
+}
+
+load_rc_config ${name}
+run_rc_command "$1"