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