You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  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:=canutils
  9. PKG_VERSION:=2020.12.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/linux-can/can-utils/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=c5c22a00ce2ea7578d7617ac0affef8f47a349be58e708780d703b979f324a2b
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/can-utils-$(PKG_VERSION)
  15. PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../../devel/ninja/ninja-cmake.mk
  20. define Package/canutils/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. URL:=https://github.com/linux-can/can-utils
  24. TITLE:=CAN userspace utilities and tools
  25. endef
  26. define Package/canutils
  27. $(call Package/canutils/Default)
  28. MENU:=1
  29. endef
  30. define GenPlugin
  31. define Package/$(addprefix canutils-,$(1))
  32. $(call Package/canutils/Default)
  33. TITLE:=Utility $(1) from the CAN utilities
  34. DEPENDS:=canutils
  35. endef
  36. define Package/$(addprefix canutils-,$(1))/description
  37. Utility $(1) from the CAN utilities package.
  38. endef
  39. endef
  40. FILES:= \
  41. asc2log bcmserver canbusload can-calc-bit-timing \
  42. candump canfdtest cangen cangw canlogserver canplayer \
  43. cansend cansniffer isotpdump isotpperf isotprecv isotpsend \
  44. isotpserver isotpsniffer isotptun j1939acd j1939cat j1939spy j1939sr \
  45. log2asc log2long slcan_attach slcand slcanpty testj1939
  46. $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a))))
  47. define PartInstall
  48. define Package/canutils-$(1)/install
  49. $(INSTALL_DIR) $$(1)/usr/bin
  50. $(INSTALL_BIN) \
  51. $(PKG_INSTALL_DIR)/usr/bin/$(1) \
  52. $$(1)/usr/bin/
  53. endef
  54. endef
  55. $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
  56. define Package/canutils/install
  57. true
  58. endef
  59. $(eval $(call BuildPackage,canutils))
  60. $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))