Alexandre Belloni | 8dfd59d | 2013-06-05 23:53:30 +0000 | [diff] [blame] | 1 | ################################################################################ |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 2 | # |
Alexandre Belloni | f2c2f25 | 2013-06-05 23:53:29 +0000 | [diff] [blame] | 3 | # avahi |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 4 | # |
Alexandre Belloni | 8dfd59d | 2013-06-05 23:53:30 +0000 | [diff] [blame] | 5 | ################################################################################ |
Alexandre Belloni | 7027040 | 2013-06-05 23:53:25 +0000 | [diff] [blame] | 6 | |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 7 | # |
Ulf Samuelsson | a2e5113 | 2007-08-11 22:26:56 +0000 | [diff] [blame] | 8 | # This program is free software; you can redistribute it |
| 9 | # and/or modify it under the terms of the GNU Lesser General |
Bernhard Reutner-Fischer | 6c6cb06 | 2007-08-21 19:20:18 +0000 | [diff] [blame] | 10 | # Public License as published by the Free Software Foundation |
Ulf Samuelsson | a2e5113 | 2007-08-11 22:26:56 +0000 | [diff] [blame] | 11 | # either version 2.1 of the License, or (at your option) any |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 12 | # later version. |
| 13 | |
Peter Korsgaard | 68f6519 | 2012-02-15 08:41:05 +0100 | [diff] [blame] | 14 | AVAHI_VERSION = 0.6.31 |
Jerzy Grzegorek | c7f4b96 | 2014-07-31 10:46:58 +0200 | [diff] [blame] | 15 | AVAHI_SITE = http://www.avahi.org/download |
Danomi Manchego | 6ba785c | 2012-08-11 16:10:11 -0400 | [diff] [blame] | 16 | AVAHI_LICENSE = LGPLv2.1+ |
| 17 | AVAHI_LICENSE_FILES = LICENSE |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 18 | AVAHI_INSTALL_STAGING = YES |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 19 | |
Jerzy Grzegorek | 27dd329 | 2014-12-30 08:36:23 +0100 | [diff] [blame] | 20 | AVAHI_CONF_ENV = \ |
| 21 | ac_cv_func_strtod=yes \ |
| 22 | ac_fsusage_space=yes \ |
| 23 | fu_cv_sys_stat_statfs2_bsize=yes \ |
| 24 | ac_cv_func_closedir_void=no \ |
| 25 | ac_cv_func_getloadavg=no \ |
| 26 | ac_cv_lib_util_getloadavg=no \ |
| 27 | ac_cv_lib_getloadavg_getloadavg=no \ |
| 28 | ac_cv_func_getgroups=yes \ |
| 29 | ac_cv_func_getgroups_works=yes \ |
| 30 | ac_cv_func_chown_works=yes \ |
| 31 | ac_cv_have_decl_euidaccess=no \ |
| 32 | ac_cv_func_euidaccess=no \ |
| 33 | ac_cv_have_decl_strnlen=yes \ |
| 34 | ac_cv_func_strnlen_working=yes \ |
| 35 | ac_cv_func_lstat_dereferences_slashed_symlink=yes \ |
| 36 | ac_cv_func_lstat_empty_string_bug=no \ |
| 37 | ac_cv_func_stat_empty_string_bug=no \ |
| 38 | vb_cv_func_rename_trailing_slash_bug=no \ |
| 39 | ac_cv_have_decl_nanosleep=yes \ |
| 40 | jm_cv_func_nanosleep_works=yes \ |
| 41 | gl_cv_func_working_utimes=yes \ |
| 42 | ac_cv_func_utime_null=yes \ |
| 43 | ac_cv_have_decl_strerror_r=yes \ |
| 44 | ac_cv_func_strerror_r_char_p=no \ |
| 45 | jm_cv_func_svid_putenv=yes \ |
| 46 | ac_cv_func_getcwd_null=yes \ |
| 47 | ac_cv_func_getdelim=yes \ |
| 48 | ac_cv_func_mkstemp=yes \ |
| 49 | utils_cv_func_mkstemp_limitations=no \ |
| 50 | utils_cv_func_mkdir_trailing_slash_bug=no \ |
| 51 | jm_cv_func_gettimeofday_clobber=no \ |
| 52 | am_cv_func_working_getline=yes \ |
| 53 | gl_cv_func_working_readdir=yes \ |
| 54 | jm_ac_cv_func_link_follows_symlink=no \ |
| 55 | utils_cv_localtime_cache=no \ |
| 56 | ac_cv_struct_st_mtim_nsec=no \ |
| 57 | gl_cv_func_tzset_clobber=no \ |
| 58 | gl_cv_func_getcwd_null=yes \ |
| 59 | gl_cv_func_getcwd_path_max=yes \ |
| 60 | ac_cv_func_fnmatch_gnu=yes \ |
| 61 | am_getline_needs_run_time_check=no \ |
| 62 | am_cv_func_working_getline=yes \ |
| 63 | gl_cv_func_mkdir_trailing_slash_bug=no \ |
| 64 | gl_cv_func_mkstemp_limitations=no \ |
| 65 | ac_cv_func_working_mktime=yes \ |
| 66 | jm_cv_func_working_re_compile_pattern=yes \ |
| 67 | ac_use_included_regex=no \ |
| 68 | avahi_cv_sys_cxx_works=yes \ |
| 69 | DATADIRNAME=share |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 70 | |
Jörg Krause | ffa33dc | 2014-10-18 00:36:33 +0200 | [diff] [blame] | 71 | AVAHI_CONF_OPTS = \ |
Jerzy Grzegorek | dd7346f | 2014-12-22 09:12:05 +0100 | [diff] [blame] | 72 | --disable-qt3 \ |
| 73 | --disable-qt4 \ |
| 74 | --disable-gdbm \ |
| 75 | --disable-pygtk \ |
| 76 | --disable-mono \ |
| 77 | --disable-monodoc \ |
| 78 | --disable-stack-protector \ |
| 79 | --with-distro=none \ |
| 80 | --disable-manpages \ |
| 81 | $(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \ |
| 82 | --with-avahi-user=avahi \ |
| 83 | --with-avahi-group=avahi \ |
| 84 | --with-autoipd-user=avahi \ |
| 85 | --with-autoipd-group=avahi |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 86 | |
Jerzy Grzegorek | 27dd329 | 2014-12-30 08:36:23 +0100 | [diff] [blame] | 87 | AVAHI_DEPENDENCIES = \ |
| 88 | $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \ |
Jerzy Grzegorek | 1769933 | 2014-10-25 20:29:31 +0200 | [diff] [blame] | 89 | host-pkgconf host-gettext |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 90 | |
Mike Williams | 7c1db80 | 2015-04-21 13:50:34 -0400 | [diff] [blame^] | 91 | AVAHI_CFLAGS = $(TARGET_CFLAGS) |
| 92 | |
| 93 | ifeq ($(BR2_PACKAGE_SYSTEMD),) |
| 94 | AVAHI_CFLAGS += -DDISABLE_SYSTEMD |
| 95 | endif |
| 96 | |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 97 | ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),) |
| 98 | AVAHI_DEPENDENCIES += libdaemon |
| 99 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 100 | AVAHI_CONF_OPTS += --disable-libdaemon |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 101 | endif |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 102 | |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 103 | ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) |
| 104 | AVAHI_DEPENDENCIES += expat |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 105 | AVAHI_CONF_OPTS += --with-xml=expat |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 106 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 107 | AVAHI_CONF_OPTS += --with-xml=none |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 108 | endif |
| 109 | |
Peter Korsgaard | 1ab5a23 | 2014-09-22 23:04:59 +0200 | [diff] [blame] | 110 | ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 111 | AVAHI_CONF_OPTS += --enable-compat-libdns_sd |
Peter Korsgaard | 1ab5a23 | 2014-09-22 23:04:59 +0200 | [diff] [blame] | 112 | endif |
| 113 | |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 114 | ifeq ($(BR2_PACKAGE_DBUS),y) |
| 115 | AVAHI_DEPENDENCIES += dbus |
| 116 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 117 | AVAHI_CONF_OPTS += --disable-dbus |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 118 | endif |
| 119 | |
Peter Korsgaard | 4801198 | 2009-03-17 14:44:20 +0000 | [diff] [blame] | 120 | ifeq ($(BR2_PACKAGE_LIBGLIB2),y) |
| 121 | AVAHI_DEPENDENCIES += libglib2 |
| 122 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 123 | AVAHI_CONF_OPTS += --disable-glib --disable-gobject |
Peter Korsgaard | 4801198 | 2009-03-17 14:44:20 +0000 | [diff] [blame] | 124 | endif |
| 125 | |
Peter Korsgaard | 90ac14b | 2009-03-19 11:41:05 +0000 | [diff] [blame] | 126 | ifeq ($(BR2_PACKAGE_LIBGLADE),y) |
| 127 | AVAHI_DEPENDENCIES += libglade |
Peter Korsgaard | 4801198 | 2009-03-17 14:44:20 +0000 | [diff] [blame] | 128 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 129 | AVAHI_CONF_OPTS += --disable-gtk |
Peter Korsgaard | 4801198 | 2009-03-17 14:44:20 +0000 | [diff] [blame] | 130 | endif |
| 131 | |
Peter Korsgaard | 4ee770e | 2014-10-26 05:30:02 +0100 | [diff] [blame] | 132 | ifeq ($(BR2_PACKAGE_LIBGTK3),y) |
| 133 | AVAHI_DEPENDENCIES += libgtk3 |
| 134 | AVAHI_CONF_OPTS += --enable-gtk3 |
| 135 | else |
| 136 | AVAHI_CONF_OPTS += --disable-gtk3 |
| 137 | endif |
| 138 | |
Peter Korsgaard | 6c687a3 | 2009-03-13 15:38:03 +0000 | [diff] [blame] | 139 | ifeq ($(BR2_PACKAGE_PYTHON),y) |
Jerzy Grzegorek | 27dd329 | 2014-12-30 08:36:23 +0100 | [diff] [blame] | 140 | AVAHI_CONF_ENV += \ |
| 141 | am_cv_pathless_PYTHON=python \ |
| 142 | am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \ |
| 143 | am_cv_python_version=$(PYTHON_VERSION) \ |
| 144 | am_cv_python_platform=linux2 \ |
| 145 | am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ |
| 146 | am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ |
| 147 | py_cv_mod_socket_=yes |
Peter Korsgaard | 6c687a3 | 2009-03-13 15:38:03 +0000 | [diff] [blame] | 148 | |
Peter Korsgaard | 2c3e18c | 2011-01-26 11:18:50 +0100 | [diff] [blame] | 149 | AVAHI_DEPENDENCIES += python |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 150 | AVAHI_CONF_OPTS += --enable-python |
Peter Korsgaard | 6c687a3 | 2009-03-13 15:38:03 +0000 | [diff] [blame] | 151 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 152 | AVAHI_CONF_OPTS += --disable-python |
Peter Korsgaard | 6c687a3 | 2009-03-13 15:38:03 +0000 | [diff] [blame] | 153 | endif |
| 154 | |
Peter Korsgaard | 7e6e181 | 2014-12-02 17:15:01 +0100 | [diff] [blame] | 155 | ifeq ($(BR2_PACKAGE_DBUS_PYTHON),y) |
| 156 | AVAHI_CONF_OPTS += --enable-python-dbus |
Jerzy Grzegorek | 8314ddf | 2014-12-18 08:51:25 +0100 | [diff] [blame] | 157 | AVAHI_CONF_ENV += py_cv_mod_dbus_=yes |
Peter Korsgaard | 7e6e181 | 2014-12-02 17:15:01 +0100 | [diff] [blame] | 158 | AVAHI_DEPENDENCIES += dbus-python |
| 159 | else |
| 160 | AVAHI_CONF_OPTS += --disable-python-dbus |
| 161 | endif |
| 162 | |
Mike Williams | 7c1db80 | 2015-04-21 13:50:34 -0400 | [diff] [blame^] | 163 | AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)" |
| 164 | |
Thomas De Schampheleire | 0518a98 | 2014-09-27 21:32:38 +0200 | [diff] [blame] | 165 | AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 166 | |
Peter Korsgaard | d3ccfa3 | 2014-06-07 00:00:16 +0200 | [diff] [blame] | 167 | define AVAHI_USERS |
| 168 | avahi -1 avahi -1 * - - - |
| 169 | endef |
| 170 | |
Thomas Petazzoni | 2802509 | 2010-09-01 17:10:57 +0200 | [diff] [blame] | 171 | define AVAHI_REMOVE_INITSCRIPT |
Peter Korsgaard | 744c822 | 2009-03-05 21:38:40 +0000 | [diff] [blame] | 172 | rm -rf $(TARGET_DIR)/etc/init.d/avahi-* |
Thomas Petazzoni | 2802509 | 2010-09-01 17:10:57 +0200 | [diff] [blame] | 173 | endef |
| 174 | |
| 175 | AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT |
| 176 | |
Thomas Petazzoni | 3b4ec0c | 2014-10-19 13:10:58 +0200 | [diff] [blame] | 177 | ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y) |
Thomas Petazzoni | 2802509 | 2010-09-01 17:10:57 +0200 | [diff] [blame] | 178 | define AVAHI_INSTALL_AUTOIPD |
Peter Korsgaard | 7b83993 | 2009-01-28 15:12:05 +0000 | [diff] [blame] | 179 | rm -f $(TARGET_DIR)/var/lib/avahi-autoipd |
Nick Leverton | 7810eeb | 2010-05-21 21:03:39 +0200 | [diff] [blame] | 180 | $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib |
Peter Korsgaard | 1a7da64 | 2007-11-26 12:23:13 +0000 | [diff] [blame] | 181 | ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd |
Thomas Petazzoni | 2802509 | 2010-09-01 17:10:57 +0200 | [diff] [blame] | 182 | endef |
| 183 | |
Thomas Petazzoni | 3b4ec0c | 2014-10-19 13:10:58 +0200 | [diff] [blame] | 184 | define AVAHI_INSTALL_AUTOIPD_INIT_SYSV |
| 185 | $(INSTALL) -D -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/S05avahi-setup.sh |
| 186 | endef |
| 187 | |
Thomas Petazzoni | 2802509 | 2010-09-01 17:10:57 +0200 | [diff] [blame] | 188 | AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD |
Peter Korsgaard | fdeb9b1 | 2007-11-23 15:45:30 +0000 | [diff] [blame] | 189 | endif |
Thomas Petazzoni | 2802509 | 2010-09-01 17:10:57 +0200 | [diff] [blame] | 190 | |
Maxime Hadjinlian | ac6813f | 2014-05-03 17:35:45 +0200 | [diff] [blame] | 191 | ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) |
| 192 | |
| 193 | define AVAHI_INSTALL_INIT_SYSTEMD |
Thomas Petazzoni | d2fd9ef | 2014-10-19 13:00:32 +0200 | [diff] [blame] | 194 | mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants |
Maxime Hadjinlian | ac6813f | 2014-05-03 17:35:45 +0200 | [diff] [blame] | 195 | |
Mike Williams | 7c1db80 | 2015-04-21 13:50:34 -0400 | [diff] [blame^] | 196 | ln -fs ../../../../usr/lib/systemd/system/avahi-daemon.service \ |
Thomas Petazzoni | d2fd9ef | 2014-10-19 13:00:32 +0200 | [diff] [blame] | 197 | $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service |
Maxime Hadjinlian | ac6813f | 2014-05-03 17:35:45 +0200 | [diff] [blame] | 198 | |
Mike Williams | 7c1db80 | 2015-04-21 13:50:34 -0400 | [diff] [blame^] | 199 | ln -fs ../../../../usr/lib/systemd/system/avahi-dnsconfd.service \ |
Thomas Petazzoni | d2fd9ef | 2014-10-19 13:00:32 +0200 | [diff] [blame] | 200 | $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service |
André Erdmann | 9b41c82 | 2014-10-17 21:10:42 +0200 | [diff] [blame] | 201 | |
Thomas Petazzoni | d2fd9ef | 2014-10-19 13:00:32 +0200 | [diff] [blame] | 202 | $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \ |
| 203 | $(TARGET_DIR)/usr/lib/tmpfiles.d/avahi.conf |
Maxime Hadjinlian | ac6813f | 2014-05-03 17:35:45 +0200 | [diff] [blame] | 204 | endef |
| 205 | |
Thomas Petazzoni | 3b4ec0c | 2014-10-19 13:10:58 +0200 | [diff] [blame] | 206 | define AVAHI_INSTALL_DAEMON_INIT_SYSV |
| 207 | $(INSTALL) -D -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/S50avahi-daemon |
Thomas Petazzoni | 2802509 | 2010-09-01 17:10:57 +0200 | [diff] [blame] | 208 | endef |
| 209 | |
Eric Andersen | 21e97d3 | 2006-12-12 22:26:51 +0000 | [diff] [blame] | 210 | endif |
Thomas Petazzoni | 2802509 | 2010-09-01 17:10:57 +0200 | [diff] [blame] | 211 | |
Thomas Petazzoni | 3b4ec0c | 2014-10-19 13:10:58 +0200 | [diff] [blame] | 212 | define AVAHI_INSTALL_INIT_SYSV |
| 213 | $(AVAHI_INSTALL_AUTOIPD_INIT_SYSV) |
| 214 | $(AVAHI_INSTALL_DAEMON_INIT_SYSV) |
| 215 | endef |
| 216 | |
Peter Korsgaard | 1ab5a23 | 2014-09-22 23:04:59 +0200 | [diff] [blame] | 217 | # applications expects to be able to #include <dns_sd.h> |
| 218 | define AVAHI_STAGING_INSTALL_LIBDNSSD_LINK |
| 219 | ln -sf avahi-compat-libdns_sd/dns_sd.h \ |
| 220 | $(STAGING_DIR)/usr/include/dns_sd.h |
| 221 | endef |
| 222 | |
| 223 | ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) |
| 224 | AVAHI_POST_INSTALL_STAGING_HOOKS += AVAHI_STAGING_INSTALL_LIBDNSSD_LINK |
| 225 | endif |
| 226 | |
Arnout Vandecappelle (Essensium/Mind) | e1502eb | 2012-07-03 00:07:32 +0200 | [diff] [blame] | 227 | $(eval $(autotools-package)) |