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.

76 lines
1.8 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_RELEASE=2
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/linux-can/can-utils
  12. PKG_SOURCE_DATE:=2017-02-16
  13. PKG_SOURCE_VERSION:=cb33a55720716cbe01e6025a2bda74a1b7e492d3
  14. PKG_MIRROR_HASH:=d9c01eeff3d81a28161ca5c3937ec005a1f49ca3eb97bee0164d53cc66365786
  15. PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_FIXUP:=autoreconf
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/canutils/Default
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. URL:=https://github.com/linux-can/can-utils
  23. TITLE:=CAN userspace utilities and tools
  24. endef
  25. define Package/canutils
  26. $(call Package/canutils/Default)
  27. MENU:=1
  28. endef
  29. define GenPlugin
  30. define Package/$(addprefix canutils-,$(1))
  31. $(call Package/canutils/Default)
  32. DEPENDS:=canutils
  33. TITLE:=Utility $(1) from the CAN utilities
  34. endef
  35. define Package/$(addprefix canutils-,$(1))/description
  36. Utility $(1) from the CAN utilities package.
  37. endef
  38. endef
  39. FILES:=canbusload can-calc-bit-timing candump \
  40. cangen cangw canplayer cansniffer cansend \
  41. canfdtest asc2log log2asc log2long bcmserver \
  42. canlogserver isotpdump isotpperf isotprecv \
  43. isotpsend isotpserver isotpsniffer isotptun \
  44. slcan_attach slcand slcanpty
  45. $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a))))
  46. define Package/canutils/install
  47. true
  48. endef
  49. define PartInstall
  50. define Package/canutils-$(1)/install
  51. $(INSTALL_DIR) $$(1)/usr/bin
  52. $(INSTALL_BIN) \
  53. $(PKG_BUILD_DIR)/$(1) \
  54. $$(1)/usr/bin/
  55. endef
  56. endef
  57. $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
  58. $(eval $(call BuildPackage,canutils))
  59. $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))