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