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