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