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