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.

64 lines
1.8 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:=lua-rs232
  9. PKG_SOURCE_DATE:=2019-11-20
  10. PKG_SOURCE_VERSION:=c106c94d1a5a84e8582c936528303528608776c2
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/srdgame/librs232
  14. PKG_MIRROR_HASH:=6fcabfd1501b3a7719229334ce73f1cc74f5ac5795b8faf6d65eb2ae6b14f9a5
  15. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  16. PKG_LICENSE:=MIT
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_BUILD_DEPENDS:=lua/host
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/lua-rs232
  24. SUBMENU:=Lua
  25. SECTION:=lang
  26. CATEGORY:=Languages
  27. TITLE:=Lua Serial Library
  28. URL:=https://github.com/srdgame/librs232
  29. DEPENDS:= +lua
  30. endef
  31. define Package/lua-rs232/description
  32. multiplatform library for serial communications over RS-232
  33. endef
  34. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  35. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  36. define Build/InstallDev
  37. $(INSTALL_DIR) $(1)/usr/include/librs232
  38. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/librs232/rs232* $(1)/usr/include/librs232
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232* $(1)/usr/lib/
  41. $(INSTALL_DIR) $(1)/usr/lib/lua
  42. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/luars232* $(1)/usr/lib/lua
  43. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  44. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librs232.pc $(1)/usr/lib/pkgconfig
  45. endef
  46. define Package/lua-rs232/install
  47. $(INSTALL_DIR) $(1)/usr/lib/
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/
  49. $(INSTALL_DIR) $(1)/usr/lib/lua
  50. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/luars232* $(1)/usr/lib/lua
  51. endef
  52. $(eval $(call BuildPackage,lua-rs232))