Port ethtool to -ng
[openwrt/svn-archive/archive.git] / net / ethtool / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ethtool
12 PKG_VERSION:=3
13 PKG_RELEASE:=0
14 PKG_MD5SUM:=b4e71f7fa2629250677eefcb338442c5
15
16 PKG_SOURCE_URL:=@SF/gkernel
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/ethtool
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=Display or change ethernet card settings
29 DESCRIPTION:=ethtool is used for querying settings of an ethernet device and changing them
30 URL:=http://sourceforge.net/projects/gkernel/
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default)
35 endef
36
37 define Build/Compile
38 rm -rf $(PKG_INSTALL_DIR)
39 mkdir -p $(PKG_INSTALL_DIR)
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 $(TARGET_CONFIGURE_OPTS) \
42 DESTDIR="$(PKG_INSTALL_DIR)" \
43 all install
44 endef
45
46 define Package/ethtool/install
47 install -d -m0755 $(1)/usr/sbin
48 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
49 endef
50
51 $(eval $(call BuildPackage,ethtool))