packages: ipv6/tayga: move static mappings to 'firewall' config
[openwrt/svn-archive/archive.git] / libs / avahi / Makefile
1 #
2 # Copyright (C) 2007-2011 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 ifeq ($(BUILD_VARIANT),dbus)
11 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-dbus/$(PKG_NAME)-$(PKG_VERSION)
12 else
13 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-nodbus/$(PKG_NAME)-$(PKG_VERSION)
14 endif
15
16
17 PKG_NAME:=avahi
18 PKG_VERSION:=0.6.30
19 PKG_RELEASE:=3
20
21
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
23 PKG_SOURCE_URL:=http://avahi.org/download/
24 PKG_MD5SUM:=e4db89a2a403ff4c47d66ac66fad1f43
25
26 PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread dbus
27
28 PKG_FIXUP:=autoreconf
29 PKG_REMOVE_FILES:=autogen.sh
30
31 PKG_INSTALL:=1
32 PKG_BUILD_PARALLEL:=1
33
34
35
36 include $(INCLUDE_DIR)/package.mk
37
38 define Package/avahi/Default
39 SECTION:=net
40 CATEGORY:=Network
41 TITLE:=An mDNS/DNS-SD implementation
42 URL:=http://www.avahi.org/
43 endef
44
45 define Package/avahi/Default/description
46 Avahi is an mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf)
47 implementation (library). It facilitates
48 service discovery on a local network -- this means that
49 you can plug your laptop or computer into a network and
50 instantly be able to view other people who you can chat with,
51 find printers to print to or find files being shared.
52 This kind of technology is already found in MacOS X
53 (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
54 and is very convenient.
55 endef
56
57 define Package/libavahi
58 $(call Package/avahi/Default)
59 SECTION:=libs
60 CATEGORY:=Libraries
61 DEPENDS:=+libdaemon +libpthread +libgdbm
62 TITLE+= (library)
63 endef
64
65 define Package/libavahi/description
66 $(call Package/avahi/Default/description)
67 .
68 The libavahi package contains the mDNS/DNS-SD shared libraries,
69 used by other programs. Specifically, it provides
70 libavahi-core and libavahi-common libraries.
71 By default, it is compiled without D-Bus support,
72 i.e. the --disable-dbus compilation flag is set.
73 To enable D-Bus support, select the package
74 libavahi-dbus-support.
75 endef
76
77 define Package/avahi-autoipd
78 $(call Package/avahi/Default)
79 SUBMENU:=IP Addresses and Names
80 DEPENDS:=+libdaemon
81 TITLE:=IPv4LL network address configuration daemon
82 endef
83
84 define Package/avahi-autoipd/description
85 $(call Package/avahi/Default/description)
86 .
87 This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
88 Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
89 from the link-local 169.254.0.0/16 range without the need for a central
90 server. It is primarily intended to be used in ad-hoc networks which lack a
91 DHCP server.
92 endef
93
94 define Package/avahi-daemon
95 $(call Package/avahi/Default)
96 SUBMENU:=IP Addresses and Names
97 DEPENDS:=+libavahi +libexpat
98 TITLE+= (daemon)
99 endef
100
101 define Package/avahi-daemon/description
102 $(call Package/avahi/Default/description)
103 .
104 This package contains an mDNS/DNS-SD daemon.
105 endef
106
107 define Package/avahi-daemon/conffiles
108 /etc/avahi/avahi-daemon.conf
109 /etc/avahi/services/http.service
110 /etc/avahi/services/ssh.service
111 endef
112
113 define Package/avahi-dnsconfd
114 $(call Package/avahi/Default)
115 SUBMENU:=IP Addresses and Names
116 DEPENDS:=+libavahi
117 TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon
118 endef
119
120 define Package/avahi-dnsconfd/description
121 $(call Package/avahi/Default/description)
122 .
123 This package contains a Unicast DNS server from mDNS/DNS-SD configuration
124 daemon, which may be used to configure conventional DNS servers using mDNS
125 in a DHCP-like fashion. Especially useful on IPv6.
126 endef
127
128 define Package/libavahi-dbus-support
129 $(call Package/avahi/Default)
130 SECTION:=libs
131 CATEGORY:=Libraries
132 VARIANT:=dbus
133 DEPENDS:=+dbus +libavahi
134 TITLE+= (D-Bus support)
135 endef
136
137 define Package/libavahi-dbus-support/description
138 $(call Package/libavahi/description)
139 .
140 The libavahi-dbus-support package enables
141 D-Bus support in libavahi, needed to support
142 the libavahi-client library and avahi-utils.
143 Selecting this package modifies the contents of the
144 libavahi package by setting the --enable-dbus compilation flag;
145 it does not generate a separate binary of its own.
146 It also automatically adds the D-Bus package to the build.
147 libavahi-dbus-support is selected automatically if you select
148 libavahi-client or avahi-utils.
149 endef
150
151 define Package/libavahi-client
152 $(call Package/avahi/Default)
153 SECTION:=libs
154 CATEGORY:=Libraries
155 DEPENDS:=+libavahi-dbus-support +avahi-daemon
156 TITLE+= (libavahi-client library)
157 endef
158
159 define Package/libavahi-client/description
160 $(call Package/avahi/Default/description)
161 .
162 This packages adds the libavahi-client library.
163 It also automatically adds the required
164 libavahi-dbus-support and the avahi-daemon packages.
165 For more information please see the avahi documentation.
166 endef
167
168 define Package/avahi-utils
169 $(call Package/avahi/Default)
170 SUBMENU:=IP Addresses and Names
171 DEPENDS:=+libavahi-client
172 TITLE+= (utilities)
173 endef
174
175 define Package/avahi-utils/description
176 $(call Package/avahi/Default/description)
177 .
178 This packages installs the following avahi utility programs:
179 avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name.
180 It also automatically adds the required libavahi-client package.
181 For more information please see the avahi documentation.
182 endef
183
184 TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
185
186 CONFIGURE_ARGS+= \
187 --enable-shared \
188 --enable-static \
189 --disable-glib \
190 --disable-gobject \
191 --disable-qt3 \
192 --disable-qt4 \
193 --disable-gtk \
194 --disable-gtk3 \
195 --with-xml=expat \
196 --disable-dbm \
197 --enable-gdbm \
198 --enable-libdaemon \
199 --disable-python \
200 --disable-pygtk \
201 --disable-python-dbus \
202 --disable-mono \
203 --disable-monodoc \
204 --disable-doxygen-doc \
205 --disable-doxygen-dot \
206 --disable-doxygen-man \
207 --disable-doxygen-rtf \
208 --disable-doxygen-xml \
209 --disable-doxygen-chm \
210 --disable-doxygen-chi \
211 --disable-doxygen-html \
212 --disable-doxygen-ps \
213 --disable-doxygen-pdf \
214 --disable-xmltoman \
215 --with-distro=none \
216 --with-avahi-user=nobody \
217 --with-avahi-group=nogroup \
218 --with-autoipd-user=nobody \
219 --with-autoipd-group=nogroup
220
221 ifneq ($(CONFIG_SSP_SUPPORT),y)
222 CONFIGURE_ARGS+= \
223 --disable-stack-protector
224 endif
225
226 ifeq ($(BUILD_VARIANT),dbus)
227 CONFIGURE_ARGS += \
228 --enable-dbus
229 else
230 CONFIGURE_ARGS += \
231 --disable-dbus
232 endif
233
234 CONFIGURE_VARS+= \
235 CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
236
237 define Build/InstallDev
238 $(INSTALL_DIR) $(1)/usr/include
239 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
240 $(INSTALL_DIR) $(1)/usr/lib
241 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/
242 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
243 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
244 endef
245
246 define Package/libavahi-dbus-support/install
247 $(INSTALL_DIR) $(1)/usr/lib
248 endef
249
250 define Package/libavahi/install
251 $(INSTALL_DIR) $(1)/usr/lib
252 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
253 ifeq ($(BUILD_VARIANT),dbus)
254 $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
255 $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d
256 endif
257 endef
258
259 define Package/libavahi-client/install
260 $(INSTALL_DIR) $(1)/usr/lib
261 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/
262 endef
263
264 define Package/avahi-utils/install
265 $(INSTALL_DIR) $(1)/usr/bin
266 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
267 endef
268
269 define Package/avahi-autoipd/install
270 $(INSTALL_DIR) $(1)/etc/avahi
271 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
272 $(INSTALL_DIR) $(1)/usr/sbin
273 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
274 endef
275
276 define Package/avahi-daemon/install
277 $(INSTALL_DIR) $(1)/usr/sbin
278 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
279 $(INSTALL_DIR) $(1)/etc/avahi
280 $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
281 $(INSTALL_DIR) $(1)/etc/avahi/services
282 $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
283 $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
284 $(INSTALL_DIR) $(1)/etc/init.d
285 $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
286 endef
287
288 define Package/avahi-dnsconfd/install
289 $(INSTALL_DIR) $(1)/etc/avahi
290 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
291 $(INSTALL_DIR) $(1)/usr/sbin
292 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
293 endef
294
295 $(eval $(call BuildPackage,libavahi-client))
296 $(eval $(call BuildPackage,avahi-utils))
297 $(eval $(call BuildPackage,libavahi-dbus-support))
298 $(eval $(call BuildPackage,libavahi))
299 $(eval $(call BuildPackage,avahi-autoipd))
300 $(eval $(call BuildPackage,avahi-daemon))
301 $(eval $(call BuildPackage,avahi-dnsconfd))
302