[packages] luaexpat: compile with -fPIC
[openwrt/svn-archive/archive.git] / lang / luaexpat / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=luaexpat
11 PKG_VERSION:=1.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2469
16 PKG_MD5SUM:=6ecb895ccf5cff1e7f2facd438b1f8d0
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/luaexpat
21 SUBMENU:=Lua
22 SECTION:=lang
23 CATEGORY:=Languages
24 TITLE:=LuaExpat
25 URL:=http://www.keplerproject.org/luaexpat/
26 DEPENDS:=+lua +libexpat
27 endef
28
29 define Package/luaexpat/description
30 LuaExpat is a SAX XML parser based on the Expat library.
31 endef
32
33 define Build/Configure
34 endef
35
36 define Build/Compile
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 $(TARGET_LDFLAGS)" \
44 CC="$(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -std=c99" \
45 LD="$(TARGET_CROSS)ld -shared"
46 endef
47
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
53 endef
54
55 $(eval $(call BuildPackage,luaexpat))