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.

78 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.02.04
  10. PKG_RELEASE:=4
  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:=a766aad89955b9cfcca27f61ef988fa169565c3657d2789808c0f33a7afa23c8
  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. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/canutils/Default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. URL:=https://github.com/linux-can/can-utils
  25. TITLE:=CAN userspace utilities and tools
  26. endef
  27. define Package/canutils
  28. $(call Package/canutils/Default)
  29. MENU:=1
  30. endef
  31. define GenPlugin
  32. define Package/$(addprefix canutils-,$(1))
  33. $(call Package/canutils/Default)
  34. TITLE:=Utility $(1) from the CAN utilities
  35. DEPENDS:=canutils
  36. endef
  37. define Package/$(addprefix canutils-,$(1))/description
  38. Utility $(1) from the CAN utilities package.
  39. endef
  40. endef
  41. FILES:= \
  42. asc2log bcmserver canbusload can-calc-bit-timing \
  43. candump canfdtest cangen cangw canlogserver canplayer \
  44. cansend cansniffer isotpdump isotpperf isotprecv isotpsend \
  45. isotpserver isotpsniffer isotptun jacd jcat jspy jsr \
  46. log2asc log2long slcan_attach slcand slcanpty testj1939
  47. $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a))))
  48. define PartInstall
  49. define Package/canutils-$(1)/install
  50. $(INSTALL_DIR) $$(1)/usr/bin
  51. $(INSTALL_BIN) \
  52. $(PKG_INSTALL_DIR)/usr/bin/$(1) \
  53. $$(1)/usr/bin/
  54. endef
  55. endef
  56. $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
  57. define Package/canutils/install
  58. true
  59. endef
  60. $(eval $(call BuildPackage,canutils))
  61. $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))