Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #
  2. # Copyright (C) 2009 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=luaexpat
  9. PKG_VERSION:=1.3.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://matthewwild.co.uk/projects/luaexpat
  13. PKG_MD5SUM:=3c20b5795e7107f847f8da844fbfe2da
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/luaexpat
  16. SUBMENU:=Lua
  17. SECTION:=lang
  18. CATEGORY:=Languages
  19. TITLE:=LuaExpat
  20. URL:=http://matthewwild.co.uk/projects/luaexpat/
  21. MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  22. DEPENDS:=+lua +libexpat
  23. endef
  24. define Package/luaexpat/description
  25. LuaExpat is a SAX XML parser based on the Expat library.
  26. endef
  27. define Build/Configure
  28. endef
  29. define Build/Compile
  30. $(CP) files/compat-5.1r5 $(PKG_BUILD_DIR)/compat-5.1r5
  31. $(MAKE) -C $(PKG_BUILD_DIR) \
  32. EXPAT_INC="-I$(STAGING_DIR)/usr/include/" \
  33. LUA_INC="-I$(STAGING_DIR)/usr/include/" \
  34. LUA_LIBDIR="$(STAGING_DIR)/usr/lib/" \
  35. COMPAT_DIR="$(PKG_BUILD_DIR)/compat-5.1r5" \
  36. LDFLAGS="-shared $(TARGET_LDFLAGS)" \
  37. CC="$(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -std=c99" \
  38. LD="$(TARGET_CROSS)ld -shared"
  39. endef
  40. define Package/luaexpat/install
  41. $(INSTALL_DIR) $(1)/usr/lib/lua
  42. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp.so $(1)/usr/lib/lua/lxp.so
  43. $(INSTALL_DIR) $(1)/usr/lib/lua/lxp
  44. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(1)/usr/lib/lua/lxp
  45. endef
  46. $(eval $(call BuildPackage,luaexpat))