[packages] Various Makefile cleanups.
[openwrt/svn-archive/archive.git] / net / net-tools / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=net-tools
11 PKG_VERSION:=1.60
12 PKG_RELEASE:=1
13
14 PKG_MD5SUM:=888774accab40217dde927e21979c165
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.tazenda.demon.co.uk/phil/net-tools/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/net-tools
21 SECTION:=net
22 CATEGORY:=Network
23 TITLE:=Original net-tools
24 URL:=http://www.tazenda.demon.co.uk/phil/net-tools/
25 endef
26
27 define Package/net-tools/description
28 The net-tools package contains usual linux commands:
29 arp, hostname, ipmaddr, iptunnel, mii-tool, nameif, netstat, plipconfig, rarp,
30 route and slattach.
31 endef
32
33 define Build/Compile
34 $(MAKE) -C $(PKG_BUILD_DIR) \
35 CC="$(TARGET_CC)" \
36 COPTS="$(TARGET_CFLAGS)"
37 endef
38
39 define Package/net-tools/install
40 $(INSTALL_DIR) $(1)/bin
41 $(INSTALL_BIN) $(PKG_BUILD_DIR)/netstat $(1)/bin/
42 $(INSTALL_DIR) $(1)/sbin
43 $(INSTALL_BIN) $(PKG_BUILD_DIR)/route $(1)/sbin/
44 $(INSTALL_DIR) $(1)/usr/sbin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/arp $(1)/usr/sbin/
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostname $(1)/usr/sbin/
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipmaddr $(1)/usr/sbin/
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iptunnel $(1)/usr/sbin/
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nameif $(1)/usr/sbin/
51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/plipconfig $(1)/usr/sbin/
52 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rarp $(1)/usr/sbin/
53 $(INSTALL_BIN) $(PKG_BUILD_DIR)/slattach $(1)/usr/sbin/
54 endef
55
56 # FIXME: check if commands are really provided by busybox (busybox | grep <name>)
57 define Package/net-tools/postrm
58 #!/bin/sh
59 ln -sf busybox $${IPKG_INSTROOT}/bin/netstat
60 ln -sf ../bin/busybox $${IPKG_INSTROOT}/sbin/route
61 endef
62
63 $(eval $(call BuildPackage,net-tools))