961760ab11b439d2e7d98636a3dd6dc33858f6b2
[packages.git] / libs / howl / Makefile
1
2 # Copyright (C) 2006 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:=howl
11 PKG_VERSION:=1.0.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/
16 PKG_MD5SUM:=c389d3ffba0e69a179de2ec650f1fdcc
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/howl/Default
21   SECTION:=net
22   CATEGORY:=Network
23   TITLE:=Zeroconf networking implementation
24   URL:=http://www.porchdogsoft.com/products/howl/
25 endef
26
27 define Package/libhowl
28   $(call Package/howl/Default)
29   SECTION:=libs
30   CATEGORY:=Libraries
31   TITLE+= (library)
32 endef
33
34 define Package/libhowl/description
35         Howl is a cross-platform implementation of Zeroconf networking. 
36         This package contains the Howl shared libraries, used by other programs.
37 endef
38
39 define Package/howl-autoipd
40   $(call Package/howl/Default)
41   DEPENDS:=+libhowl
42   TITLE:=An IPv4 Link-Local address self-assigner daemon
43 endef
44
45 define Package/howl-autoipd/description
46         Howl is a cross-platform implementation of Zeroconf networking. 
47         This package contains an IPv4 Link-Local address self-assigner daemon.
48 endef
49
50 define Package/howl-mdnsresponder
51   $(call Package/howl/Default)
52   DEPENDS:=+libhowl +libpthread
53   TITLE:=An mDNS (Multicast DNS) service responder daemon
54 endef
55
56 define Package/howl-mdnsresponder/description
57         Howl is a cross-platform implementation of Zeroconf networking. 
58         This package contains an mDNS (Multicast DNS) service responder daemon.
59 endef
60
61 define Package/howl-mdnsresponder/conffiles
62 /etc/mDNSResponder.conf
63 endef
64
65 define Package/howl-nifd
66   $(call Package/howl/Default)
67   DEPENDS:=+libhowl
68   TITLE:=A network interface monitor daemon
69 endef
70
71 define Package/howl-nifd/description
72         This package contains a network interface monitor daemon.
73 endef
74
75 define Package/howl-utils
76   $(call Package/howl/Default)
77   DEPENDS:=+libhowl
78   TITLE+= (utilities)
79 endef
80
81 define Package/howl-utils/description
82         This package contains mDNS (Multicast DNS) client utilities.
83 endef
84
85 define Build/Configure
86         $(call Build/Configure/Default, \
87                 --enable-shared \
88                 --enable-static \
89         );
90 endef
91
92 TARGET_CFLAGS += $(FPIC)
93
94 define Build/Compile
95         $(MAKE) -C $(PKG_BUILD_DIR) \
96                 DESTDIR="$(PKG_INSTALL_DIR)" \
97                 all install
98 endef
99
100 define Build/InstallDev
101         $(INSTALL_DIR) $(1)/usr/include
102         $(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(1)/usr/include/
103         $(INSTALL_DIR) $(1)/usr/lib
104         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(1)/usr/lib/
105         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
106         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(1)/usr/lib/pkgconfig/
107         $(SED) 's,-I/usr/include,-I$$$${includedir},g' $(1)/usr/lib/pkgconfig/howl.pc
108         $(SED) 's,-L/usr/lib/howl,-L$$$${libdir}/howl,g' $(1)/usr/lib/pkgconfig/howl.pc
109 endef
110
111 define Package/libhowl/install
112         $(INSTALL_DIR) $(1)/usr/lib
113         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(1)/usr/lib/
114 endef
115
116 define Package/howl-autoipd/install
117         $(INSTALL_DIR) $(1)/usr/sbin
118         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(1)/usr/sbin/
119         $(INSTALL_DIR) $(1)/etc/init.d
120         $(INSTALL_DATA) ./files/autoipd.init $(1)/etc/init.d/autoipd
121 endef
122
123 define Package/howl-mdnsresponder/install
124         $(INSTALL_DIR) $(1)/usr/sbin
125         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(1)/usr/sbin/
126         $(INSTALL_DIR) $(1)/etc
127         $(INSTALL_DATA) ./files/mDNSResponder.conf $(1)/etc/mDNSResponder.conf
128         $(INSTALL_DIR) $(1)/etc/init.d
129         $(INSTALL_BIN) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder
130 endef
131
132 define Package/howl-nifd/install
133         $(INSTALL_DIR) $(1)/usr/sbin
134         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nifd $(1)/usr/sbin/
135         $(INSTALL_DIR) $(1)/etc/init.d
136         $(INSTALL_DATA) ./files/nifd.init $(1)/etc/init.d/nifd
137 endef
138
139 define Package/howl-utils/install
140         $(INSTALL_DIR) $(1)/usr/bin
141         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(1)/usr/bin/
142 endef
143
144 $(eval $(call BuildPackage,libhowl))
145 $(eval $(call BuildPackage,howl-autoipd))
146 $(eval $(call BuildPackage,howl-mdnsresponder))
147 $(eval $(call BuildPackage,howl-nifd))
148 $(eval $(call BuildPackage,howl-utils))