Browse Source

Import avahi from oldpackages

Ted Hess 10 years ago
parent
commit
fa8703665b

+ 312
- 0
libs/avahi/Makefile View File

@@ -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))

+ 28
- 0
libs/avahi/files/avahi-daemon.conf View File

@@ -0,0 +1,28 @@
1
+[server]
2
+#host-name=foo
3
+#domain-name=local
4
+use-ipv4=yes
5
+use-ipv6=no
6
+check-response-ttl=no
7
+use-iff-running=no
8
+
9
+[publish]
10
+publish-addresses=yes
11
+publish-hinfo=yes
12
+publish-workstation=no
13
+publish-domain=yes
14
+#publish-dns-servers=192.168.1.1
15
+#publish-resolv-conf-dns-servers=yes
16
+
17
+[reflector]
18
+enable-reflector=no
19
+reflect-ipv=no
20
+
21
+[rlimits]
22
+#rlimit-as=
23
+rlimit-core=0
24
+rlimit-data=4194304
25
+rlimit-fsize=0
26
+rlimit-nofile=30
27
+rlimit-stack=4194304
28
+rlimit-nproc=3

+ 23
- 0
libs/avahi/files/avahi-daemon.init View File

@@ -0,0 +1,23 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2006 OpenWrt.org
3
+START=61
4
+
5
+BIN=avahi-daemon
6
+DEFAULT=/etc/default/$BIN
7
+OPTIONS="-D"
8
+RUN_D=/var/run/$BIN
9
+
10
+start() {
11
+	[ -f $DEFAULT ] && . $DEFAULT
12
+	mkdir -p $RUN_D
13
+	$BIN $OPTIONS
14
+}
15
+
16
+stop() {
17
+  $BIN -k
18
+}
19
+
20
+reload() {
21
+  $BIN -r
22
+}
23
+

+ 10
- 0
libs/avahi/files/service-http View File

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3
+<service-group>
4
+ <name replace-wildcards="yes">Web Server on %h</name>
5
+  <service>
6
+   <type>_http._tcp</type>
7
+   <port>80</port>
8
+   <txt-record>path=/</txt-record>
9
+  </service>
10
+</service-group>

+ 9
- 0
libs/avahi/files/service-ssh View File

@@ -0,0 +1,9 @@
1
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3
+<service-group>
4
+ <name replace-wildcards="yes">Secure Shell on %h</name>
5
+  <service>
6
+   <type>_ssh._tcp</type>
7
+   <port>22</port>
8
+  </service>
9
+</service-group>

+ 80
- 0
libs/avahi/patches/010-step_back_autotools-no-gettext.patch View File

@@ -0,0 +1,80 @@
1
+--- a/Makefile.am
2
++++ b/Makefile.am
3
+@@ -75,8 +75,7 @@ SUBDIRS = \
4
+ 	avahi-compat-howl \
5
+ 	avahi-autoipd \
6
+ 	avahi-ui \
7
+-	avahi-ui-sharp \
8
+-	po
9
++	avahi-ui-sharp
10
+ 
11
+ DX_INPUT = \
12
+ 	$(srcdir)/avahi-common/address.h \
13
+--- a/avahi-python/avahi-discover/Makefile.am
14
++++ b/avahi-python/avahi-discover/Makefile.am
15
+@@ -38,7 +38,6 @@ if HAVE_GDBM
16
+ pythonscripts += \
17
+ 	avahi-discover
18
+ desktop_DATA += avahi-discover.desktop
19
+-@INTLTOOL_DESKTOP_RULE@
20
+ avahi_discover_PYTHON += __init__.py
21
+ endif
22
+ 
23
+@@ -46,7 +45,6 @@ if HAVE_DBM
24
+ pythonscripts += \
25
+ 	avahi-discover
26
+ desktop_DATA += avahi-discover.desktop
27
+-@INTLTOOL_DESKTOP_RULE@
28
+ avahi_discover_PYTHON += __init__.py
29
+ endif
30
+ 
31
+--- a/avahi-ui/Makefile.am
32
++++ b/avahi-ui/Makefile.am
33
+@@ -78,7 +78,6 @@ endif
34
+ 
35
+ bin_PROGRAMS = bssh
36
+ desktop_DATA += bssh.desktop bvnc.desktop
37
+-@INTLTOOL_DESKTOP_RULE@
38
+ 
39
+ bssh_SOURCES = bssh.c
40
+ 
41
+@@ -106,6 +105,4 @@ endif # HAVE_GLIB
42
+ endif
43
+ endif
44
+ 
45
+-@INTLTOOL_DESKTOP_RULE@
46
+-
47
+ CLEANFILES = $(desktop_DATA) $(desktop_DATA_in)
48
+--- a/configure.ac
49
++++ b/configure.ac
50
+@@ -23,7 +23,7 @@ AC_INIT([avahi],[0.6.29],[avahi (at) lis
51
+ AC_CONFIG_SRCDIR([avahi-core/server.c])
52
+ AC_CONFIG_MACRO_DIR([common])
53
+ AC_CONFIG_HEADERS([config.h])
54
+-AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax])
55
++AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability tar-pax])
56
+ 
57
+ AC_SUBST(PACKAGE_URL, [http://avahi.org/])
58
+ 
59
+@@ -43,8 +43,6 @@ AC_SUBST(HOWL_COMPAT_VERSION, [0.9.8])
60
+ 
61
+ AC_CANONICAL_HOST
62
+ 
63
+-AM_SILENT_RULES([yes])
64
+-
65
+ AC_CHECK_PROG([STOW], [stow], [yes], [no])
66
+ 
67
+ AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [
68
+@@ -412,12 +410,6 @@ if test "x$have_kqueue" = "xyes" ; then
69
+     AC_DEFINE([HAVE_KQUEUE], 1, [Enable BSD kqueue() usage])
70
+ fi
71
+ 
72
+-IT_PROG_INTLTOOL([0.35.0])
73
+-GETTEXT_PACKAGE=avahi
74
+-AC_SUBST([GETTEXT_PACKAGE])
75
+-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
76
+-AM_GLIB_GNU_GETTEXT
77
+-
78
+ avahilocaledir='${prefix}/${DATADIRNAME}/locale'
79
+ AC_SUBST(avahilocaledir)
80
+