You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
4.8 KiB

  1. #
  2. # Copyright (C) 2009-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mDNSResponder
  9. PKG_VERSION:=576.30.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/
  13. PKG_HASH:=4737cb51378377e11d0edb7bcdd1bec79cbdaa7b27ea09c13e3006e58f8d92c0
  14. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
  15. PKG_LICENSE:=Apache-2.0
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/mDNSResponder-$(PKG_VERSION)
  17. PKG_BUILD_PARALLEL:=0
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. # sys/capability.h is not part of *libc*
  21. PKG_BUILD_DEPENDS:=libcap
  22. define Package/mDNSResponder/Default
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=IP Addresses and Names
  26. TITLE:=mDNS
  27. URL:=http://developer.apple.com/networking/bonjour/
  28. endef
  29. define Package/mDNSResponder/Default/description
  30. Bonjour, also known as zero-configuration networking, enables
  31. automatic discovery of computers, devices, and services on
  32. IP networks.
  33. endef
  34. define Package/mdns-utils
  35. $(call Package/mDNSResponder/Default)
  36. TITLE+= client utilities
  37. DEPENDS+= +mdnsd
  38. endef
  39. define Package/mdns-utils/description
  40. $(call Package/mDNSResponder/Default/description)
  41. .
  42. This package contains mDNS client utilities:
  43. - dns-sd
  44. - mDNSClient
  45. - mDNSIdentify
  46. - mDNSNetMonitor
  47. - mDNSProxyResponder
  48. - mDNSResponder
  49. endef
  50. define Package/mdnsd
  51. $(call Package/mDNSResponder/Default)
  52. TITLE+= server daemon
  53. endef
  54. define Package/mdnsd/description
  55. $(call Package/mDNSResponder/Default/description)
  56. .
  57. This package contains the mDNS server daemon.
  58. endef
  59. define Package/mdnsresponder
  60. $(call Package/mDNSResponder/Default)
  61. TITLE+= suite (meta)
  62. DEPENDS+= +mdns-utils +mdnsd
  63. endef
  64. define Package/mdnsresponder/description
  65. $(call Package/mDNSResponder/Default/description)
  66. .
  67. This meta package contains only dependencies on other packages.
  68. endef
  69. # I have no idea why -lc is required, but without it, C library symbols are
  70. # not found:
  71. MAKE_FLAGS += \
  72. LD="$(TARGET_CC)" \
  73. CFLAGS_DEBUG="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  74. LINKOPTS=-lc \
  75. LDCONFIG= \
  76. ETCBASE="$(PKG_INSTALL_DIR)/etc" \
  77. INSTBASE="$(PKG_INSTALL_DIR)/usr" \
  78. NSSINSTPATH="$(PKG_INSTALL_DIR)/lib" \
  79. MANPATH="$(PKG_INSTALL_DIR)/usr/man" \
  80. STARTUPSCRIPTDIR="$(PKG_INSTALL_DIR)/etc/init.d" \
  81. RUNLEVELSCRIPTSDIR="$(PKG_INSTALL_DIR)/etc/rc.d" \
  82. os=linux-uclibc
  83. MAKE_PATH = mDNSPosix
  84. define Build/Compile
  85. $(call Build/Compile/Default)
  86. # XXX: mDNSResponder's "make install" does not seem to create:
  87. mkdir -p $(PKG_INSTALL_DIR)/lib/
  88. mkdir -p $(PKG_INSTALL_DIR)/usr/bin/
  89. mkdir -p $(PKG_INSTALL_DIR)/usr/sbin/
  90. mkdir -p $(PKG_INSTALL_DIR)/usr/lib/
  91. mkdir -p $(PKG_INSTALL_DIR)/usr/man/man5/
  92. mkdir -p $(PKG_INSTALL_DIR)/usr/man/man8/
  93. mkdir -p $(PKG_INSTALL_DIR)/usr/include/
  94. mkdir -p $(PKG_INSTALL_DIR)/etc/
  95. mkdir -p $(PKG_INSTALL_DIR)/etc/init.d/
  96. mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/
  97. mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc2.d/
  98. mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc3.d/
  99. mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc4.d/
  100. mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc5.d/
  101. mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc0.d/
  102. mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc6.d/
  103. endef
  104. define Build/InstallDev
  105. $(INSTALL_DIR) $(1)/usr/include
  106. $(CP) $(PKG_BUILD_DIR)/mDNSShared/dns_sd.h $(1)/usr/include/
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/*.so* $(1)/usr/lib/
  109. endef
  110. define Package/mdns-utils/install
  111. $(INSTALL_DIR) $(1)/usr/bin/
  112. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dns-sd $(1)/usr/bin/
  113. $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSClientPosix $(1)/usr/bin/mDNSClient
  114. $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSIdentify $(1)/usr/bin/mDNSIdentify
  115. $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSNetMonitor $(1)/usr/bin/mDNSNetMonitor
  116. $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSProxyResponderPosix $(1)/usr/bin/mDNSProxyResponder
  117. $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSResponderPosix $(1)/usr/bin/mDNSResponder
  118. $(INSTALL_DIR) $(1)/etc
  119. $(INSTALL_DATA) ./files/mDNSResponder.conf $(1)/etc/
  120. $(INSTALL_DIR) $(1)/etc/init.d
  121. $(INSTALL_BIN) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder
  122. endef
  123. define Package/mdns-utils/conffiles
  124. /etc/mDNSResponder.conf
  125. endef
  126. define Package/mdnsd/install
  127. $(INSTALL_DIR) $(1)/usr/sbin/
  128. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mdnsd $(1)/usr/sbin/
  129. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  130. $(INSTALL_DIR) $(1)/etc/init.d
  131. $(INSTALL_BIN) ./files/mdnsd.init $(1)/etc/init.d/mdnsd
  132. $(INSTALL_DIR) $(1)/usr/lib/
  133. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so.1 $(1)/usr/lib/
  134. $(LN) -s libdns_sd.so.1 $(1)/usr/lib/libdns_sd.so
  135. endef
  136. define Package/mdnsresponder/install
  137. :
  138. endef
  139. $(eval $(call BuildPackage,mdns-utils))
  140. $(eval $(call BuildPackage,mdnsd))
  141. $(eval $(call BuildPackage,mdnsresponder))