9a8d948aef13f58a629bbad1e709914c85bcab3f
[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 SUBMENU:=IP Addresses and Names
62 DEPENDS:=+libdaemon
63 TITLE:=IPv4LL network address configuration daemon
64 endef
65
66 define Package/avahi-autoipd/description
67 $(call Package/avahi/Default/description)
68 .
69 This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
70 Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
71 from the link-local 169.254.0.0/16 range without the need for a central
72 server. It is primarily intended to be used in ad-hoc networks which lack a
73 DHCP server.
74 endef
75
76 define Package/avahi-daemon
77 $(call Package/avahi/Default)
78 SUBMENU:=IP Addresses and Names
79 DEPENDS:=+libavahi +libexpat
80 TITLE+= (daemon)
81 endef
82
83 define Package/avahi-daemon/description
84 $(call Package/avahi/Default/description)
85 .
86 This package contains an mDNS/DNS-SD daemon.
87 endef
88
89 define Package/avahi-daemon/conffiles
90 /etc/avahi/avahi-daemon.conf
91 /etc/avahi/services/http.service
92 /etc/avahi/services/ssh.service
93 endef
94
95 define Package/avahi-dnsconfd
96 $(call Package/avahi/Default)
97 SUBMENU:=IP Addresses and Names
98 DEPENDS:=+libavahi
99 TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon
100 endef
101
102 define Package/avahi-dnsconfd/description
103 $(call Package/avahi/Default/description)
104 .
105 This package contains an Unicast DNS server from mDNS/DNS-SD configuration
106 daemon, which may be used to configure conventional DNS servers using mDNS
107 in a DHCP-like fashion. Especially useful on IPv6.
108 endef
109
110 TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
111
112 CONFIGURE_ARGS+= \
113 --enable-shared \
114 --enable-static \
115 --disable-glib \
116 --disable-gobject \
117 --disable-qt3 \
118 --disable-qt4 \
119 --disable-gtk \
120 --disable-gtk3 \
121 --disable-dbus \
122 --with-xml=expat \
123 --disable-dbm \
124 --enable-gdbm \
125 --enable-libdaemon \
126 --disable-python \
127 --disable-pygtk \
128 --disable-python-dbus \
129 --disable-mono \
130 --disable-monodoc \
131 --disable-doxygen-doc \
132 --disable-doxygen-dot \
133 --disable-doxygen-man \
134 --disable-doxygen-rtf \
135 --disable-doxygen-xml \
136 --disable-doxygen-chm \
137 --disable-doxygen-chi \
138 --disable-doxygen-html \
139 --disable-doxygen-ps \
140 --disable-doxygen-pdf \
141 --disable-xmltoman \
142 --with-distro=none \
143 --with-avahi-user=nobody \
144 --with-avahi-group=nogroup \
145 --with-autoipd-user=nobody \
146 --with-autoipd-group=nogroup
147
148 ifneq ($(CONFIG_SSP_SUPPORT),y)
149 CONFIGURE_ARGS+= \
150 --disable-stack-protector
151 endif
152
153 CONFIGURE_VARS+= \
154 CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
155
156 define Build/InstallDev
157 $(INSTALL_DIR) $(1)/usr/include
158 $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/
159 $(INSTALL_DIR) $(1)/usr/lib
160 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(1)/usr/lib/
161 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
162 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(1)/usr/lib/pkgconfig/
163 endef
164
165 define Package/libavahi/install
166 $(INSTALL_DIR) $(1)/usr/lib
167 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
168 endef
169
170 define Package/avahi-autoipd/install
171 $(INSTALL_DIR) $(1)/etc/avahi
172 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
173 $(INSTALL_DIR) $(1)/usr/sbin
174 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
175 endef
176
177 define Package/avahi-daemon/install
178 $(INSTALL_DIR) $(1)/usr/sbin
179 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
180 $(INSTALL_DIR) $(1)/etc/avahi
181 $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
182 $(INSTALL_DIR) $(1)/etc/avahi/services
183 $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
184 $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
185 $(INSTALL_DIR) $(1)/etc/init.d
186 $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
187 endef
188
189 define Package/avahi-dnsconfd/install
190 $(INSTALL_DIR) $(1)/etc/avahi
191 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
192 $(INSTALL_DIR) $(1)/usr/sbin
193 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
194 endef
195
196 $(eval $(call BuildPackage,libavahi))
197 $(eval $(call BuildPackage,avahi-autoipd))
198 $(eval $(call BuildPackage,avahi-daemon))
199 $(eval $(call BuildPackage,avahi-dnsconfd))