replace lots of manual install commands with INSTALL_* variables
[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_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/
17 PKG_MD5SUM:=c389d3ffba0e69a179de2ec650f1fdcc
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/howl/Default
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=Zeroconf networking implementation
29 DESCRIPTION:=\
30 Howl is a cross-platform implementation of Zeroconf networking.
31 URL:=http://www.porchdogsoft.com/products/howl/
32 endef
33
34 define Package/libhowl
35 $(call Package/howl/Default)
36 SECTION:=libs
37 CATEGORY:=Libraries
38 TITLE+= (library)
39 DESCRIPTION+=\\\
40 \\\
41 This package contains the Howl shared libraries, used by other programs.
42 endef
43
44 define Package/howl-autoipd
45 $(call Package/howl/Default)
46 DEPENDS:=+libhowl
47 TITLE:=An IPv4 Link-Local address self-assigner daemon
48 DESCRIPTION+=\\\
49 \\\
50 This package contains an IPv4 Link-Local address self-assigner daemon.
51 endef
52
53 define Package/howl-mdnsresponder
54 $(call Package/howl/Default)
55 DEPENDS:=+libhowl
56 TITLE:=An mDNS (Multicast DNS) service responder daemon
57 DESCRIPTION+=\\\
58 \\\
59 This package contains an mDNS (Multicast DNS) service responder daemon.
60 endef
61
62 define Package/howl-mdnsresponder/conffiles
63 /etc/mDNSResponder.conf
64 endef
65
66 define Package/howl-nifd
67 $(call Package/howl/Default)
68 DEPENDS:=+libhowl
69 TITLE:=A network interface monitor daemon
70 DESCRIPTION+=\\\
71 \\\
72 This package contains a network interface monitor daemon.
73 endef
74
75 define Package/howl-utils
76 $(call Package/howl/Default)
77 DEPENDS:=+libhowl
78 TITLE+= (utilities)
79 DESCRIPTION+=\\\
80 \\\
81 This package contains mDNS (Multicast DNS) client utilities.
82 endef
83
84 define Build/Configure
85 $(call Build/Configure/Default, \
86 --enable-shared \
87 --enable-static \
88 );
89 endef
90
91 define Build/Compile
92 $(MAKE) -C $(PKG_BUILD_DIR) \
93 DESTDIR="$(PKG_INSTALL_DIR)" \
94 all install
95 endef
96
97 define Build/InstallDev
98 mkdir -p $(STAGING_DIR)/usr/include
99 $(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(STAGING_DIR)/usr/include/
100 mkdir -p $(STAGING_DIR)/usr/lib
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(STAGING_DIR)/usr/lib/
102 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(STAGING_DIR)/usr/lib/pkgconfig/
104 $(SED) 's,-I/usr/include,,g' $(STAGING_DIR)/usr/lib/pkgconfig/howl.pc
105 $(SED) 's,-L/usr/lib/howl,,g' $(STAGING_DIR)/usr/lib/pkgconfig/howl.pc
106 endef
107
108 define Build/UninstallDev
109 rm -rf $(STAGING_DIR)/usr/include/howl \
110 $(STAGING_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} \
111 $(STAGING_DIR)/usr/lib/pkgconfig/howl.pc
112 endef
113
114 define Package/libhowl/install
115 $(INSTALL_DIR) $(1)/usr/lib
116 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(1)/usr/lib/
117 endef
118
119 define Package/howl-autoipd/install
120 $(INSTALL_DIR) $(1)/usr/sbin
121 $(CP) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(1)/usr/sbin/
122 $(INSTALL_DIR) $(1)/etc/init.d
123 $(INSTALL_DATA) ./files/autoipd.init $(1)/etc/init.d/autoipd
124 endef
125
126 define Package/howl-mdnsresponder/install
127 $(INSTALL_DIR) $(1)/usr/sbin
128 $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(1)/usr/sbin/
129 $(INSTALL_DIR) $(1)/etc
130 $(INSTALL_DATA) ./files/mDNSResponder.conf $(1)/etc/mDNSResponder.conf
131 $(INSTALL_DIR) $(1)/etc/init.d
132 $(INSTALL_DATA) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder
133 endef
134
135 define Package/howl-nifd/install
136 $(INSTALL_DIR) $(1)/usr/sbin
137 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nifd $(1)/usr/sbin/
138 $(INSTALL_DIR) $(1)/etc/init.d
139 $(INSTALL_DATA) ./files/nifd.init $(1)/etc/init.d/nifd
140 endef
141
142 define Package/howl-utils/install
143 $(INSTALL_DIR) $(1)/usr/bin
144 $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(1)/usr/bin/
145 endef
146
147 $(eval $(call BuildPackage,libhowl))
148 $(eval $(call BuildPackage,howl-autoipd))
149 $(eval $(call BuildPackage,howl-mdnsresponder))
150 $(eval $(call BuildPackage,howl-nifd))
151 $(eval $(call BuildPackage,howl-utils))