Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Copyright (C) 2006-2010 OpenWrt.org
  3. # Copyright (C) 2016 Stijn Segers
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=mii-tool
  10. PKG_VERSION=2016-10-06-$(PKG_SOURCE_VERSION)
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=git://git.code.sf.net/p/net-tools/code
  14. PKG_SOURCE_VERSION:=115f1af2494ded1fcd21c8419d5e289bc4df380f
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  17. PKG_LICENSE:=GPL-2.0
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_MAINTAINER:=Stijn Segers <borromini.reg@protonmail.com>
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/mii-tool
  22. SECTION:=net
  23. CATEGORY:=Network
  24. TITLE:=configure media type using MII commands
  25. URL:=http://net-tools.sourceforge.net/
  26. endef
  27. define Package/mii-tool/description
  28. The mii-tool command allows you to set or autodetect the media type
  29. or mii chipset-based ethernet devices. It traditionally had been
  30. distributed in the net-tools package. This is a single distribution
  31. optimized for embedded systems and fully automated cross/-sysroot-builds
  32. endef
  33. define Build/Configure
  34. # Failed configure.sh leaves stub config.h around.
  35. rm -f $(PKG_BUILD_DIR)/config.h
  36. ( cd $(PKG_BUILD_DIR); yes $$$$'\n' | ./configure.sh config.in )
  37. endef
  38. define Package/mii-tool/install
  39. $(INSTALL_DIR) $(1)/usr/sbin
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/
  41. endef
  42. $(eval $(call BuildPackage,mii-tool))