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.

103 lines
3.0 KiB

  1. #
  2. # Copyright (C) 2013-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:=open-plc-utils
  9. PKG_RELEASE:=2
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/qca/open-plc-utils.git
  12. PKG_SOURCE_VERSION:=32408520fcebe785983a68e39ec83830a3005779
  13. PKG_MIRROR_HASH:=b5ae48fd300f75b948a2b2a5f6cd4465b7a336495685f73100ad33a5d43a4c05
  14. PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  15. PKG_LICENSE:=ISC
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/open-plc-utils/Default
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. TITLE:=Qualcomm Atheros Power Line Communication utilities
  23. URL:=https://github.com/qca/open-plc-utils/blob/master/README
  24. endef
  25. define Package/open-plc-utils
  26. $(call Package/open-plc-utils/Default)
  27. MENU:=1
  28. endef
  29. define GenPlugin
  30. define Package/$(addprefix open-plc-utils-,$(1))
  31. $(call Package/open-plc-utils/Default)
  32. DEPENDS:=open-plc-utils
  33. TITLE:=Utility $(1) from the Open PLC utilities
  34. endef
  35. define Package/$(addprefix open-plc-utils-,$(1))/description
  36. Utility $(1) from the Open PLC utilities package.
  37. endef
  38. endef
  39. OPEN_PLC_UTILS_APPS:=efbu efeu efru efsu edru edsu nics \
  40. hpavkey hpavkeys rkey mac2pw mac2pwd \
  41. mdioblock mdioblock2 mdiodump mdiogen \
  42. hpav mme \
  43. chknvm chknvm2 nvmsplit nvmmerge \
  44. chkpib chkpib2 setpib getpib modpib pib2xml \
  45. pibcomp pibdump pibruin xml2pib psin psout pskey \
  46. psgraph psnotch pibrump \
  47. int6k int6kboot int6keth int6kf int6khost \
  48. int64host int6kid int6klist int6klog int6kmdio \
  49. int6kmdio2 int6kmod int6kstat int6ktest int6krate \
  50. int6krule int6ktone int6kwait CMEncrypt sada \
  51. coqos_add coqos_info coqos_man coqos_mod coqos_rel \
  52. mdustats ampboot amphost ampID amplist amprate amprule \
  53. ampstat amptest amptool amptone ampwait \
  54. plcboot plchost plcID plclist plcrate plcrule \
  55. plcstat plctest plctool plctone \
  56. plcwait plchostd plcget plcset plcotst plcfwd \
  57. plcdevs plclog plcmdio16 plcmdio32 \
  58. config2cfg sdram \
  59. int6kuart int6kbaud ttysig ptsctl weeder ttysend \
  60. ttyrecv ttycat int6kdetect \
  61. pev evse
  62. $(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call GenPlugin,$(a))))
  63. define Build/Compile
  64. $(MAKE) -C $(PKG_BUILD_DIR) \
  65. EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
  66. LDFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
  67. CROSS="$(TARGET_CROSS)" \
  68. ROOTFS="$(PKG_INSTALL_DIR)" \
  69. OWNER="$(shell id -u $(shell whoami))" \
  70. GROUP="$(shell id -g $(shell whoami))" \
  71. all install
  72. endef
  73. define Package/open-plc-utils/install
  74. true
  75. endef
  76. define BuildPlugin
  77. define Package/$(1)/install
  78. $(INSTALL_DIR) $$(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/$(subst open-plc-utils-,,$(1)) \
  80. $$(1)/usr/bin/
  81. endef
  82. $$(eval $$(call BuildPackage,$(1)))
  83. endef
  84. $(eval $(call BuildPackage,open-plc-utils))
  85. $(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call BuildPlugin,open-plc-utils-$(a))))