You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

313 lines
9.1 KiB

  1. #
  2. # Copyright (C) 2007-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. ifeq ($(BUILD_VARIANT),dbus)
  9. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION)
  10. PKG_ALT_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION)
  11. else
  12. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_ALT_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION)
  14. endif
  15. PKG_NAME:=avahi
  16. PKG_VERSION:=0.6.31
  17. PKG_RELEASE:=6
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  19. PKG_SOURCE_URL:=http://avahi.org/download/
  20. PKG_MD5SUM:=2f22745b8f7368ad5a0a3fddac343f2d
  21. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  22. PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread
  23. PKG_FIXUP:=autoreconf
  24. PKG_REMOVE_FILES:=autogen.sh
  25. PKG_INSTALL:=1
  26. PKG_BUILD_PARALLEL:=1
  27. include $(INCLUDE_DIR)/package.mk
  28. define Package/avahi/Default
  29. SECTION:=net
  30. CATEGORY:=Network
  31. TITLE:=An mDNS/DNS-SD implementation
  32. URL:=http://www.avahi.org/
  33. endef
  34. define Package/avahi/Default/description
  35. Avahi is an mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf)
  36. implementation (library). It facilitates
  37. service discovery on a local network -- this means that
  38. you can plug your laptop or computer into a network and
  39. instantly be able to view other people who you can chat with,
  40. find printers to print to or find files being shared.
  41. This kind of technology is already found in MacOS X
  42. (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
  43. and is very convenient.
  44. endef
  45. define Package/libavahi
  46. $(call Package/avahi/Default)
  47. SECTION:=libs
  48. CATEGORY:=Libraries
  49. DEPENDS:=+libpthread +SSP_SUPPORT:libssp
  50. TITLE+= (library)
  51. endef
  52. define Package/libavahi/description
  53. $(call Package/avahi/Default/description)
  54. .
  55. The libavahi package contains the mDNS/DNS-SD shared libraries,
  56. used by other programs. Specifically, it provides
  57. libavahi-core and libavahi-common libraries.
  58. By default, it is built without D-Bus support,
  59. i.e. the --disable-dbus configuration flag is set.
  60. To enable D-Bus support, select the package
  61. libavahi-dbus-support.
  62. endef
  63. define Package/avahi-autoipd
  64. $(call Package/avahi/Default)
  65. SUBMENU:=IP Addresses and Names
  66. DEPENDS:=+libdaemon
  67. TITLE:=IPv4LL network address configuration daemon
  68. endef
  69. define Package/avahi-autoipd/description
  70. $(call Package/avahi/Default/description)
  71. .
  72. This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
  73. Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
  74. from the link-local 169.254.0.0/16 range without the need for a central
  75. server. It is primarily intended to be used in ad-hoc networks which lack a
  76. DHCP server.
  77. endef
  78. define Package/avahi-daemon
  79. $(call Package/avahi/Default)
  80. SUBMENU:=IP Addresses and Names
  81. ifeq ($(BUILD_VARIANT),dbus)
  82. DEPENDS:=+libavahi +libexpat +librt +libdaemon +libdbus
  83. else
  84. DEPENDS:=+libavahi +libexpat +librt +libdaemon
  85. endif
  86. TITLE+= (daemon)
  87. endef
  88. define Package/avahi-daemon/description
  89. $(call Package/avahi/Default/description)
  90. .
  91. This package contains an mDNS/DNS-SD daemon.
  92. endef
  93. define Package/avahi-daemon/conffiles
  94. /etc/avahi/avahi-daemon.conf
  95. /etc/avahi/services/http.service
  96. /etc/avahi/services/ssh.service
  97. endef
  98. define Package/avahi-dnsconfd
  99. $(call Package/avahi/Default)
  100. SUBMENU:=IP Addresses and Names
  101. DEPENDS:=+libavahi +libdaemon
  102. TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon
  103. endef
  104. define Package/avahi-dnsconfd/description
  105. $(call Package/avahi/Default/description)
  106. .
  107. This package contains a Unicast DNS server from mDNS/DNS-SD configuration
  108. daemon, which may be used to configure conventional DNS servers using mDNS
  109. in a DHCP-like fashion. Especially useful on IPv6.
  110. endef
  111. #define Package/libavahi-dbus-support
  112. # $(call Package/avahi/Default)
  113. # SECTION:=libs
  114. # CATEGORY:=Libraries
  115. # VARIANT:=dbus
  116. # DEPENDS:=+dbus +libavahi
  117. # TITLE+= (D-Bus support)
  118. #endef
  119. #define Package/libavahi-dbus-support/description
  120. #$(call Package/libavahi/description)
  121. # .
  122. # The libavahi-dbus-support package enables
  123. # D-Bus support in avahi, needed to support
  124. # the libavahi-client library and avahi-utils.
  125. # Selecting this package modifies the build configuration
  126. # so that avahi packages are built with support for D-BUS enabled;
  127. # it does not generate a separate binary of its own.
  128. # It also automatically adds the D-Bus package to the build.
  129. # libavahi-dbus-support is selected automatically if you select
  130. # libavahi-client or avahi-utils.
  131. #endef
  132. define Package/libavahi-client
  133. $(call Package/avahi/Default)
  134. SECTION:=libs
  135. CATEGORY:=Libraries
  136. DEPENDS:=+libavahi-dbus-support +avahi-daemon
  137. TITLE+= (libavahi-client library)
  138. endef
  139. define Package/libavahi-client/description
  140. $(call Package/avahi/Default/description)
  141. .
  142. This packages adds the libavahi-client library.
  143. It also automatically adds the required
  144. libavahi-dbus-support and the avahi-daemon packages.
  145. For more information please see the avahi documentation.
  146. endef
  147. define Package/avahi-utils
  148. $(call Package/avahi/Default)
  149. SUBMENU:=IP Addresses and Names
  150. DEPENDS:=+libavahi-client +libgdbm
  151. TITLE+= (utilities)
  152. endef
  153. define Package/avahi-utils/description
  154. $(call Package/avahi/Default/description)
  155. .
  156. This packages installs the following avahi utility programs:
  157. avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name.
  158. It also automatically adds the required libavahi-client package.
  159. For more information please see the avahi documentation.
  160. endef
  161. TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
  162. CONFIGURE_ARGS+= \
  163. --enable-shared \
  164. --enable-static \
  165. --disable-glib \
  166. --disable-gobject \
  167. --disable-qt3 \
  168. --disable-qt4 \
  169. --disable-gtk \
  170. --disable-gtk3 \
  171. --with-xml=expat \
  172. --disable-dbm \
  173. --enable-gdbm \
  174. --enable-libdaemon \
  175. --disable-python \
  176. --disable-pygtk \
  177. --disable-python-dbus \
  178. --disable-mono \
  179. --disable-monodoc \
  180. --disable-doxygen-doc \
  181. --disable-doxygen-dot \
  182. --disable-doxygen-man \
  183. --disable-doxygen-rtf \
  184. --disable-doxygen-xml \
  185. --disable-doxygen-chm \
  186. --disable-doxygen-chi \
  187. --disable-doxygen-html \
  188. --disable-doxygen-ps \
  189. --disable-doxygen-pdf \
  190. --disable-xmltoman \
  191. --with-distro=none \
  192. --with-avahi-user=nobody \
  193. --with-avahi-group=nogroup \
  194. --with-autoipd-user=nobody \
  195. --with-autoipd-group=nogroup
  196. ifneq ($(CONFIG_SSP_SUPPORT),y)
  197. CONFIGURE_ARGS+= \
  198. --disable-stack-protector
  199. endif
  200. ifeq ($(BUILD_VARIANT),dbus)
  201. CONFIGURE_ARGS += \
  202. --enable-dbus
  203. else
  204. CONFIGURE_ARGS += \
  205. --disable-dbus
  206. endif
  207. CONFIGURE_VARS+= \
  208. CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
  209. ac_cv_header_sys_capability_h=no \
  210. define Build/InstallDev
  211. $(INSTALL_DIR) $(1)/usr/include
  212. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  213. $(INSTALL_DIR) $(1)/usr/lib
  214. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/
  215. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  216. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  217. endef
  218. #define Package/libavahi-dbus-support/install
  219. # $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
  220. # $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d
  221. #endef
  222. define Package/libavahi/install
  223. # The next line removes the ".build" file from the "other" build.
  224. # The effect is that, if the other build is re-selected in the future,
  225. # the build system will be forced to replace all the code in the
  226. # installer packages, removing anything from the current build.
  227. # "Other" means this: if the current build is "dbus", the other is "nodebus",
  228. # and if the current build is "nodbus", the other is "dbus".
  229. $(RM) -f $(PKG_ALT_DIR)/.built
  230. $(INSTALL_DIR) $(1)/usr/lib
  231. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
  232. endef
  233. define Package/libavahi-client/install
  234. $(INSTALL_DIR) $(1)/usr/lib
  235. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/
  236. endef
  237. define Package/avahi-utils/install
  238. $(INSTALL_DIR) $(1)/usr/bin
  239. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  240. endef
  241. define Package/avahi-autoipd/install
  242. $(INSTALL_DIR) $(1)/etc/avahi
  243. $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
  244. $(INSTALL_DIR) $(1)/usr/sbin
  245. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
  246. endef
  247. define Package/avahi-daemon/install
  248. $(INSTALL_DIR) $(1)/usr/sbin
  249. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
  250. $(INSTALL_DIR) $(1)/etc/avahi
  251. $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
  252. $(INSTALL_DIR) $(1)/etc/avahi/services
  253. $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
  254. $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
  255. $(INSTALL_DIR) $(1)/etc/init.d
  256. $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
  257. endef
  258. define Package/avahi-dnsconfd/install
  259. $(INSTALL_DIR) $(1)/etc/avahi
  260. $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
  261. $(INSTALL_DIR) $(1)/usr/sbin
  262. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
  263. endef
  264. $(eval $(call BuildPackage,libavahi-client))
  265. $(eval $(call BuildPackage,avahi-utils))
  266. #$(eval $(call BuildPackage,libavahi-dbus-support))
  267. $(eval $(call BuildPackage,libavahi))
  268. $(eval $(call BuildPackage,avahi-autoipd))
  269. $(eval $(call BuildPackage,avahi-daemon))
  270. $(eval $(call BuildPackage,avahi-dnsconfd))