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