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.

56 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2006-2016 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.1.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://libmodbus.org/releases
  13. PKG_MD5SUM:=b1a8fd3a40d2db4de51fb0cbcb201806
  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. CONFIGURE_ARGS += --without-documentation --disable-tests
  30. TARGET_CFLAGS += $(FPIC)
  31. define Build/InstallDev
  32. $(INSTALL_DIR) $(1)/usr/include
  33. $(CP) $(PKG_INSTALL_DIR)/usr/include/modbus $(1)/usr/include/
  34. $(INSTALL_DIR) $(1)/usr/lib
  35. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.{so*,la} $(1)/usr/lib/
  36. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  37. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmodbus.pc $(1)/usr/lib/pkgconfig/
  38. endef
  39. define Package/libmodbus/install
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so* $(1)/usr/lib/
  42. endef
  43. $(eval $(call BuildPackage,libmodbus))