From: Nicolas Thill Date: Sun, 23 Jul 2006 17:16:50 +0000 (+0000) Subject: port howl to buildroot-ng X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=fad260d18f8e91d47274844311e316ce7b95f145 port howl to buildroot-ng SVN-Revision: 4240 --- diff --git a/libs/howl/Makefile b/libs/howl/Makefile new file mode 100644 index 0000000000..88f1dbde49 --- /dev/null +++ b/libs/howl/Makefile @@ -0,0 +1,180 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=howl +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/ +PKG_MD5SUM:=c389d3ffba0e69a179de2ec650f1fdcc +PKG_CAT:=zcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/libhowl + SECTION:=libs + CATEGORY:=Libraries + TITLE:=A Zeroconf networking implementation (library) + DESCRIPTION:=A Zeroconf networking implementation (library).\\\ + A cross-platform implementation of Zeroconf networking.\\\ + \\\ + This package contains shared libraries, needed by other programs. + URL:=http://www.porchdogsoft.com/products/howl/ +endef + +define Package/howl-utils + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=libhowl + TITLE:=A Zeroconf networking implementation (utilities) + DESCRIPTION:=A Zeroconf networking implementation (utilities).\\\ + A cross-platform implementation of Zeroconf networking.\\\ + \\\ + This package contains mDNS client utilities. + URL:=http://www.porchdogsoft.com/products/howl/ +endef + +define Package/autoipd + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=libhowl + TITLE:=An IPv4 Link-Local address self-assigner daemon + DESCRIPTION:=An IPv4 Link-Local address self-assigner daemon.\\\ + A cross-platform implementation of Zeroconf networking.\\\ + \\\ + This package contains an IPv4 Link-Local address self-assigner daemon. + URL:=http://www.porchdogsoft.com/products/howl/ +endef + +define Package/mdnsresponder + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=libhowl + TITLE:=An mDNS (Multicast DNS) service responder daemon + DESCRIPTION:=An mDNS (Multicast DNS) service responder daemon.\\\ + A cross-platform implementation of Zeroconf networking.\\\ + \\\ + This package contains an mDNS (Multicast DNS) service responder daemon. + URL:=http://www.porchdogsoft.com/products/howl/ +endef + +define Package/mdnsresponder/conffiles +/etc/mDNSResponder.conf +endef + +define Package/nifd + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=libhowl + TITLE:=A network interface monitor daemon + DESCRIPTION:=A network interface monitor daemon.\\\ + A cross-platform implementation of Zeroconf networking.\\\ + \\\ + This package contains a network interface monitor daemon. + URL:=http://www.porchdogsoft.com/products/howl/ +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -f config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + $(DISABLE_LARGEFILE) \ + $(DISABLE_NLS) \ + --enable-shared \ + --enable-static \ + ); +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/libhowl/install + install -m0755 -d $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(1)/usr/lib/ +endef + +define Package/howl-utils/install + install -m0755 -d $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(1)/usr/bin/ +endef + +define Package/mdnsresponder/install + install -m0755 -d $(1)/etc + install -m0644 ./files/mDNSResponder.conf $(1)/etc/mDNSResponder.conf + install -m0755 -d $(1)/etc/init.d + install -m0644 ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder + install -m0755 -d $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(1)/usr/sbin/ +endef + +define Package/autoipd/install + install -m0755 -d $(1)/etc/init.d + install -m0644 ./files/autoipd.init $(1)/etc/init.d/autoipd + install -m0755 -d $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(1)/usr/sbin/ +endef + +define Package/nifd/install + install -m0755 -d $(1)/etc/init.d + install -m0644 ./files/nifd.init $(1)/etc/init.d/nifd + install -m0755 -d $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nifd $(1)/usr/sbin/ +endef + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(STAGING_DIR)/usr/lib/ + mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(STAGING_DIR)/usr/lib/pkgconfig/ +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/howl \ + $(STAGING_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} \ + $(STAGING_DIR)/usr/lib/pkgconfig/howl.pc +endef + +$(eval $(call BuildPackage,libhowl)) +$(eval $(call BuildPackage,howl-utils)) +$(eval $(call BuildPackage,autoipd)) +$(eval $(call BuildPackage,mdnsresponder)) +$(eval $(call BuildPackage,nifd)) diff --git a/libs/howl/files/autoipd.init b/libs/howl/files/autoipd.init new file mode 100644 index 0000000000..eed593603c --- /dev/null +++ b/libs/howl/files/autoipd.init @@ -0,0 +1,20 @@ +#!/bin/sh + +DEFAULT=/etc/default/autopid +RUN_D=/var/run +PID_F=$RUN_D/autoipd.pid +[ -f $DEFAULT ] && . $DEFAULT + +case $1 in + start) + [ -d $RUN_D ] || mkdir -p $RUN_D + autoipd $OPTIONS + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac +exit $? diff --git a/libs/howl/files/mDNSResponder.conf b/libs/howl/files/mDNSResponder.conf new file mode 100644 index 0000000000..eac712f9e5 --- /dev/null +++ b/libs/howl/files/mDNSResponder.conf @@ -0,0 +1,2 @@ +#name #type #domain #port #text +"My Router" _http._tcp local. 80 "txtvers=1" "path=/P" "note=My Router" diff --git a/libs/howl/files/mDNSResponder.init b/libs/howl/files/mDNSResponder.init new file mode 100644 index 0000000000..292280f7c1 --- /dev/null +++ b/libs/howl/files/mDNSResponder.init @@ -0,0 +1,20 @@ +#!/bin/sh + +DEFAULT=/etc/default/mDNSResponder +RUN_D=/var/run +PID_F=$RUN_D/mDNSResponder.pid +[ -f $DEFAULT ] && . $DEFAULT + +case $1 in + start) + [ -d $RUN_D ] || mkdir -p $RUN_D + mDNSResponder $OPTIONS + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac +exit $? diff --git a/libs/howl/files/nifd.init b/libs/howl/files/nifd.init new file mode 100644 index 0000000000..b67861eb26 --- /dev/null +++ b/libs/howl/files/nifd.init @@ -0,0 +1,21 @@ +#!/bin/sh + +DEFAULT=/etc/default/nifd +RUN_D=/var/run +PID_F=$RUN_D/nifd.pid + +[ -f $DEFAULT ] && . $DEFAULT + +case $1 in + start) + [ -d $RUN_D ] || mkdir -p $RUN_D + nifd $OPTIONS + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac +exit $? diff --git a/libs/howl/patches/config-path.patch b/libs/howl/patches/config-path.patch new file mode 100644 index 0000000000..a0c26d1e27 --- /dev/null +++ b/libs/howl/patches/config-path.patch @@ -0,0 +1,14 @@ +--- howl-0.9.10-orig/src/mDNSResponder/Posix/posix_main.c 2005-01-27 04:11:20.000000000 +0100 ++++ howl-0.9.10-2/src/mDNSResponder/Posix/posix_main.c 2005-03-19 13:04:42.000000000 +0100 +@@ -249,9 +249,9 @@ + { + sw_mdns_servant_load_file(servant, conf_file); + } +- else if (sw_mdns_servant_load_file(servant, "/etc/howl/mDNSResponder.conf") != SW_OKAY) ++ else + { +- sw_mdns_servant_load_file(servant, "/usr/local/etc/howl/mDNSResponder.conf"); ++ sw_mdns_servant_load_file(servant, "/etc/mDNSResponder.conf"); + } + + write_pidfile("mDNSResponder", &pidfd); diff --git a/libs/howl/patches/debug-log.patch b/libs/howl/patches/debug-log.patch new file mode 100644 index 0000000000..91410b8e94 --- /dev/null +++ b/libs/howl/patches/debug-log.patch @@ -0,0 +1,10 @@ +--- howl-0.9.10-orig/src/mDNSResponder/Posix/posix_main.c 2005-01-27 04:11:20.000000000 +0100 ++++ howl-0.9.10-2/src/mDNSResponder/Posix/posix_main.c 2005-03-19 13:04:42.000000000 +0100 +@@ -186,6 +186,7 @@ + case 'd': + { + make_daemon = SW_FALSE; ++ sw_debug_set_level(SW_LOG_VERBOSE); + } + break; + diff --git a/libs/howl/patches/proto-fix.patch b/libs/howl/patches/proto-fix.patch new file mode 100644 index 0000000000..0b9d105dd6 --- /dev/null +++ b/libs/howl/patches/proto-fix.patch @@ -0,0 +1,11 @@ +--- howl-0.9.10-orig/include/salt/platform.h 2005-01-28 21:46:14.000000000 +0100 ++++ howl-0.9.10-2/include/salt/platform.h 2005-03-19 13:04:42.000000000 +0100 +@@ -409,7 +409,7 @@ + */ + + sw_const_string +-sw_strerror(); ++sw_strerror(void); + + + /*