Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #
  2. # Copyright (C) 2014 Mikeqin <Fengling.Qin@gmail.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mm-tools
  9. PKG_VERSION:=git-$(shell git ls-remote https://github.com/Canaan-Creative/Avalon-extras master | cut -f1 | cut -c1-7)
  10. PKG_REV:=master
  11. PKG_RELEASE:=1
  12. PKG_INSTALL:=1
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
  14. PKG_SOURCE_URL:=https://github.com/Canaan-Creative/Avalon-extras.git
  15. PKG_SOURCE_PROTO:=git
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=$(PKG_REV)
  18. PKG_FIXUP:=autoreconf
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)
  20. PKG_UNPACK_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  21. include $(INCLUDE_DIR)/package.mk
  22. PKG_UNPACK := $(SH_FUNC) $(call UNPACK_CMD,$(PKG_UNPACK_DIR)) $(call CRLF_CMD, $(PKG_UNPACK_DIR))
  23. define Package/mm-tools/Default
  24. MAINTAINER:="Mikeqin" <Fengling.Qin@gmail.com>
  25. SECTION:=utils
  26. CATEGORY:=Utilities
  27. TITLE:=mm-tools
  28. URL:=https://github.com/Creative-Canaan/Avalon-extras.git
  29. DEPENDS:=+libpthread +udev
  30. endef
  31. define Package/mm-tools/description
  32. mm-tools is a tool to reflash MM firmware for Avalon4, Support Raspberry Pi B only.
  33. endef
  34. define Package/mm-tools
  35. $(call Package/mm-tools/Default)
  36. TITLE+=(for Avalon4)
  37. endef
  38. define Build/Install
  39. @echo "Install nothing, Ignore install error"
  40. endef
  41. define Package/mm-tools/install
  42. $(INSTALL_DIR) $(1)/usr/bin
  43. cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin
  44. endef
  45. $(eval $(call BuildPackage,mm-tools))