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.

77 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_VERSION:=0e3ff3b3157e456d4b6343f5d4b42ef692bce538
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
  15. PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
  16. PKG_LICENSE:=GPL-2.0+
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
  18. PKG_FIXUP:=autoreconf
  19. include $(INCLUDE_DIR)/package.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. DEPENDS:=canutils
  34. TITLE:=Utility $(1) from the CAN utilities
  35. endef
  36. define Package/$(addprefix canutils-,$(1))/description
  37. Utility $(1) from the CAN utilities package.
  38. endef
  39. endef
  40. FILES:=canbusload can-calc-bit-timing candump \
  41. cangen cangw canplayer cansniffer cansend \
  42. canfdtest asc2log log2asc log2long bcmserver \
  43. canlogserver isotpdump isotpperf isotprecv \
  44. isotpsend isotpserver isotpsniffer isotptun \
  45. slcan_attach slcand slcanpty
  46. $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a))))
  47. define Package/canutils/install
  48. true
  49. endef
  50. define PartInstall
  51. define Package/canutils-$(1)/install
  52. $(INSTALL_DIR) $$(1)/usr/bin
  53. $(INSTALL_BIN) \
  54. $(PKG_BUILD_DIR)/$(1) \
  55. $$(1)/usr/bin/
  56. endef
  57. endef
  58. $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
  59. $(eval $(call BuildPackage,canutils))
  60. $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))