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.

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