]> Git Repo - buildroot-mgba.git/blob - package/avahi/avahi.mk
avahi: add optional gtk3 support
[buildroot-mgba.git] / package / avahi / avahi.mk
1 ################################################################################
2 #
3 # avahi
4 #
5 ################################################################################
6
7 #
8 # This program is free software; you can redistribute it
9 # and/or modify it under the terms of the GNU Lesser General
10 # Public License as published by the Free Software Foundation
11 # either version 2.1 of the License, or (at your option) any
12 # later version.
13
14 AVAHI_VERSION = 0.6.31
15 AVAHI_SITE = http://www.avahi.org/download
16 AVAHI_LICENSE = LGPLv2.1+
17 AVAHI_LICENSE_FILES = LICENSE
18 AVAHI_INSTALL_STAGING = YES
19
20 AVAHI_CONF_ENV = ac_cv_func_strtod=yes \
21                 ac_fsusage_space=yes \
22                 fu_cv_sys_stat_statfs2_bsize=yes \
23                 ac_cv_func_closedir_void=no \
24                 ac_cv_func_getloadavg=no \
25                 ac_cv_lib_util_getloadavg=no \
26                 ac_cv_lib_getloadavg_getloadavg=no \
27                 ac_cv_func_getgroups=yes \
28                 ac_cv_func_getgroups_works=yes \
29                 ac_cv_func_chown_works=yes \
30                 ac_cv_have_decl_euidaccess=no \
31                 ac_cv_func_euidaccess=no \
32                 ac_cv_have_decl_strnlen=yes \
33                 ac_cv_func_strnlen_working=yes \
34                 ac_cv_func_lstat_dereferences_slashed_symlink=yes \
35                 ac_cv_func_lstat_empty_string_bug=no \
36                 ac_cv_func_stat_empty_string_bug=no \
37                 vb_cv_func_rename_trailing_slash_bug=no \
38                 ac_cv_have_decl_nanosleep=yes \
39                 jm_cv_func_nanosleep_works=yes \
40                 gl_cv_func_working_utimes=yes \
41                 ac_cv_func_utime_null=yes \
42                 ac_cv_have_decl_strerror_r=yes \
43                 ac_cv_func_strerror_r_char_p=no \
44                 jm_cv_func_svid_putenv=yes \
45                 ac_cv_func_getcwd_null=yes \
46                 ac_cv_func_getdelim=yes \
47                 ac_cv_func_mkstemp=yes \
48                 utils_cv_func_mkstemp_limitations=no \
49                 utils_cv_func_mkdir_trailing_slash_bug=no \
50                 jm_cv_func_gettimeofday_clobber=no \
51                 am_cv_func_working_getline=yes \
52                 gl_cv_func_working_readdir=yes \
53                 jm_ac_cv_func_link_follows_symlink=no \
54                 utils_cv_localtime_cache=no \
55                 ac_cv_struct_st_mtim_nsec=no \
56                 gl_cv_func_tzset_clobber=no \
57                 gl_cv_func_getcwd_null=yes \
58                 gl_cv_func_getcwd_path_max=yes \
59                 ac_cv_func_fnmatch_gnu=yes \
60                 am_getline_needs_run_time_check=no \
61                 am_cv_func_working_getline=yes \
62                 gl_cv_func_mkdir_trailing_slash_bug=no \
63                 gl_cv_func_mkstemp_limitations=no \
64                 ac_cv_func_working_mktime=yes \
65                 jm_cv_func_working_re_compile_pattern=yes \
66                 ac_use_included_regex=no \
67                 avahi_cv_sys_cxx_works=yes \
68                 DATADIRNAME=share
69
70 AVAHI_CONF_OPTS = \
71                 --disable-qt3 \
72                 --disable-qt4 \
73                 --disable-gdbm \
74                 --disable-python-dbus \
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
86
87 AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \
88        host-pkgconf host-gettext
89
90 ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
91 AVAHI_DEPENDENCIES += libdaemon
92 else
93 AVAHI_CONF_OPTS += --disable-libdaemon
94 endif
95
96 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
97 AVAHI_DEPENDENCIES += expat
98 AVAHI_CONF_OPTS += --with-xml=expat
99 else
100 AVAHI_CONF_OPTS += --with-xml=none
101 endif
102
103 ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y)
104 AVAHI_CONF_OPTS += --enable-compat-libdns_sd
105 endif
106
107 ifeq ($(BR2_PACKAGE_DBUS),y)
108 AVAHI_DEPENDENCIES += dbus
109 else
110 AVAHI_CONF_OPTS += --disable-dbus
111 endif
112
113 ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
114 AVAHI_DEPENDENCIES += libglib2
115 else
116 AVAHI_CONF_OPTS += --disable-glib --disable-gobject
117 endif
118
119 ifeq ($(BR2_PACKAGE_LIBGLADE),y)
120 AVAHI_DEPENDENCIES += libglade
121 else
122 AVAHI_CONF_OPTS += --disable-gtk
123 endif
124
125 ifeq ($(BR2_PACKAGE_LIBGTK3),y)
126 AVAHI_DEPENDENCIES += libgtk3
127 AVAHI_CONF_OPTS += --enable-gtk3
128 else
129 AVAHI_CONF_OPTS += --disable-gtk3
130 endif
131
132 ifeq ($(BR2_PACKAGE_PYTHON),y)
133 AVAHI_CONF_ENV += am_cv_pathless_PYTHON=python \
134                 am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \
135                 am_cv_python_version=$(PYTHON_VERSION) \
136                 am_cv_python_platform=linux2 \
137                 am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
138                 am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
139                 py_cv_mod_socket_=yes
140
141 AVAHI_DEPENDENCIES += python
142 AVAHI_CONF_OPTS += --enable-python
143 else
144 AVAHI_CONF_OPTS += --disable-python
145 endif
146
147 AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
148
149 define AVAHI_USERS
150         avahi -1 avahi -1 * - - -
151 endef
152
153 define AVAHI_REMOVE_INITSCRIPT
154         rm -rf $(TARGET_DIR)/etc/init.d/avahi-*
155 endef
156
157 AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT
158
159 ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y)
160 define AVAHI_INSTALL_AUTOIPD
161         rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
162         $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib
163         ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd
164 endef
165
166 define AVAHI_INSTALL_AUTOIPD_INIT_SYSV
167         $(INSTALL) -D -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/S05avahi-setup.sh
168 endef
169
170 AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD
171 endif
172
173 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
174
175 define AVAHI_INSTALL_INIT_SYSTEMD
176         mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
177
178         ln -fs /lib/systemd/system/avahi-daemon.service \
179                 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
180
181         ln -fs /lib/systemd/system/avahi-dnsconfd.service \
182                 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service
183
184         $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
185                 $(TARGET_DIR)/usr/lib/tmpfiles.d/avahi.conf
186 endef
187
188 define AVAHI_INSTALL_DAEMON_INIT_SYSV
189         $(INSTALL) -D -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/S50avahi-daemon
190 endef
191
192 endif
193
194 define AVAHI_INSTALL_INIT_SYSV
195         $(AVAHI_INSTALL_AUTOIPD_INIT_SYSV)
196         $(AVAHI_INSTALL_DAEMON_INIT_SYSV)
197 endef
198
199 # applications expects to be able to #include <dns_sd.h>
200 define AVAHI_STAGING_INSTALL_LIBDNSSD_LINK
201         ln -sf avahi-compat-libdns_sd/dns_sd.h \
202                 $(STAGING_DIR)/usr/include/dns_sd.h
203 endef
204
205 ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y)
206 AVAHI_POST_INSTALL_STAGING_HOOKS += AVAHI_STAGING_INSTALL_LIBDNSSD_LINK
207 endif
208
209 $(eval $(autotools-package))
This page took 0.041301 seconds and 4 git commands to generate.