avahi.mk 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. ################################################################################
  2. #
  3. # avahi
  4. #
  5. ################################################################################
  6. #
  7. # This program is free software; you can redistribute it
  8. # and/or modify it under the terms of the GNU Lesser General
  9. # Public License as published by the Free Software Foundation
  10. # either version 2.1 of the License, or (at your option) any
  11. # later version.
  12. AVAHI_VERSION = 0.6.31
  13. AVAHI_SITE = http://www.avahi.org/download
  14. AVAHI_LICENSE = LGPLv2.1+
  15. AVAHI_LICENSE_FILES = LICENSE
  16. AVAHI_INSTALL_STAGING = YES
  17. AVAHI_CONF_ENV = ac_cv_func_strtod=yes \
  18. ac_fsusage_space=yes \
  19. fu_cv_sys_stat_statfs2_bsize=yes \
  20. ac_cv_func_closedir_void=no \
  21. ac_cv_func_getloadavg=no \
  22. ac_cv_lib_util_getloadavg=no \
  23. ac_cv_lib_getloadavg_getloadavg=no \
  24. ac_cv_func_getgroups=yes \
  25. ac_cv_func_getgroups_works=yes \
  26. ac_cv_func_chown_works=yes \
  27. ac_cv_have_decl_euidaccess=no \
  28. ac_cv_func_euidaccess=no \
  29. ac_cv_have_decl_strnlen=yes \
  30. ac_cv_func_strnlen_working=yes \
  31. ac_cv_func_lstat_dereferences_slashed_symlink=yes \
  32. ac_cv_func_lstat_empty_string_bug=no \
  33. ac_cv_func_stat_empty_string_bug=no \
  34. vb_cv_func_rename_trailing_slash_bug=no \
  35. ac_cv_have_decl_nanosleep=yes \
  36. jm_cv_func_nanosleep_works=yes \
  37. gl_cv_func_working_utimes=yes \
  38. ac_cv_func_utime_null=yes \
  39. ac_cv_have_decl_strerror_r=yes \
  40. ac_cv_func_strerror_r_char_p=no \
  41. jm_cv_func_svid_putenv=yes \
  42. ac_cv_func_getcwd_null=yes \
  43. ac_cv_func_getdelim=yes \
  44. ac_cv_func_mkstemp=yes \
  45. utils_cv_func_mkstemp_limitations=no \
  46. utils_cv_func_mkdir_trailing_slash_bug=no \
  47. jm_cv_func_gettimeofday_clobber=no \
  48. am_cv_func_working_getline=yes \
  49. gl_cv_func_working_readdir=yes \
  50. jm_ac_cv_func_link_follows_symlink=no \
  51. utils_cv_localtime_cache=no \
  52. ac_cv_struct_st_mtim_nsec=no \
  53. gl_cv_func_tzset_clobber=no \
  54. gl_cv_func_getcwd_null=yes \
  55. gl_cv_func_getcwd_path_max=yes \
  56. ac_cv_func_fnmatch_gnu=yes \
  57. am_getline_needs_run_time_check=no \
  58. am_cv_func_working_getline=yes \
  59. gl_cv_func_mkdir_trailing_slash_bug=no \
  60. gl_cv_func_mkstemp_limitations=no \
  61. ac_cv_func_working_mktime=yes \
  62. jm_cv_func_working_re_compile_pattern=yes \
  63. ac_use_included_regex=no \
  64. avahi_cv_sys_cxx_works=yes \
  65. DATADIRNAME=share
  66. AVAHI_CONF_OPT = --localstatedir=/var \
  67. --disable-qt3 \
  68. --disable-qt4 \
  69. --disable-gdbm \
  70. --disable-python-dbus \
  71. --disable-pygtk \
  72. --disable-gtk3 \
  73. --disable-mono \
  74. --disable-monodoc \
  75. --disable-stack-protector \
  76. --with-distro=none \
  77. --disable-manpages \
  78. $(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \
  79. --with-avahi-user=avahi \
  80. --with-avahi-group=avahi \
  81. --with-autoipd-user=avahi \
  82. --with-autoipd-group=avahi
  83. AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \
  84. host-pkgconf host-gettext
  85. ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
  86. AVAHI_DEPENDENCIES += libdaemon
  87. else
  88. AVAHI_CONF_OPT += --disable-libdaemon
  89. endif
  90. ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
  91. AVAHI_DEPENDENCIES += expat
  92. AVAHI_CONF_OPT += --with-xml=expat
  93. else
  94. AVAHI_CONF_OPT += --with-xml=none
  95. endif
  96. ifeq ($(BR2_PACKAGE_DBUS),y)
  97. AVAHI_DEPENDENCIES += dbus
  98. else
  99. AVAHI_CONF_OPT += --disable-dbus
  100. endif
  101. ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
  102. AVAHI_DEPENDENCIES += libglib2
  103. else
  104. AVAHI_CONF_OPT += --disable-glib --disable-gobject
  105. endif
  106. ifeq ($(BR2_PACKAGE_LIBGLADE),y)
  107. AVAHI_DEPENDENCIES += libglade
  108. else
  109. AVAHI_CONF_OPT += --disable-gtk
  110. endif
  111. ifeq ($(BR2_PACKAGE_PYTHON),y)
  112. AVAHI_CONF_ENV += am_cv_pathless_PYTHON=python \
  113. am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \
  114. am_cv_python_version=$(PYTHON_VERSION) \
  115. am_cv_python_platform=linux2 \
  116. am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
  117. am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
  118. py_cv_mod_socket_=yes
  119. AVAHI_DEPENDENCIES += python
  120. AVAHI_CONF_OPT += --enable-python
  121. else
  122. AVAHI_CONF_OPT += --disable-python
  123. endif
  124. AVAHI_MAKE_OPT += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
  125. define AVAHI_USERS
  126. avahi -1 avahi -1 * - - -
  127. endef
  128. define AVAHI_REMOVE_INITSCRIPT
  129. rm -rf $(TARGET_DIR)/etc/init.d/avahi-*
  130. endef
  131. AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT
  132. define AVAHI_INSTALL_AUTOIPD
  133. $(INSTALL) -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/
  134. rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
  135. $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib
  136. ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd
  137. endef
  138. ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y)
  139. AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD
  140. endif
  141. ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
  142. define AVAHI_INSTALL_INIT_SYSTEMD
  143. $(INSTALL) -D -m 644 package/avahi/avahi-daemon.service \
  144. $(TARGET_DIR)/etc/systemd/system/avahi-daemon.service
  145. mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
  146. ln -fs ../avahi-daemon.service \
  147. $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
  148. mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d
  149. $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
  150. $(TARGET_DIR)/usr/lib/tmpfiles.d/avahi.conf
  151. endef
  152. define AVAHI_INSTALL_INIT_SYSV
  153. $(INSTALL) -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/
  154. endef
  155. endif
  156. $(eval $(autotools-package))