[net] IP Addresses and Names: Moved DHCP, DNS, mDNS, and DDNS program into IP Address...
[openwrt/svn-archive/archive.git] / net / mdnsresponder / Makefile
1 #
2 # Copyright (C) 2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mDNSResponder
11 PKG_VERSION:=214.3.2
12 PKG_RELEASE:=1
13 PKG_INSTALL:=1
14 PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/
16 PKG_MD5SUM:=05d39f40767ccece4b740c5afad14a23
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/mDNSResponder-$(PKG_VERSION)
19
20 PKG_BUILD_PARALLEL:=0
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/mdnsresponder
25 SECTION:=net
26 CATEGORY:=Network
27 SUBMENU:=IP Addresses and Names
28 TITLE:=mDNSResponder
29 URL:=http://developer.apple.com/networking/bonjour/
30 endef
31
32 define Package/mdnsresponder/decription
33 Bonjour, also known as zero-configuration networking, enables
34 automatic discovery of computers, devices, and services on
35 IP networks.
36 endef
37
38 define Build/Configure
39 $(call Build/Configure/Default)
40 endef
41
42 # I have no idea why -lc is required, but without it, C library symbols are
43 # not found:
44 MAKE_FLAGS += \
45 LINKOPTS=-lc \
46 LDCONFIG= \
47 ETCBASE="$(PKG_INSTALL_DIR)/etc" \
48 INSTBASE="$(PKG_INSTALL_DIR)/usr" \
49 NSSINSTPATH="$(PKG_INSTALL_DIR)/lib" \
50 MANPATH="$(PKG_INSTALL_DIR)/usr/man" \
51 STARTUPSCRIPTDIR="$(PKG_INSTALL_DIR)/etc/init.d" \
52 RUNLEVELSCRIPTSDIR="$(PKG_INSTALL_DIR)/etc/rc.d" \
53 os=linux-uclibc
54 MAKE_PATH = mDNSPosix
55
56 define Build/Compile
57 $(call Build/Compile/Default)
58 # mDNSResponder's "make install" does not seem to create:
59 mkdir -p $(PKG_INSTALL_DIR)/lib/
60 mkdir -p $(PKG_INSTALL_DIR)/usr/bin/
61 mkdir -p $(PKG_INSTALL_DIR)/usr/sbin/
62 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/
63 mkdir -p $(PKG_INSTALL_DIR)/usr/man/man5/
64 mkdir -p $(PKG_INSTALL_DIR)/usr/man/man8/
65 mkdir -p $(PKG_INSTALL_DIR)/usr/include/
66 mkdir -p $(PKG_INSTALL_DIR)/etc/
67 mkdir -p $(PKG_INSTALL_DIR)/etc/init.d/
68 mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/
69 mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc2.d/
70 mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc3.d/
71 mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc4.d/
72 mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc5.d/
73 mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc0.d/
74 mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc6.d/
75 endef
76
77 define Build/InstallDev
78 $(INSTALL_DIR) $(1)/usr/include/
79 $(CP) $(PKG_BUILD_DIR)/mDNSShared/dns_sd.h $(1)/usr/include/
80 $(INSTALL_DIR) $(1)/usr/lib/
81 $(CP) \
82 $(PKG_BUILD_DIR)/mDNSPosix/build/prod/*.so* \
83 $(1)/usr/lib/
84 $(INSTALL_DIR) $(1)/usr/sbin/
85 endef
86
87 define 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/
97 endef
98
99 $(eval $(call BuildPackage,mdnsresponder))