Makefile of luars232:

#############
#
# Copyright (C) 2007-2013 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:=luars232
PKG_VERSION:=1.0.1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_FIXUP:=libtool
include $(INCLUDE_DIR)/package.mk
PKG_INSTALL=1
define Package/luars232
  SUBMENU:=Lua
  SECTION:=lang
  CATEGORY:=Languages
  TITLE:=Lua lib for serial communication over rs-232
  DEPENDS:=+lua
endef
define Package/luars232/description
 Lua lib for serial communication over rs-232
endef
TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC)
define Build/Configure
        $(call Build/Configure/Default, \
        CFLAGS="$(TARGET_CFLAGS)" \
        )
endef
define Build/InstallDev
 $(INSTALL_DIR) $(1)/usr/include
 $(CP) $(PKG_INSTALL_DIR)/usr/include/librs232 $(1)/usr/include/
 $(INSTALL_DIR) $(1)/usr/lib/lua
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.{a,so*} $(1)/usr/lib/lua/
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.{a,so*} $(1)/usr/lib/lua/ 
 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librs232.pc $(1)/usr/lib/pkgconfig/
endef
define Package/luars232/install
 $(INSTALL_DIR) $(1)/usr/lib/lua
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.so* $(1)/usr/lib/ 
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/lua
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.so* $(1)/usr/lib/lua 
endef
$(eval $(call BuildPackage,luars232))
cd /mnt/sda1
wget -O  luars232_1.0.1_ar71xx.ipk https://www.dropbox.com/s/a56jppa64gijtmt/luars232_1.0.1_ar71xx.ipk?dl=0 --no-check-certificate
opkg update
opkg install luars232_1.0.1_ar71xx.ipk
Installing luars232 (1.0.1) to root...
Configuring luars232.