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