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