Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # Copyright (C) 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:=luai2c
  9. PKG_VERSION:=1.0.0
  10. PKG_RELEASE:=3
  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/i2c-lua.git
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=$(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/i2c-lua/
  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))