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.

55 lines
1.3 KiB

  1. #
  2. # Copyright (C) 2006-2014 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:=libmodbus
  9. PKG_VERSION:=3.0.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://libmodbus.org/releases
  13. PKG_MD5SUM:=c80f88b6ca19cabc4ceffc195ca07771
  14. PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  15. PKG_LICENSE:=GPL-3.0+ LGPL-2.1+
  16. PKG_LICENSE_FILES:=COPYING COPYING.LESSER
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libmodbus
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. URL:=http://www.libmodbus.org
  24. TITLE:=libmodbus
  25. endef
  26. define Package/libmodbus/description
  27. A Modbus library for Linux, Mac OS X, FreeBSD, QNX and Win32.
  28. endef
  29. TARGET_CFLAGS += $(FPIC)
  30. define Build/InstallDev
  31. $(INSTALL_DIR) $(1)/usr/include
  32. $(CP) $(PKG_INSTALL_DIR)/usr/include/modbus $(1)/usr/include/
  33. $(INSTALL_DIR) $(1)/usr/lib
  34. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.{so*,la} $(1)/usr/lib/
  35. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  36. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmodbus.pc $(1)/usr/lib/pkgconfig/
  37. endef
  38. define Package/libmodbus/install
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so* $(1)/usr/lib/
  41. endef
  42. $(eval $(call BuildPackage,libmodbus))