@ -8,19 +8,22 @@
i n c l u d e $( TOPDIR ) / r u l e s . m k
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := lua-rs232
PKG_NAME := lua-rs232
PKG_VERSION := 1.0.3
PKG_RELEASE := 2
PKG_MAINTAINER := Dirk Chang <dirk@kooiot.com>
PKG_LICENSE := MIT
PKG_RELEASE := 1
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_MIRROR_HASH := fb2f6453537e10beb2cd99d30eb1b4259ab75452992ca8a65d621186cf320960
PKG_SOURCE_URL := https://github.com/srdgame/librs232.git
PKG_SOURCE_PROTO := git
PKG_SOURCE_PROTO := git
PKG_SOURCE_VERSION := a9d463181e7f7034fe6a55bc38e845fb04fa93ba
PKG_SOURCE_SUBDIR := $( PKG_NAME) -$( PKG_VERSION)
PKG_SOURCE_URL := https://github.com/srdgame/librs232
PKG_SOURCE_DATE := 2019-09-17
PKG_SOURCE_VERSION := 1c29a279484ee4850611b76a6571566e0ec133bb
PKG_MIRROR_HASH := c9063a729935135278f17dd98ca31757acfd4405bdf9f6e49d77ed0df8ddc823
PKG_MAINTAINER := Dirk Chang <dirk@kooiot.com>
PKG_LICENSE := MIT
PKG_LICENSE_FILES := COPYING
PKG_FIXUP := autoreconf
PKG_INSTALL := 1
PKG_INSTALL := 1
PKG_BUILD_PARALLEL := 1
PKG_BUILD_DEPENDS := lua/host
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
@ -37,27 +40,25 @@ define Package/lua-rs232/description
multiplatform library for serial communications over RS-232
multiplatform library for serial communications over RS-232
e n d e f
e n d e f
CONFIGURE_ARGS += \
--with-lua-inc= $( STAGING_DIR) /usr/include \
--with-lua-lib= $( STAGING_DIR) /usr/lib
#define Build/Configure
# ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh )
# $(call Build/Configure/Default)
#endef
d e f i n e B u i l d / C o n f i g u r e
e n d e f
d e f i n e B u i l d / C o m p i l e
( 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)
e n d e f
TARGET_CFLAGS += -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
d e f i n e B u i l d / I n s t a l l
d e f i n e B u i l d / I n s t a l l D e v
$( INSTALL_DIR) $( 1) /usr/include/librs232
$( INSTALL_DATA) $( PKG_INSTALL_DIR) /usr/include/librs232/rs232* $( 1) /usr/include/librs232
$( INSTALL_DIR) $( 1) /usr/lib
$( CP) $( PKG_INSTALL_DIR) /usr/lib/librs232* $( 1) /usr/lib/
$( INSTALL_DIR) $( 1) /usr/lib/lua/5.1
$( INSTALL_DATA) $( PKG_INSTALL_DIR) /usr/lib/lua/5.1/luars232* $( 1) /usr/lib/lua/5.1
$( INSTALL_DIR) $( 1) /usr/lib/pkgconfig
$( INSTALL_DATA) $( PKG_INSTALL_DIR) /usr/lib/pkgconfig/librs232.pc $( 1) /usr/lib/pkgconfig
e n d e f
e n d e f
d e f i n e P a c k a g e / l u a - r s 2 3 2 / i n s t a l l
d e f i n e P a c k a g e / l u a - r s 2 3 2 / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/lib/lua
$( INSTALL_BIN) $( PKG_BUILD_DIR) /luars232.so $( 1) /usr/lib/lua/
$( INSTALL_DIR) $( 1) /usr/lib/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/librs232.so* $( 1) /usr/lib/
$( INSTALL_DIR) $( 1) /usr/lib/lua/5.1
$( INSTALL_DATA) $( PKG_INSTALL_DIR) /usr/lib/lua/5.1/luars232* $( 1) /usr/lib/lua/5.1
e n d e f
e n d e f
$( eval $ ( call BuildPackage ,lua -rs 232) )
$( eval $ ( call BuildPackage ,lua -rs 232) )