]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/avahi/avahi.mk
avahi: remove double dependency on gettext
[coffee/buildroot.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_SOURCE = avahi-$(AVAHI_VERSION).tar.gz
16 AVAHI_SITE = http://www.avahi.org/download/
17 AVAHI_LICENSE = LGPLv2.1+
18 AVAHI_LICENSE_FILES = LICENSE
19 AVAHI_INSTALL_STAGING = YES
20
21 AVAHI_CONF_ENV = 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
70
71 AVAHI_CONF_OPT = --localstatedir=/var \
72                 --disable-qt3 \
73                 --disable-qt4 \
74                 --disable-gdbm \
75                 --disable-python-dbus \
76                 --disable-pygtk \
77                 --disable-gtk3 \
78                 --disable-mono \
79                 --disable-monodoc \
80                 --disable-stack-protector \
81                 --with-distro=none \
82                 $(if $(BR2_HAVE_DOCUMENTATION),--enable,--disable)-manpages \
83                 $(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \
84                 --with-avahi-user=default \
85                 --with-avahi-group=default \
86                 --with-autoipd-user=default \
87                 --with-autoipd-group=default
88
89 AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \
90        host-pkgconf host-gettext
91
92 ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
93 AVAHI_DEPENDENCIES += libdaemon
94 else
95 AVAHI_CONF_OPT += --disable-libdaemon
96 endif
97
98 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
99 AVAHI_DEPENDENCIES += expat
100 AVAHI_CONF_OPT += --with-xml=expat
101 else
102 AVAHI_CONF_OPT += --with-xml=none
103 endif
104
105 ifeq ($(BR2_PACKAGE_DBUS),y)
106 AVAHI_DEPENDENCIES += dbus
107 else
108 AVAHI_CONF_OPT += --disable-dbus
109 endif
110
111 ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
112 AVAHI_DEPENDENCIES += libglib2
113 else
114 AVAHI_CONF_OPT += --disable-glib --disable-gobject
115 endif
116
117 ifeq ($(BR2_PACKAGE_LIBGLADE),y)
118 AVAHI_DEPENDENCIES += libglade
119 else
120 AVAHI_CONF_OPT += --disable-gtk
121 endif
122
123 ifeq ($(BR2_PACKAGE_PYTHON),y)
124 AVAHI_CONF_ENV += am_cv_pathless_PYTHON=python \
125                 am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \
126                 am_cv_python_version=$(PYTHON_VERSION) \
127                 am_cv_python_platform=linux2 \
128                 am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
129                 am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
130                 py_cv_mod_socket_=yes
131
132 AVAHI_DEPENDENCIES += python
133 AVAHI_CONF_OPT += --enable-python
134 else
135 AVAHI_CONF_OPT += --disable-python
136 endif
137
138 AVAHI_MAKE_OPT += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
139
140 define AVAHI_REMOVE_INITSCRIPT
141         rm -rf $(TARGET_DIR)/etc/init.d/avahi-*
142 endef
143
144 AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT
145
146 define AVAHI_INSTALL_AUTOIPD
147         $(INSTALL) -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/
148         rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
149         $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib
150         ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd
151 endef
152
153 ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y)
154 AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD
155 endif
156
157 define AVAHI_INSTALL_DAEMON_INITSCRIPT
158         $(INSTALL) -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/
159 endef
160
161 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
162 AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_DAEMON_INITSCRIPT
163 endif
164
165 $(eval $(autotools-package))