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