97e3990a3a7fefc643b55956bd3d883d894954c6
[openwrt/staging/chunkeey.git] / package / network / utils / iputils / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=iputils
11 PKG_VERSION:=20101006
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-s$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.skbuff.net/iputils
16 PKG_MD5SUM:=a36c25e9ec17e48be514dc0485e7376c
17
18 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
19 PKG_LICENSE:=GPL-2.0+
20
21 PKG_LICENSE:=GPL-2.0+ BSD-4-Clause
22 PKG_LICENSE_FILES:=
23
24 PKG_BUILD_DEPENDS:=sysfsutils
25 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-s$(PKG_VERSION)
26
27 include $(INCLUDE_DIR)/package.mk
28
29
30 define Package/iputils/Default
31 SECTION:=net
32 CATEGORY:=Network
33 URL:=http://www.skbuff.net/iputils
34 endef
35
36
37 define Package/iputils-arping
38 $(call Package/iputils/Default)
39 TITLE:=iputils - arping
40 DEPENDS+= +libsysfs
41 endef
42
43 define Package/iputils-arping/description
44 Program arping from iputils.
45 Sends ARP REQUEST to a neighbour host.
46 endef
47
48
49 define Package/iputils-clockdiff
50 $(call Package/iputils/Default)
51 TITLE:=iputils - clockdiff
52 endef
53
54 define Package/iputils-clockdiff/description
55 Program clockdiff from iputils.
56 Measures clock difference between hosts.
57 endef
58
59
60 define Package/iputils-ping
61 $(call Package/iputils/Default)
62 TITLE:=iputils - ping
63 endef
64
65 define Package/iputils-ping/description
66 Program ping from iputils.
67 Sends ICMP ECHO_REQUEST to network hosts (IPv4).
68 endef
69
70
71 define Package/iputils-ping6
72 $(call Package/iputils/Default)
73 TITLE:=iputils - ping6
74 DEPENDS+= @IPV6 +USE_EGLIBC:libopenssl
75 endef
76
77 define Package/iputils-ping6/description
78 Program ping6 from iputils.
79 Sends ICMP ECHO_REQUEST to network hosts (IPv6).
80 endef
81
82
83 define Package/iputils-tftpd
84 $(call Package/iputils/Default)
85 TITLE:=iputils - tftpd
86 endef
87
88 define Package/iputils-tftpd/description
89 Program tftpd from iputils
90 Trivial File Transfer Protocol server.
91 endef
92
93
94 define Package/iputils-tracepath
95 $(call Package/iputils/Default)
96 TITLE:=iputils - tracepath
97 endef
98
99 define Package/iputils-tracepath/description
100 Program tracepath from iputils.
101 Traces path to a network host discovering MTU along this path (IPv4).
102 endef
103
104
105 define Package/iputils-tracepath6
106 $(call Package/iputils/Default)
107 TITLE:=iputils - tracepath6
108 DEPENDS+= @IPV6
109 endef
110
111 define Package/iputils-tracepath6/description
112 Program tracepath6 from iputils.
113 Traces path to a network host discovering MTU along this path (IPv6).
114 endef
115
116
117 define Package/iputils-traceroute6
118 $(call Package/iputils/Default)
119 TITLE:=iputils - traceroute6
120 DEPENDS+= @IPV6
121 endef
122
123 define Package/iputils-traceroute6/description
124 Program traceroute6 from iputils.
125 Traces path to a network host (IPv6).
126 endef
127
128 ifdef CONFIG_USE_MUSL
129 TARGET_CFLAGS += -D__UCLIBC__
130 endif
131
132 MAKE_FLAGS += \
133 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
134 CONFIG_IPV6="$(CONFIG_IPV6)" \
135 CONFIG_USE_UCLIBC="$(CONFIG_USE_UCLIBC)$(CONFIG_USE_MUSL)" \
136
137 define Package/iputils-arping/install
138 $(INSTALL_DIR) $(1)/usr/bin
139 $(INSTALL_BIN) $(PKG_BUILD_DIR)/arping $(1)/usr/bin/
140 endef
141
142 define Package/iputils-clockdiff/install
143 $(INSTALL_DIR) $(1)/usr/bin
144 $(INSTALL_BIN) $(PKG_BUILD_DIR)/clockdiff $(1)/usr/bin/
145 endef
146
147 define Package/iputils-ping/install
148 $(INSTALL_DIR) $(1)/usr/bin
149 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ping $(1)/usr/bin/
150 endef
151
152 define Package/iputils-ping6/install
153 $(INSTALL_DIR) $(1)/usr/bin
154 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ping6 $(1)/usr/bin/
155 endef
156
157 define Package/iputils-tftpd/install
158 $(INSTALL_DIR) $(1)/usr/sbin
159 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tftpd $(1)/usr/sbin/
160 endef
161
162 define Package/iputils-tracepath/install
163 $(INSTALL_DIR) $(1)/usr/bin
164 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tracepath $(1)/usr/bin/
165 endef
166
167 define Package/iputils-tracepath6/install
168 $(INSTALL_DIR) $(1)/usr/bin
169 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tracepath6 $(1)/usr/bin/
170 endef
171
172 define Package/iputils-traceroute6/install
173 $(INSTALL_DIR) $(1)/usr/bin
174 $(INSTALL_BIN) $(PKG_BUILD_DIR)/traceroute6 $(1)/usr/bin/
175 endef
176
177 $(eval $(call BuildPackage,iputils-arping))
178 $(eval $(call BuildPackage,iputils-clockdiff))
179 $(eval $(call BuildPackage,iputils-ping))
180 $(eval $(call BuildPackage,iputils-tftpd))
181 $(eval $(call BuildPackage,iputils-tracepath))
182 $(eval $(call BuildPackage,iputils-ping6))
183 $(eval $(call BuildPackage,iputils-tracepath6))
184 $(eval $(call BuildPackage,iputils-traceroute6))