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.

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