change SECTION and CATEGORY to put packages in the right place, change PKG_BUILDDEPs...
[openwrt/svn-archive/archive.git] / libs / howl / 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:=howl
12 PKG_VERSION:=1.0.0
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/
18 PKG_MD5SUM:=c389d3ffba0e69a179de2ec650f1fdcc
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libhowl
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=A Zeroconf networking implementation (library)
29 DESCRIPTION:=A Zeroconf networking implementation (library).\\\
30 A cross-platform implementation of Zeroconf networking.\\\
31 \\\
32 This package contains shared libraries, needed by other programs.
33 URL:=http://www.porchdogsoft.com/products/howl/
34 endef
35
36 define Package/howl-utils
37 SECTION:=net
38 CATEGORY:=Network
39 DEPENDS:=+libhowl
40 TITLE:=A Zeroconf networking implementation (utilities)
41 DESCRIPTION:=A Zeroconf networking implementation (utilities).\\\
42 A cross-platform implementation of Zeroconf networking.\\\
43 \\\
44 This package contains mDNS client utilities.
45 URL:=http://www.porchdogsoft.com/products/howl/
46 endef
47
48 define Package/autoipd
49 SECTION:=net
50 CATEGORY:=Network
51 DEPENDS:=+libhowl
52 TITLE:=An IPv4 Link-Local address self-assigner daemon
53 DESCRIPTION:=An IPv4 Link-Local address self-assigner daemon.\\\
54 A cross-platform implementation of Zeroconf networking.\\\
55 \\\
56 This package contains an IPv4 Link-Local address self-assigner daemon.
57 URL:=http://www.porchdogsoft.com/products/howl/
58 endef
59
60 define Package/mdnsresponder
61 SECTION:=net
62 CATEGORY:=Network
63 DEPENDS:=+libhowl
64 TITLE:=An mDNS (Multicast DNS) service responder daemon
65 DESCRIPTION:=An mDNS (Multicast DNS) service responder daemon.\\\
66 A cross-platform implementation of Zeroconf networking.\\\
67 \\\
68 This package contains an mDNS (Multicast DNS) service responder daemon.
69 URL:=http://www.porchdogsoft.com/products/howl/
70 endef
71
72 define Package/mdnsresponder/conffiles
73 /etc/mDNSResponder.conf
74 endef
75
76 define Package/nifd
77 SECTION:=net
78 CATEGORY:=Network
79 DEPENDS:=+libhowl
80 TITLE:=A network interface monitor daemon
81 DESCRIPTION:=A network interface monitor daemon.\\\
82 A cross-platform implementation of Zeroconf networking.\\\
83 \\\
84 This package contains a network interface monitor daemon.
85 URL:=http://www.porchdogsoft.com/products/howl/
86 endef
87
88 define Build/Configure
89 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
90 $(TARGET_CONFIGURE_OPTS) \
91 CFLAGS="$(TARGET_CFLAGS)" \
92 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
93 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
94 ./configure \
95 --target=$(GNU_TARGET_NAME) \
96 --host=$(GNU_TARGET_NAME) \
97 --build=$(GNU_HOST_NAME) \
98 --program-prefix="" \
99 --program-suffix="" \
100 --prefix=/usr \
101 --exec-prefix=/usr \
102 --bindir=/usr/bin \
103 --datadir=/usr/share \
104 --includedir=/usr/include \
105 --infodir=/usr/share/info \
106 --libdir=/usr/lib \
107 --libexecdir=/usr/lib \
108 --localstatedir=/var \
109 --mandir=/usr/share/man \
110 --sbindir=/usr/sbin \
111 --sysconfdir=/etc \
112 $(DISABLE_LARGEFILE) \
113 $(DISABLE_NLS) \
114 --enable-shared \
115 --enable-static \
116 );
117 endef
118
119 define Build/Compile
120 rm -rf $(PKG_INSTALL_DIR)
121 mkdir -p $(PKG_INSTALL_DIR)
122 $(MAKE) -C $(PKG_BUILD_DIR) \
123 DESTDIR="$(PKG_INSTALL_DIR)" \
124 all install
125 endef
126
127 define Package/libhowl/install
128 install -m0755 -d $(1)/usr/lib
129 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(1)/usr/lib/
130 endef
131
132 define Package/howl-utils/install
133 install -m0755 -d $(1)/usr/bin
134 $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(1)/usr/bin/
135 endef
136
137 define Package/mdnsresponder/install
138 install -m0755 -d $(1)/etc
139 install -m0644 ./files/mDNSResponder.conf $(1)/etc/mDNSResponder.conf
140 install -m0755 -d $(1)/etc/init.d
141 install -m0644 ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder
142 install -m0755 -d $(1)/usr/sbin
143 $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(1)/usr/sbin/
144 endef
145
146 define Package/autoipd/install
147 install -m0755 -d $(1)/etc/init.d
148 install -m0644 ./files/autoipd.init $(1)/etc/init.d/autoipd
149 install -m0755 -d $(1)/usr/sbin
150 $(CP) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(1)/usr/sbin/
151 endef
152
153 define Package/nifd/install
154 install -m0755 -d $(1)/etc/init.d
155 install -m0644 ./files/nifd.init $(1)/etc/init.d/nifd
156 install -m0755 -d $(1)/usr/sbin
157 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nifd $(1)/usr/sbin/
158 endef
159
160 define Build/InstallDev
161 mkdir -p $(STAGING_DIR)/usr/include
162 $(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(STAGING_DIR)/usr/include/
163 mkdir -p $(STAGING_DIR)/usr/lib
164 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(STAGING_DIR)/usr/lib/
165 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
166 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(STAGING_DIR)/usr/lib/pkgconfig/
167 endef
168
169 define Build/UninstallDev
170 rm -rf \
171 $(STAGING_DIR)/usr/include/howl \
172 $(STAGING_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} \
173 $(STAGING_DIR)/usr/lib/pkgconfig/howl.pc
174 endef
175
176 $(eval $(call BuildPackage,libhowl))
177 $(eval $(call BuildPackage,howl-utils))
178 $(eval $(call BuildPackage,autoipd))
179 $(eval $(call BuildPackage,mdnsresponder))
180 $(eval $(call BuildPackage,nifd))