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