source: packages/libs/avahi/Makefile @ 31181

Last change on this file since 31181 was 31181, checked in by jow, 4 years ago

[packages] avahi: fix autoreconf with automake v1.11.3

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 8.4 KB
Line 
1#
2# Copyright (C) 2007-2012 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10ifeq ($(BUILD_VARIANT),dbus)
11PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-dbus/$(PKG_NAME)-$(PKG_VERSION)
12else
13PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-nodbus/$(PKG_NAME)-$(PKG_VERSION)
14endif
15
16
17PKG_NAME:=avahi
18PKG_VERSION:=0.6.30
19PKG_RELEASE:=4
20
21
22PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
23PKG_SOURCE_URL:=http://avahi.org/download/
24PKG_MD5SUM:=e4db89a2a403ff4c47d66ac66fad1f43
25
26PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread dbus
27
28PKG_FIXUP:=autoreconf
29PKG_REMOVE_FILES:=autogen.sh
30
31PKG_INSTALL:=1
32PKG_BUILD_PARALLEL:=1
33
34
35
36include $(INCLUDE_DIR)/package.mk
37
38define Package/avahi/Default
39  SECTION:=net
40  CATEGORY:=Network
41  TITLE:=An mDNS/DNS-SD implementation
42  URL:=http://www.avahi.org/
43endef
44
45define 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.
55endef
56
57define Package/libavahi
58  $(call Package/avahi/Default)
59  SECTION:=libs
60  CATEGORY:=Libraries
61  DEPENDS:=+libdaemon +libpthread +libgdbm
62  TITLE+= (library)
63endef
64
65define 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.
75endef
76
77define Package/avahi-autoipd
78  $(call Package/avahi/Default)
79  SUBMENU:=IP Addresses and Names
80  DEPENDS:=+libdaemon
81  TITLE:=IPv4LL network address configuration daemon
82endef
83
84define 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.
92endef
93
94define Package/avahi-daemon
95  $(call Package/avahi/Default)
96  SUBMENU:=IP Addresses and Names
97  DEPENDS:=+libavahi +libexpat
98  TITLE+= (daemon)
99endef
100
101define Package/avahi-daemon/description
102$(call Package/avahi/Default/description)
103 .
104 This package contains an mDNS/DNS-SD daemon.
105endef
106
107define Package/avahi-daemon/conffiles
108/etc/avahi/avahi-daemon.conf
109/etc/avahi/services/http.service
110/etc/avahi/services/ssh.service
111endef
112
113define 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
118endef
119
120define 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.
126endef
127
128define 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)
135endef
136
137define 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.
149endef
150
151define 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)
157endef
158
159define 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.
166endef
167
168define Package/avahi-utils
169  $(call Package/avahi/Default)
170  SUBMENU:=IP Addresses and Names
171  DEPENDS:=+libavahi-client
172  TITLE+= (utilities)
173endef
174
175define 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.
182endef
183
184TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
185
186CONFIGURE_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
221ifneq ($(CONFIG_SSP_SUPPORT),y)
222CONFIGURE_ARGS+= \
223        --disable-stack-protector
224endif
225
226ifeq ($(BUILD_VARIANT),dbus)
227CONFIGURE_ARGS += \
228        --enable-dbus
229else
230CONFIGURE_ARGS += \
231        --disable-dbus 
232endif
233
234CONFIGURE_VARS+= \
235        CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
236
237define 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/
244endef
245
246define Package/libavahi-dbus-support/install
247        $(INSTALL_DIR) $(1)/usr/lib
248endef
249
250define Package/libavahi/install
251        $(INSTALL_DIR) $(1)/usr/lib
252        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
253ifeq ($(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
256endif
257endef
258
259define Package/libavahi-client/install
260        $(INSTALL_DIR) $(1)/usr/lib
261        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/
262endef
263
264define Package/avahi-utils/install
265        $(INSTALL_DIR) $(1)/usr/bin
266        $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
267endef
268
269define 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/
274endef
275
276define 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
286endef
287
288define 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/
293endef
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
Note: See TracBrowser for help on using the repository browser.