Changeset 29359


Ignore:
Timestamp:
2011-11-30T13:44:08+01:00 (6 years ago)
Author:
blogic
Message:

avahi: cleanup / enhance

This patch updates the avahi Makefile to correct a number of errors. In
particular it handles the choice of D-BUS- or non-D-BUS-enabled packages
more consistently.

Packages that don't require D-BUS support are compiled with D-BUS
support disabled by default, keeping the build as small as possible.
Support for D-BUS can be selected if desired.

Selecting packages that require D-BUS support -- avahi-utils or
libavahi-client -- will automatically cause all packages to be built
with D-BUS support and will add the D-BUS package to the build.

Note that after this update, the D-BUS package will be needed as part of
the compilation environment, so it will be downloaded and compiled, but
it will not be added to the build unless the user has enabled D-BUS
support or has selected avahi-utils or the avahi-client library, both of
which need it.

Tested on trunk r29283.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/libs/avahi/Makefile

    r28960 r29359  
    88include $(TOPDIR)/rules.mk 
    99 
     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 
    1017PKG_NAME:=avahi 
    1118PKG_VERSION:=0.6.30 
    12 PKG_RELEASE:=2 
     19PKG_RELEASE:=3 
     20 
    1321 
    1422PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     
    1624PKG_MD5SUM:=e4db89a2a403ff4c47d66ac66fad1f43 
    1725 
    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 
     26PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread dbus 
    2127 
    2228PKG_FIXUP:=autoreconf 
     
    2531PKG_INSTALL:=1 
    2632PKG_BUILD_PARALLEL:=1 
     33 
     34 
    2735 
    2836include $(INCLUDE_DIR)/package.mk 
     
    3139  SECTION:=net 
    3240  CATEGORY:=Network 
    33   TITLE:=mDNS/DNS-SD  
     41  TITLE:=An mDNS/DNS-SD implementation 
    3442  URL:=http://www.avahi.org/ 
    3543endef 
    3644 
    3745define 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') 
     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') 
    4454 and is very convenient. 
    4555endef 
     
    5161  DEPENDS:=+libdaemon +libpthread +libgdbm 
    5262  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 
    61   TITLE+= (library) (dbus) 
    62   VARIANT:=dbus 
    6363endef 
    6464 
     
    6666$(call Package/avahi/Default/description) 
    6767 . 
    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 
     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. 
    8075endef 
    8176 
     
    8479  SUBMENU:=IP Addresses and Names 
    8580  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 
     81  TITLE:=IPv4LL network address configuration daemon 
    9682endef 
    9783 
     
    10490 server. It is primarily intended to be used in ad-hoc networks which lack a 
    10591 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. 
    12092endef 
    12193 
     
    12597  DEPENDS:=+libavahi +libexpat 
    12698  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 
    13699endef 
    137100 
     
    140103 . 
    141104 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. 
    148105endef 
    149106 
     
    154111endef 
    155112 
    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  
    162113define Package/avahi-dnsconfd 
    163114  $(call Package/avahi/Default) 
     
    165116  DEPENDS:=+libavahi 
    166117  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 
    176118endef 
    177119 
     
    182124 daemon, which may be used to configure conventional DNS servers using mDNS 
    183125 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 
     126endef 
     127 
     128define Package/libavahi-dbus-support 
    199129  $(call Package/avahi/Default) 
    200130  SECTION:=libs 
    201131  CATEGORY:=Libraries 
    202   DEPENDS:=+libavahi-dbus 
     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 
    203156  TITLE+= (libavahi-client library) 
    204   VARIANT:=dbus 
    205157endef 
    206158 
     
    209161 . 
    210162 This packages adds the libavahi-client library. 
     163 It also automatically adds the required 
     164 libavahi-dbus-support and the avahi-daemon packages. 
    211165 For more information please see the avahi documentation. 
    212  . 
    213  Requires D-Bus support. 
    214166endef 
    215167 
     
    219171  DEPENDS:=+libavahi-client 
    220172  TITLE+= (utilities) 
    221   VARIANT:=dbus 
    222173endef 
    223174 
     
    227178 This packages installs the following avahi utility programs: 
    228179 avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name. 
     180 It also automatically adds the required libavahi-client package. 
    229181 For more information please see the avahi documentation. 
    230  . 
    231  Requires D-Bus support. 
    232182endef 
    233183 
     
    277227CONFIGURE_ARGS += \ 
    278228        --enable-dbus 
    279 endif 
    280 ifeq ($(BUILD_VARIANT),nodbus) 
     229else 
    281230CONFIGURE_ARGS += \ 
    282231        --disable-dbus   
     
    295244endef 
    296245 
    297 define Package/libavahi-dbus/install 
     246define Package/libavahi-dbus-support/install 
    298247        $(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 
    302248endef 
    303249 
     
    305251        $(INSTALL_DIR) $(1)/usr/lib 
    306252        $(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 
    307257endef 
    308258 
     
    336286endef 
    337287 
    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  
    350288define Package/avahi-dnsconfd/install 
    351289        $(INSTALL_DIR) $(1)/etc/avahi 
     
    355293endef 
    356294 
    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  
    364295$(eval $(call BuildPackage,libavahi-client)) 
    365296$(eval $(call BuildPackage,avahi-utils)) 
    366 $(eval $(call BuildPackage,libavahi-dbus)) 
     297$(eval $(call BuildPackage,libavahi-dbus-support)) 
    367298$(eval $(call BuildPackage,libavahi)) 
    368299$(eval $(call BuildPackage,avahi-autoipd)) 
    369 $(eval $(call BuildPackage,avahi-autoipd-dbus)) 
    370300$(eval $(call BuildPackage,avahi-daemon)) 
    371 $(eval $(call BuildPackage,avahi-daemon-dbus)) 
    372301$(eval $(call BuildPackage,avahi-dnsconfd)) 
    373 $(eval $(call BuildPackage,avahi-dnsconfd-dbus)) 
    374  
     302 
Note: See TracChangeset for help on using the changeset viewer.