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.

45 lines
1.1 KiB

  1. #
  2. # Copyright (C) 2017 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:=luai2c
  9. PKG_VERSION:=1.1.2
  10. PKG_RELEASE:=4
  11. PKG_MAINTAINER:=Frank Edelhaeuser <mrpace2@gmail.com>
  12. PKG_LICENSE:=MIT
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL:=https://github.com/mrpace2/lua-i2c.git
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/luai2c
  20. SUBMENU:=Lua
  21. SECTION:=lang
  22. CATEGORY:=Languages
  23. TITLE:=Lua I2C binding
  24. URL:=https://github.com/mrpace2/lua-i2c/
  25. DEPENDS:=+liblua +kmod-i2c-core
  26. MAINTAINER:=Frank Edelhaeuser <mrpace2@gmail.com>
  27. endef
  28. define Package/luai2c/description
  29. This is the Lua binding for I2C. It provides access to I2C slaves supported by the kernel.
  30. endef
  31. define Package/luai2c/install
  32. $(INSTALL_DIR) $(1)/usr/lib/lua
  33. $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2c.so $(1)/usr/lib/lua
  34. $(INSTALL_DIR) $(1)/usr/lib/lua/i2c
  35. $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/* $(1)/usr/lib/lua/i2c
  36. endef
  37. $(eval $(call BuildPackage,luai2c))