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