summaryrefslogtreecommitdiff
path: root/package/network/utils/iputils/Makefile
blob: 1dc993cb8131013e97edcc2e253e88fcf70f616c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# 
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=iputils
PKG_VERSION:=20101006
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-s$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.skbuff.net/iputils
PKG_MD5SUM:=a36c25e9ec17e48be514dc0485e7376c

PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
PKG_LICENSE:=GPL-2.0+

PKG_BUILD_DEPENDS:=sysfsutils
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-s$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk


define Package/iputils/Default
  SECTION:=net
  CATEGORY:=Network
  URL:=http://www.skbuff.net/iputils
endef


define Package/iputils-arping
$(call Package/iputils/Default)
  TITLE:=iputils - arping
  DEPENDS+= +libsysfs
endef

define Package/iputils-arping/description
  Program arping from iputils.
  Sends ARP REQUEST to a neighbour host.
endef


define Package/iputils-clockdiff
$(call Package/iputils/Default)
  TITLE:=iputils - clockdiff
endef

define Package/iputils-clockdiff/description
  Program clockdiff from iputils.
  Measures clock difference between hosts.
endef


define Package/iputils-ping
$(call Package/iputils/Default)
  TITLE:=iputils - ping
endef

define Package/iputils-ping/description
  Program ping from iputils.
  Sends ICMP ECHO_REQUEST to network hosts (IPv4).
endef


define Package/iputils-ping6
$(call Package/iputils/Default)
  TITLE:=iputils - ping6
  DEPENDS+= @IPV6 +USE_EGLIBC:libopenssl
endef

define Package/iputils-ping6/description
  Program ping6 from iputils.
  Sends ICMP ECHO_REQUEST to network hosts (IPv6).
endef


define Package/iputils-tftpd
$(call Package/iputils/Default)
  TITLE:=iputils - tftpd
endef

define Package/iputils-tftpd/description
  Program tftpd from iputils
  Trivial File Transfer Protocol server.
endef


define Package/iputils-tracepath
$(call Package/iputils/Default)
  TITLE:=iputils - tracepath
endef

define Package/iputils-tracepath/description
  Program tracepath from iputils.
  Traces path to a network host discovering MTU along this path (IPv4).
endef


define Package/iputils-tracepath6
$(call Package/iputils/Default)
  TITLE:=iputils - tracepath6
  DEPENDS+= @IPV6
endef

define Package/iputils-tracepath6/description
  Program tracepath6 from iputils.
  Traces path to a network host discovering MTU along this path (IPv6).
endef


define Package/iputils-traceroute6
$(call Package/iputils/Default)
  TITLE:=iputils - traceroute6
  DEPENDS+= @IPV6
endef

define Package/iputils-traceroute6/description
  Program traceroute6 from iputils.
  Traces path to a network host (IPv6).
endef

ifdef CONFIG_USE_MUSL
  TARGET_CFLAGS += -D__UCLIBC__
endif

MAKE_FLAGS += \
	CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
	CONFIG_IPV6="$(CONFIG_IPV6)" \
	CONFIG_USE_UCLIBC="$(CONFIG_USE_UCLIBC)$(CONFIG_USE_MUSL)" \

define Package/iputils-arping/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/arping $(1)/usr/bin/
endef

define Package/iputils-clockdiff/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/clockdiff $(1)/usr/bin/
endef

define Package/iputils-ping/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ping $(1)/usr/bin/
endef

define Package/iputils-ping6/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ping6 $(1)/usr/bin/
endef

define Package/iputils-tftpd/install
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tftpd $(1)/usr/sbin/
endef

define Package/iputils-tracepath/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tracepath $(1)/usr/bin/
endef

define Package/iputils-tracepath6/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tracepath6 $(1)/usr/bin/
endef

define Package/iputils-traceroute6/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/traceroute6 $(1)/usr/bin/
endef

$(eval $(call BuildPackage,iputils-arping))
$(eval $(call BuildPackage,iputils-clockdiff))
$(eval $(call BuildPackage,iputils-ping))
$(eval $(call BuildPackage,iputils-tftpd))
$(eval $(call BuildPackage,iputils-tracepath))
$(eval $(call BuildPackage,iputils-ping6))
$(eval $(call BuildPackage,iputils-tracepath6))
$(eval $(call BuildPackage,iputils-traceroute6))