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.

58 lines
1.5 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:=mbtools
  9. PKG_SOURCE_DATE:=2014-10-29
  10. PKG_SOURCE_VERSION:=149e9c69cec180f18cf8781cf5285b97352bf719
  11. PKG_RELEASE:=2
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/webstack/mbtools
  14. PKG_MIRROR_HASH:=3f6a452d59a62b4f582020ebf1e371f0f0c94d99b1b056af3c4e124426a7a772
  15. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  16. PKG_LICENSE:=BSD-3-Clause
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/mbtools
  24. SECTION:=utils
  25. CATEGORY:=Utilities
  26. TITLE:=Modbus tools
  27. DEPENDS:=+glib2 +libmodbus $(INTL_DEPENDS)
  28. endef
  29. define Package/mbtools/description
  30. Modbus tools based on libmodbus to log data fetched by a master/client or
  31. received by a slave/server (writing of registers). mbcollect is able to act
  32. as client or server (in TCP or RTU)
  33. endef
  34. ifneq ($(INTL_FULL),)
  35. TARGET_LDFLAGS += \
  36. -L$(INTL_PREFIX)/lib \
  37. -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
  38. endif
  39. define Package/mbtools/install
  40. $(INSTALL_DIR) $(1)/usr/bin
  41. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbrecorder $(1)/usr/bin/
  42. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbcollect $(1)/usr/bin/
  43. $(INSTALL_DIR) $(1)/etc
  44. $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/mbcollect.ini $(1)/etc
  45. endef
  46. $(eval $(call BuildPackage,mbtools))