forked from openwrt/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (38 loc) · 1.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# Copyright (C) 2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luai2c
PKG_VERSION:=1.1.2
PKG_RELEASE:=4
PKG_MAINTAINER:=Frank Edelhaeuser <[email protected]>
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=1c25062e95064cda4866243ff6797ef597dd57260da559ca68129aa7a72a9cda
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mrpace2/lua-i2c.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/luai2c
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
TITLE:=Lua I2C binding
URL:=https://github.com/mrpace2/lua-i2c/
DEPENDS:=+liblua +kmod-i2c-core
MAINTAINER:=Frank Edelhaeuser <[email protected]>
endef
define Package/luai2c/description
This is the Lua binding for I2C. It provides access to I2C slaves supported by the kernel.
endef
define Package/luai2c/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/i2c.so $(1)/usr/lib/lua
$(INSTALL_DIR) $(1)/usr/lib/lua/i2c
$(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/* $(1)/usr/lib/lua/i2c
endef
$(eval $(call BuildPackage,luai2c))