2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_MAINTAINER
:=Dirk Chang
<dirk@kooiot.com
>
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_MIRROR_HASH
:=fb2f6453537e10beb2cd99d30eb1b4259ab75452992ca8a65d621186cf320960
18 PKG_SOURCE_URL
:=https
://github.com
/srdgame
/librs232.git
20 PKG_SOURCE_VERSION
:=a9d463181e7f7034fe6a55bc38e845fb04fa93ba
21 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/lua-rs232
31 TITLE
:=Lua Serial Library
32 URL
:=https
://github.com
/srdgame
/librs232
36 define Package
/lua-rs232
/description
37 multiplatform library for serial communications over RS-232
41 --with-lua-inc
=$(STAGING_DIR
)/usr
/include \
42 --with-lua-lib
=$(STAGING_DIR
)/usr
/lib
44 #define Build/Configure
45 # ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh )
46 # $(call Build/Configure/Default)
48 define Build
/Configure
52 (cd
"$(PKG_BUILD_DIR)"; $(TARGET_CC
) src
/rs232.c src
/rs232_posix.c bindings
/lua
/luars232.c
-DLUAROCKS_HACK
-std
=gnu99
-I.
/include -I
$(STAGING_DIR
)/usr
/include -L
$(STAGING_DIR
)/usr
/lib
-fPIC
-shared
-o luars232.so
)
58 define Package
/lua-rs232
/install
59 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
60 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/luars232.so
$(1)/usr
/lib
/lua
/
63 $(eval
$(call BuildPackage
,lua-rs232
))