2 # Copyright (C) 2009 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
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2469
16 PKG_MD5SUM:=6ecb895ccf5cff1e7f2facd438b1f8d0
18 include $(INCLUDE_DIR)/package.mk
20 define Package/luaexpat
25 URL:=http://www.keplerproject.org/luaexpat/
26 DEPENDS:=lua +libexpat
29 define Package/luaexpat/description
30 LuaExpat is a SAX XML parser based on the Expat library.
33 define Build/Configure
37 $(CP) files/compat-5.1r5 $(PKG_BUILD_DIR)/compat-5.1r5
38 $(MAKE) -C $(PKG_BUILD_DIR) \
39 EXPAT_INC="$(STAGING_DIR)/usr/include/" \
40 LUA_INC="$(STAGING_DIR)/usr/include/" \
41 LUA_LIBDIR="$(STAGING_DIR)/usr/lib/" \
42 COMPAT_DIR="$(PKG_BUILD_DIR)/compat-5.1r5" \
43 LIB_OPTION="-shared -L$(STAGING_DIR)/usr/lib/" \
44 CC="$(TARGET_CC) $(TARGET_CFLAGS)" \
45 LD="$(TARGET_CROSS)ld -shared"
48 define Package/luaexpat/install
49 $(INSTALL_DIR) $(1)/usr/lib/lua
50 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp.so.1.1.0 $(1)/usr/lib/lua/lxp.so
51 $(INSTALL_DIR) $(1)/usr/lib/lua/lxp
52 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(1)/usr/lib/lua/lxp
55 $(eval $(call BuildPackage,luaexpat))