Ignore:
Timestamp:
2011-11-12T02:30:33+01:00 (5 years ago)
Author:
nico
Message:

packages/mdnsreposnder: various changes:

  • split into mdns-utils (client utilities), mdnsd (server daemon) & mdnsresponder (meta package)
  • provide a default mDNSReponder config file advertising the SSH server
  • use new service functions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/mdnsresponder/Makefile

    r26068 r28970  
    11# 
    2 # Copyright (C) 2009 OpenWrt.org 
     2# Copyright (C) 2009-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=mDNSResponder 
    1111PKG_VERSION:=214.3.2 
    12 PKG_RELEASE:=1 
    13 PKG_INSTALL:=1 
     12PKG_RELEASE:=2 
     13 
    1414PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz 
    1515PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/ 
     
    1919 
    2020PKG_BUILD_PARALLEL:=0 
     21PKG_INSTALL:=1 
    2122 
    2223include $(INCLUDE_DIR)/package.mk 
    2324 
    24 define Package/mdnsresponder 
     25define Package/mDNSResponder/Default 
    2526  SECTION:=net 
    2627  CATEGORY:=Network 
    2728  SUBMENU:=IP Addresses and Names 
    28   TITLE:=mDNSResponder 
     29  TITLE:=mDNS 
    2930  URL:=http://developer.apple.com/networking/bonjour/ 
    3031endef 
    3132 
    32 define Package/mdnsresponder/decription 
     33define Package/mDNSResponder/Default/description 
    3334  Bonjour, also known as zero-configuration networking, enables 
    3435  automatic discovery of computers, devices, and services on 
     
    3637endef 
    3738 
    38 define Build/Configure 
    39         $(call Build/Configure/Default) 
     39define Package/mdns-utils 
     40$(call Package/mDNSResponder/Default) 
     41  TITLE+= client utilities 
     42endef 
     43 
     44define Package/mdns-utils/description 
     45$(call Package/mDNSResponder/Default/description) 
     46 . 
     47 This package contains mDNS client utilities: 
     48 - dns-sd 
     49 - mDNSClient 
     50 - mDNSIdentify 
     51 - mDNSNetMonitor 
     52 - mDNSProxyResponder 
     53 - mDNSResponder 
     54endef 
     55 
     56define Package/mdnsd 
     57$(call Package/mDNSResponder/Default) 
     58  TITLE+= server daemon 
     59endef 
     60 
     61define Package/mdnsd/description 
     62$(call Package/mDNSResponder/Default/description) 
     63 . 
     64 This package contains the mDNS server daemon. 
     65endef 
     66 
     67define Package/mdnsresponder 
     68$(call Package/mDNSResponder/Default) 
     69  TITLE+= suite (meta) 
     70  DEPENDS+= +mdns-utils +mdnsd 
     71endef 
     72 
     73define Package/mdnsresponder/description 
     74$(call Package/mDNSResponder/Default/description) 
     75 . 
     76 This meta package contains only dependencies on other packages. 
    4077endef 
    4178 
     
    4380# not found: 
    4481MAKE_FLAGS += \ 
     82        CFLAGS_DEBUG="$(TARGET_CFLAGS)" \ 
    4583        LINKOPTS=-lc \ 
    4684        LDCONFIG= \ 
     
    5694define Build/Compile 
    5795        $(call Build/Compile/Default) 
    58         # mDNSResponder's "make install" does not seem to create: 
     96        # XXX: mDNSResponder's "make install" does not seem to create: 
    5997        mkdir -p $(PKG_INSTALL_DIR)/lib/ 
    6098        mkdir -p $(PKG_INSTALL_DIR)/usr/bin/ 
     
    73111        mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc0.d/ 
    74112        mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc6.d/ 
     113        # XXX: mDNSResponder's makefile creates absolute link 
     114        rm -f $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so 
     115        ln -fs libdns_sd.so.1 $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so 
    75116endef 
    76117 
    77118define Build/InstallDev 
    78         $(INSTALL_DIR) $(1)/usr/include/ 
     119        $(INSTALL_DIR) $(1)/usr/include 
    79120        $(CP) $(PKG_BUILD_DIR)/mDNSShared/dns_sd.h $(1)/usr/include/ 
     121        $(INSTALL_DIR) $(1)/usr/lib 
     122        $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/*.so* $(1)/usr/lib/ 
     123endef 
     124 
     125define Package/mdns-utils/conffile 
     126  /etc/init.d/mDNSResponder 
     127endef 
     128 
     129define Package/mdns-utils/install 
     130        $(INSTALL_DIR) $(1)/usr/bin/ 
     131        $(CP) $(PKG_INSTALL_DIR)/usr/bin/dns-sd $(1)/usr/bin/ 
     132        $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSClientPosix $(1)/usr/bin/mDNSClient 
     133        $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSIdentify $(1)/usr/bin/mDNSIdentify 
     134        $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSNetMonitor $(1)/usr/bin/mDNSNetMonitor 
     135        $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSProxyResponderPosix $(1)/usr/bin/mDNSProxyResponder 
     136        $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSResponderPosix $(1)/usr/bin/mDNSResponder 
    80137        $(INSTALL_DIR) $(1)/usr/lib/ 
    81         $(CP) \ 
    82                 $(PKG_BUILD_DIR)/mDNSPosix/build/prod/*.so* \ 
    83                 $(1)/usr/lib/ 
     138        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so* $(1)/usr/lib/ 
     139        $(INSTALL_DIR) $(1)/etc 
     140        $(INSTALL_DATA) ./files/mDNSResponder.conf $(1)/etc/ 
     141        $(INSTALL_DIR) $(1)/etc/init.d 
     142        $(INSTALL_BIN) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder 
     143endef 
     144 
     145define Package/mdnsd/install 
    84146        $(INSTALL_DIR) $(1)/usr/sbin/ 
     147        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mdnsd $(1)/usr/sbin/ 
     148        $(INSTALL_DIR) $(1)/etc/init.d 
     149        $(INSTALL_BIN) ./files/mdnsd.init $(1)/etc/init.d/mdnsd 
    85150endef 
    86151 
    87152define Package/mdnsresponder/install 
    88         $(INSTALL_DIR) $(1)/etc/init.d 
    89         $(INSTALL_BIN) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder 
    90         $(INSTALL_DIR) $(1)/usr/lib/ 
    91         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so.1 $(1)/usr/lib/ 
    92         # Note: mDNSResponder's makefile creates the following link incorrectly: 
    93         ln -s libdns_sd.so.1 $(1)/usr/lib/libdns_sd.so 
    94         $(INSTALL_DIR) $(1)/usr/sbin/ 
    95         $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mdnsd $(1)/usr/sbin/ 
    96         $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSResponderPosix $(1)/usr/sbin/ 
     153        : 
    97154endef 
    98155 
     156$(eval $(call BuildPackage,mdns-utils)) 
     157$(eval $(call BuildPackage,mdnsd)) 
    99158$(eval $(call BuildPackage,mdnsresponder)) 
Note: See TracChangeset for help on using the changeset viewer.