152a3d5970dca87541db6e2bfd6afea995f561e5
[openwrt/svn-archive/archive.git] / libs / avahi / Makefile
1 #
2
3 # Copyright (C) 2007 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=avahi
12 PKG_VERSION:=0.6.25
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://avahi.org/download/
17 PKG_MD5SUM:=a83155a6e29e3988f07e5eea3287b21e
18
19 PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm
20
21 PKG_FIXUP = libtool
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/avahi/Default
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=An mDNS/DNS-SD implementation
29 URL:=http://www.avahi.org/
30 endef
31
32 define Package/avahi/Default/description
33 An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
34 Avahi is a system which facilitates service discovery on a local network --
35 this means that you can plug your laptop or computer into a network and
36 instantly be able to view other people who you can chat with, find printers
37 to print to or find files being shared. This kind of technology is already
38 found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
39 and is very convenient.
40 endef
41
42 define Package/libavahi
43 $(call Package/avahi/Default)
44 SECTION:=libs
45 CATEGORY:=Libraries
46 DEPENDS:=+libdaemon +libpthread
47 TITLE+= (library)
48 endef
49
50 define Package/libavahi/description
51 $(call Package/avahi/Default/description)
52 .
53 This package contains the mDNS/DNS-SD shared libraries, used by other programs.
54 endef
55
56 define Package/avahi-autoipd
57 $(call Package/avahi/Default)
58 DEPENDS:=+libdaemon
59 TITLE:=IPv4LL network address configuration daemon
60 endef
61
62 define Package/avahi-autoipd/description
63 $(call Package/avahi/Default/description)
64 .
65 This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
66 Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
67 from the link-local 169.254.0.0/16 range without the need for a central
68 server. It is primarily intended to be used in ad-hoc networks which lack a
69 DHCP server.
70 endef
71
72 define Package/avahi-daemon
73 $(call Package/avahi/Default)
74 DEPENDS:=+libavahi +libexpat
75 TITLE+= (daemon)
76 endef
77
78 define Package/avahi-daemon/description
79 $(call Package/avahi/Default/description)
80 .
81 This package contains an mDNS/DNS-SD daemon.
82 endef
83
84 define Package/avahi-daemon/conffiles
85 /etc/avahi/avahi-daemon.conf
86 /etc/avahi/services/http.service
87 /etc/avahi/services/ssh.service
88 endef
89
90 define Package/avahi-dnsconfd
91 $(call Package/avahi/Default)
92 DEPENDS:=+libavahi
93 TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon
94 endef
95
96 define Package/avahi-dnsconfd/description
97 $(call Package/avahi/Default/description)
98 .
99 This package contains an Unicast DNS server from mDNS/DNS-SD configuration
100 daemon, which may be used to configure conventional DNS servers using mDNS
101 in a DHCP-like fashion. Especially useful on IPv6.
102 endef
103
104 TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
105
106 CONFIGURE_ARGS+= \
107 --enable-shared \
108 --enable-static \
109 --disable-glib \
110 --disable-gobject \
111 --disable-qt3 \
112 --disable-qt4 \
113 --disable-gtk \
114 --disable-dbus \
115 --with-xml=expat \
116 --disable-dbm \
117 --enable-gdbm \
118 --enable-libdaemon \
119 --disable-python \
120 --disable-pygtk \
121 --disable-python-dbus \
122 --disable-mono \
123 --disable-monodoc \
124 --disable-doxygen-doc \
125 --disable-doxygen-dot \
126 --disable-doxygen-man \
127 --disable-doxygen-rtf \
128 --disable-doxygen-xml \
129 --disable-doxygen-chm \
130 --disable-doxygen-chi \
131 --disable-doxygen-html \
132 --disable-doxygen-ps \
133 --disable-doxygen-pdf \
134 --disable-xmltoman \
135 --with-distro=none \
136 --with-avahi-user=nobody \
137 --with-avahi-group=nogroup \
138 --with-autoipd-user=nobody \
139 --with-autoipd-group=nogroup
140
141 ifneq ($(CONFIG_SSP_SUPPORT),y)
142 CONFIGURE_ARGS+= \
143 --disable-stack-protector
144 endif
145
146 CONFIGURE_VARS+= \
147 CFLAGS="$$$$CFLAGS -DNDEBUG" \
148 $(if $(CONFIG_LINUX_2_4),ac_cv_header_sys_inotify_h=no)
149
150 define Build/Configure
151 ( cd $(PKG_BUILD_DIR); aclocal; libtoolize; autoreconf; );
152 $(call Build/Configure/Default)
153 endef
154
155 define Build/Compile
156 $(MAKE) -C $(PKG_BUILD_DIR) \
157 DESTDIR="$(PKG_INSTALL_DIR)" \
158 all install
159 endef
160
161 define Build/InstallDev
162 mkdir -p $(1)/usr/include
163 $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/
164 mkdir -p $(1)/usr/lib
165 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(1)/usr/lib/
166 mkdir -p $(1)/usr/lib/pkgconfig
167 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(1)/usr/lib/pkgconfig/
168 endef
169
170 define Package/libavahi/install
171 $(INSTALL_DIR) $(1)/usr/lib
172 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
173 endef
174
175 define Package/avahi-autoipd/install
176 $(INSTALL_DIR) $(1)/etc/avahi
177 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
178 $(INSTALL_DIR) $(1)/usr/sbin
179 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
180 endef
181
182 define Package/avahi-daemon/install
183 $(INSTALL_DIR) $(1)/usr/sbin
184 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
185 $(INSTALL_DIR) $(1)/etc/avahi
186 $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
187 $(INSTALL_DIR) $(1)/etc/avahi/services
188 $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
189 $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
190 $(INSTALL_DIR) $(1)/etc/init.d
191 $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
192 endef
193
194 define Package/avahi-dnsconfd/install
195 $(INSTALL_DIR) $(1)/etc/avahi
196 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
197 $(INSTALL_DIR) $(1)/usr/sbin
198 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
199 endef
200
201 $(eval $(call BuildPackage,libavahi))
202 $(eval $(call BuildPackage,avahi-autoipd))
203 $(eval $(call BuildPackage,avahi-daemon))
204 $(eval $(call BuildPackage,avahi-dnsconfd))
205
206 $(eval $(call RequireCommand,intltool-update, \
207 $(PKG_NAME) requires intltool >= 0.35.0 \
208 ))
209