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.

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