remove UninstallDev
[packages.git] / libs / avahi / Makefile
1 #
2 # Copyright (C) 2007 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.21
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:=9cc68f79c50c9dd9e419990c3c9b05b9
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         An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
43         Avahi is a system which facilitates service discovery on a local network --
44         this means that you can plug your laptop or computer into a network and
45         instantly be able to view other people who you can chat with, find printers
46         to print to or find files being shared. This kind of technology is already
47         found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
48         and is very convenient.
49         This package contains the mDNS/DNS-SD shared libraries, used by other programs.
50 endef
51
52 define Package/avahi-autoipd
53   $(call Package/avahi/Default)
54   DEPENDS:=+libdaemon
55   TITLE:=IPv4LL network address configuration daemon
56 endef
57
58 define Package/avahi-autoipd/description
59         An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
60         Avahi is a system which facilitates service discovery on a local network --
61         this means that you can plug your laptop or computer into a network and
62         instantly be able to view other people who you can chat with, find printers
63         to print to or find files being shared. This kind of technology is already
64         found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
65         and is very convenient.
66         This package implements IPv4LL, "Dynamic Configuration of
67         IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for
68         automatic IP address configuration from the link-local
69         169.254.0.0/16 range without the need for a central server. It
70         is primarily intended to be used in ad-hoc networks which lack a
71         DHCP server.
72 endef
73
74 define Package/avahi-daemon
75   $(call Package/avahi/Default)
76   DEPENDS:=+libavahi +libexpat
77   TITLE+= (daemon)
78 endef
79
80 define Package/avahi-daemon/description
81         An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
82         Avahi is a system which facilitates service discovery on a local network --
83         this means that you can plug your laptop or computer into a network and
84         instantly be able to view other people who you can chat with, find printers
85         to print to or find files being shared. This kind of technology is already
86         found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
87         and is very convenient.
88         This package contains an mDNS/DNS-SD daemon.
89 endef
90
91 define Package/avahi-daemon/conffiles
92 /etc/avahi/avahi-daemon.conf
93 /etc/avahi/services/http.service
94 /etc/avahi/services/ssh.service
95 endef
96
97 define Package/avahi-dnsconfd
98   $(call Package/avahi/Default)
99   DEPENDS:=+libavahi
100   TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon
101 endef
102
103 define Package/avahi-dnsconfd/description
104         This package contains an Unicast DNS server from mDNS/DNS-SD configuration
105         daemon, which may be used to configure conventional DNS servers using mDNS
106         in a DHCP-like fashion. Especially useful on IPv6.
107 endef
108
109 define Build/Configure
110         $(call Build/Configure/Default, \
111                 --enable-shared \
112                 --enable-static \
113                 --disable-glib \
114                 --disable-qt3 \
115                 --disable-qt4 \
116                 --disable-gtk \
117                 --disable-dbus \
118                 --enable-expat \
119                 --disable-dbm \
120                 --enable-gdbm \
121                 --enable-libdaemon \
122                 --disable-python \
123                 --disable-pygtk \
124                 --disable-python-dbus \
125                 --disable-mono \
126                 --disable-monodoc \
127                 --disable-doxygen-doc \
128                 --disable-doxygen-dot \
129                 --disable-doxygen-man \
130                 --disable-doxygen-rtf \
131                 --disable-doxygen-xml \
132                 --disable-doxygen-chm \
133                 --disable-doxygen-chi \
134                 --disable-doxygen-html \
135                 --disable-doxygen-ps \
136                 --disable-doxygen-pdf \
137                 --disable-xmltoman \
138                 --with-distro=none \
139                 --with-avahi-user=nobody \
140                 --with-avahi-group=nogroup \
141                 , \
142                 CFLAGS="$$$$CFLAGS -DNDEBUG" \
143         )
144 endef
145
146 define Build/Compile
147         $(MAKE) -C $(PKG_BUILD_DIR) \
148                 DESTDIR="$(PKG_INSTALL_DIR)" \
149                 all install
150 endef
151
152 define Build/InstallDev
153         mkdir -p $(1)/usr/include
154         $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/
155         mkdir -p $(1)/usr/lib
156         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(1)/usr/lib/
157         mkdir -p $(1)/usr/lib/pkgconfig
158         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(1)/usr/lib/pkgconfig/
159 endef
160
161 define Package/libavahi/install
162         $(INSTALL_DIR) $(1)/usr/lib
163         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
164 endef
165
166 define Package/avahi-autoipd/install
167         $(INSTALL_DIR) $(1)/etc/avahi
168         $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
169         $(INSTALL_DIR) $(1)/usr/sbin
170         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
171 endef
172
173 define Package/avahi-daemon/install
174         $(INSTALL_DIR) $(1)/usr/sbin
175         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
176         $(INSTALL_DIR) $(1)/etc/avahi
177         $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
178         $(INSTALL_DIR) $(1)/etc/avahi/services
179         $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
180         $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
181         $(INSTALL_DIR) $(1)/etc/init.d
182         $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
183 endef
184
185 define Package/avahi-dnsconfd/install
186         $(INSTALL_DIR) $(1)/etc/avahi
187         $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
188         $(INSTALL_DIR) $(1)/usr/sbin
189         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
190 endef
191
192 $(eval $(call BuildPackage,libavahi))
193 $(eval $(call BuildPackage,avahi-autoipd))
194 $(eval $(call BuildPackage,avahi-daemon))
195 $(eval $(call BuildPackage,avahi-dnsconfd))
196
197 $(eval $(call RequireCommand,pkg-config, \
198         $(PKG_NAME) requires pkg-config. \
199 ))