Changeset 26338


Ignore:
Timestamp:
2011-03-28T23:22:25+02:00 (6 years ago)
Author:
florian
Message:

[package] update avahi to included D-Bus support, libavahi-client library and avahi-utils tools (#8929)

This updates the avahi package as follows:

  1. The libavahi-client library can be selected.
  1. The following avahi utilities can be selected: avahi-browse, aka: avahi-browse-domains avahi-publish, aka: avahi-publish-address, avahi-publish-service avahi-resolve, aka: avahi-resolve-address, avahi-resolve-host-name avahi-set-host-name.

Notes:
(a) This patch applies to avahi 0.6.29 -- I sent in the previous version
for 0.6.28 just after 0.6.29 came out, duh. :(

(b) The libavahi-client library and the avahi utilities require avahi to
be compiled with D-Bus support, and D-Bus must be included in
the build. If they are not selected, avahi is compiled without D-Bus
support, as it is at present.

(c) The init.d start priority of avahi-daemon is changed from 50 to 61
so that it loads after D-Bus.

The patch in Ticket #8929 has two problems, IMHO:

  1. It makes the D-Bus package a compulsory requirement for avahi, even

though it's only really needed if you select the libavahi-client library.
(This patch makes D-Bus compulsory only if you select the
libavahi-client library or the avahi utilities which depend on them.)

  1. The avahi-daemon will fail to start because the D-Bus daemon is set

to start up _after_ avahi-daemon starts looking for it.
(This patch adjusts the init.d start priority of the avahi-daemon to
later than that of D-Bus.)

Signed-off-by: Mike Brady <mikebrady@…>

Location:
packages/libs/avahi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/libs/avahi/Makefile

    r26068 r26338  
    11# 
    2 # Copyright (C) 2007-2009 OpenWrt.org 
     2# Copyright (C) 2007-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=avahi 
    1111PKG_VERSION:=0.6.29 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     
    1616PKG_MD5SUM:=bb9d326770689610d1dbaceab5a787fc 
    1717 
    18 PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host 
     18PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread dbus 
    1919 
    2020PKG_FIXUP:=autoreconf 
     
    5555 . 
    5656 This package contains the mDNS/DNS-SD shared libraries, used by other programs. 
     57 Specifically, it provides libavahi-core and libavahi-common libraries. 
     58 By default, it is compiled without D-Bus support, i.e. the --disable-dbus compilation flag is set. 
     59 To enable D-Bus support, add the package libavahi-dbus-support. 
    5760endef 
    5861 
     
    97100  SUBMENU:=IP Addresses and Names 
    98101  DEPENDS:=+libavahi 
    99   TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon 
     102  TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon 
    100103endef 
    101104 
     
    106109 daemon, which may be used to configure conventional DNS servers using mDNS 
    107110 in a DHCP-like fashion. Especially useful on IPv6. 
     111endef 
     112 
     113define Package/libavahi-dbus-support 
     114  $(call Package/avahi/Default) 
     115  SECTION:=libs 
     116  CATEGORY:=Libraries 
     117  VARIANT:=dbus 
     118  DEPENDS:=+dbus +libavahi 
     119  TITLE+= (D-Bus support for advanced features) 
     120endef 
     121 
     122define Package/libavahi-dbus-support/description 
     123$(call Package/libavahi/description) 
     124 . 
     125 This package enables D-Bus support in libavahi. This is needed for libavahi to 
     126 provide advanced features -- support for avahi-browse, avahi-publish 
     127 and the libavahi-client library. 
     128 It requires the D-Bus package to be included in the build. 
     129 Selecting this modifies the contents of the libavahi package by setting 
     130 the --enable-dbuscompilation flag; it does not generate a separate package of its own. 
     131endef 
     132 
     133define Package/libavahi-client 
     134  $(call Package/avahi/Default) 
     135  SECTION:=libs 
     136  CATEGORY:=Libraries 
     137  DEPENDS:=+libavahi-dbus-support 
     138  TITLE+= (libavahi-client library) 
     139endef 
     140 
     141define Package/libavahi-client/description 
     142$(call Package/avahi/Default/description) 
     143 . 
     144 This packages adds the libavahi-client library. 
     145 For more information please see the avahi documentation. 
     146endef 
     147 
     148define Package/avahi-utils 
     149  $(call Package/avahi/Default) 
     150  SUBMENU:=IP Addresses and Names 
     151  DEPENDS:=+libavahi-client 
     152  TITLE+= (utilities) 
     153endef 
     154 
     155define Package/avahi-utils/description 
     156$(call Package/avahi/Default/description) 
     157 . 
     158 This packages installs the following avahi utility programs: 
     159 avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name. 
     160 For more information please see the avahi documentation. 
    108161endef 
    109162 
     
    119172        --disable-gtk \ 
    120173        --disable-gtk3 \ 
    121         --disable-dbus \ 
    122174        --with-xml=expat \ 
    123175        --disable-dbm \ 
     
    151203endif 
    152204 
     205ifeq ($(BUILD_VARIANT),dbus) 
     206CONFIGURE_ARGS += \ 
     207        --enable-dbus 
     208else 
     209CONFIGURE_ARGS += \ 
     210        --disable-dbus   
     211endif 
     212 
    153213CONFIGURE_VARS+= \ 
    154214        CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \ 
     
    156216define Build/InstallDev 
    157217        $(INSTALL_DIR) $(1)/usr/include 
    158         $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/ 
    159         $(INSTALL_DIR) $(1)/usr/lib 
    160         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(1)/usr/lib/ 
     218        $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ 
     219        $(INSTALL_DIR) $(1)/usr/lib 
     220        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/ 
    161221        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 
    162         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(1)/usr/lib/pkgconfig/ 
     222        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ 
     223endef 
     224 
     225define Package/libavahi-dbus-support/install 
     226        $(INSTALL_DIR) $(1)/usr/lib 
    163227endef 
    164228 
     
    166230        $(INSTALL_DIR) $(1)/usr/lib 
    167231        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/ 
     232ifeq ($(BUILD_VARIANT),dbus) 
     233        $(INSTALL_DIR) $(1)/etc/dbus-1/system.d 
     234        $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d 
     235endif 
     236endef 
     237 
     238define Package/libavahi-client/install 
     239        $(INSTALL_DIR) $(1)/usr/lib 
     240        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/ 
     241endef 
     242 
     243define Package/avahi-utils/install 
     244        $(INSTALL_DIR) $(1)/usr/bin 
     245        $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ 
    168246endef 
    169247 
     
    194272endef 
    195273 
     274$(eval $(call BuildPackage,libavahi-client)) 
     275$(eval $(call BuildPackage,avahi-utils)) 
     276$(eval $(call BuildPackage,libavahi-dbus-support)) 
    196277$(eval $(call BuildPackage,libavahi)) 
    197278$(eval $(call BuildPackage,avahi-autoipd)) 
    198279$(eval $(call BuildPackage,avahi-daemon)) 
    199280$(eval $(call BuildPackage,avahi-dnsconfd)) 
     281 
  • packages/libs/avahi/files/avahi-daemon.init

    r15247 r26338  
    11#!/bin/sh /etc/rc.common 
    22# Copyright (C) 2006 OpenWrt.org 
    3 START=50 
     3START=61 
    44 
    55BIN=avahi-daemon 
Note: See TracChangeset for help on using the changeset viewer.