packages/libs/howl/Makefile
blogic 1120328d15 InstallDev should be using (1) and not (STAGING_DIR)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@9173 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-10-07 03:20:26 +00:00

152 lines
4.0 KiB
Makefile

#
# 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_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/
PKG_MD5SUM:=c389d3ffba0e69a179de2ec650f1fdcc
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
define Package/howl/Default
SECTION:=net
CATEGORY:=Network
TITLE:=Zeroconf networking implementation
DESCRIPTION:=\
Howl is a cross-platform implementation of Zeroconf networking.
URL:=http://www.porchdogsoft.com/products/howl/
endef
define Package/libhowl
$(call Package/howl/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= (library)
DESCRIPTION+=\\\
\\\
This package contains the Howl shared libraries, used by other programs.
endef
define Package/howl-autoipd
$(call Package/howl/Default)
DEPENDS:=+libhowl
TITLE:=An IPv4 Link-Local address self-assigner daemon
DESCRIPTION+=\\\
\\\
This package contains an IPv4 Link-Local address self-assigner daemon.
endef
define Package/howl-mdnsresponder
$(call Package/howl/Default)
DEPENDS:=+libhowl
TITLE:=An mDNS (Multicast DNS) service responder daemon
DESCRIPTION+=\\\
\\\
This package contains an mDNS (Multicast DNS) service responder daemon.
endef
define Package/howl-mdnsresponder/conffiles
/etc/mDNSResponder.conf
endef
define Package/howl-nifd
$(call Package/howl/Default)
DEPENDS:=+libhowl
TITLE:=A network interface monitor daemon
DESCRIPTION+=\\\
\\\
This package contains a network interface monitor daemon.
endef
define Package/howl-utils
$(call Package/howl/Default)
DEPENDS:=+libhowl
TITLE+= (utilities)
DESCRIPTION+=\\\
\\\
This package contains mDNS (Multicast DNS) client utilities.
endef
define Build/Configure
$(call Build/Configure/Default, \
--enable-shared \
--enable-static \
);
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Build/InstallDev
mkdir -p $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(1)/usr/include/
mkdir -p $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(1)/usr/lib/
mkdir -p $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(1)/usr/lib/pkgconfig/
$(SED) 's,-I/usr/include,-I$$$${includedir},g' $(1)/usr/lib/pkgconfig/howl.pc
$(SED) 's,-L/usr/lib/howl,-L$$$${libdir}/howl,g' $(1)/usr/lib/pkgconfig/howl.pc
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
define Package/libhowl/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(1)/usr/lib/
endef
define Package/howl-autoipd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DATA) ./files/autoipd.init $(1)/etc/init.d/autoipd
endef
define Package/howl-mdnsresponder/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) ./files/mDNSResponder.conf $(1)/etc/mDNSResponder.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder
endef
define Package/howl-nifd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/nifd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DATA) ./files/nifd.init $(1)/etc/init.d/nifd
endef
define Package/howl-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libhowl))
$(eval $(call BuildPackage,howl-autoipd))
$(eval $(call BuildPackage,howl-mdnsresponder))
$(eval $(call BuildPackage,howl-nifd))
$(eval $(call BuildPackage,howl-utils))