remove PKG_CAT from packages
[openwrt/svn-archive/archive.git] / libs / avahi / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=avahi
12 PKG_VERSION:=0.6.17
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://avahi.org/download/
17 PKG_MD5SUM:=29ebb2181958d5721ee5fc45f035a77c
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm
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/libavahi
34 $(call Package/avahi/Default)
35 SECTION:=libs
36 CATEGORY:=Libraries
37 DEPENDS:=+libdaemon +libpthread
38 TITLE+= (library)
39 endef
40
41 define Package/libavahi/description
42
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
61 An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
62 Avahi is a system which facilitates service discovery on a local network --
63 this means that you can plug your laptop or computer into a network and
64 instantly be able to view other people who you can chat with, find printers
65 to print to or find files being shared. This kind of technology is already
66 found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
67 and is very convenient.
68 This package implements IPv4LL, "Dynamic Configuration of
69 IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for
70 automatic IP address configuration from the link-local
71 169.254.0.0/16 range without the need for a central server. It
72 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 DEPENDS:=+libavahi +libexpat
79 TITLE+= (daemon)
80 endef
81
82 define Package/avahi-daemon/description
83
84 An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
85 Avahi is a system which facilitates service discovery on a local network --
86 this means that you can plug your laptop or computer into a network and
87 instantly be able to view other people who you can chat with, find printers
88 to print to or find files being shared. This kind of technology is already
89 found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
90 and is very convenient.
91 This package contains an mDNS/DNS-SD daemon.
92 endef
93
94 define Package/avahi-daemon/conffiles
95 /etc/avahi/avahi-daemon.conf
96 /etc/avahi/services/http.service
97 /etc/avahi/services/ssh.service
98 endef
99
100 define Package/avahi-dnsconfd
101 $(call Package/avahi/Default)
102 DEPENDS:=+libavahi
103 TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon
104 endef
105
106 define Package/avahi-dnsconfd/description
107
108
109 This package contains an Unicast DNS server from mDNS/DNS-SD configuration
110 daemon, which may be used to configure conventional DNS servers using mDNS
111 in a DHCP-like fashion. Especially useful on IPv6.
112 endef
113
114 define Build/Configure
115 $(call Build/Configure/Default, \
116 --enable-shared \
117 --enable-static \
118 --disable-glib \
119 --disable-qt3 \
120 --disable-qt4 \
121 --disable-gtk \
122 --disable-dbus \
123 --enable-expat \
124 --disable-dbm \
125 --enable-gdbm \
126 --enable-libdaemon \
127 --disable-python \
128 --disable-pygtk \
129 --disable-python-dbus \
130 --disable-mono \
131 --disable-monodoc \
132 --disable-doxygen-doc \
133 --disable-doxygen-dot \
134 --disable-doxygen-man \
135 --disable-doxygen-rtf \
136 --disable-doxygen-xml \
137 --disable-doxygen-chm \
138 --disable-doxygen-chi \
139 --disable-doxygen-html \
140 --disable-doxygen-ps \
141 --disable-doxygen-pdf \
142 --disable-xmltoman \
143 --with-distro=none \
144 --with-avahi-user=nobody \
145 --with-avahi-group=nogroup \
146 , \
147 CFLAGS="$$$$CFLAGS -DNDEBUG" \
148 )
149 endef
150
151 define Build/Compile
152 $(MAKE) -C $(PKG_BUILD_DIR) \
153 DESTDIR="$(PKG_INSTALL_DIR)" \
154 all install
155 endef
156
157 define Build/InstallDev
158 mkdir -p $(1)/usr/include
159 $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/
160 mkdir -p $(1)/usr/lib
161 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(1)/usr/lib/
162 mkdir -p $(1)/usr/lib/pkgconfig
163 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(1)/usr/lib/pkgconfig/
164 endef
165
166 define Build/UninstallDev
167 rm -rf $(STAGING_DIR)/usr/include/avahi-{common,core} \
168 $(STAGING_DIR)/usr/lib/libavahi-{common,core}.{a,so*} \
169 $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc
170 endef
171
172 define Package/libavahi/install
173 $(INSTALL_DIR) $(1)/usr/lib
174 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
175 endef
176
177 define Package/avahi-autoipd/install
178 $(INSTALL_DIR) $(1)/etc/avahi
179 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
180 $(INSTALL_DIR) $(1)/usr/sbin
181 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
182 endef
183
184 define Package/avahi-daemon/install
185 $(INSTALL_DIR) $(1)/usr/sbin
186 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
187 $(INSTALL_DIR) $(1)/etc/avahi
188 $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
189 $(INSTALL_DIR) $(1)/etc/avahi/services
190 $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
191 $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
192 $(INSTALL_DIR) $(1)/etc/init.d
193 $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
194 endef
195
196 define Package/avahi-dnsconfd/install
197 $(INSTALL_DIR) $(1)/etc/avahi
198 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
199 $(INSTALL_DIR) $(1)/usr/sbin
200 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
201 endef
202
203 $(eval $(call BuildPackage,libavahi))
204 $(eval $(call BuildPackage,avahi-autoipd))
205 $(eval $(call BuildPackage,avahi-daemon))
206 $(eval $(call BuildPackage,avahi-dnsconfd))
207
208 $(eval $(call RequireCommand,pkg-config, \
209 $(PKG_NAME) requires pkg-config. \
210 ))