[packages] Added posix library for Lua: lang/luaposix
[openwrt/svn-archive/archive.git] / lang / luaposix / Makefile
1 # Copyright (C) 2008 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=luaposix
11 PKG_VERSION:=5.1.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/3063
16 PKG_MD5SUM:=31deeb4add91f76b3c2d36aae2888d81
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
19 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/luaposix
24 SECTION:=lang
25 CATEGORY:=Languages
26 SUBMENU:=LUA
27 TITLE:=Posix library for Lua
28 URL:=http://luaforge.net/projects/luaposix/
29 DEPENDS:=+liblua
30 endef
31
32 define Build/Configure
33 endef
34
35 define Build/Compile
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 CC="$(TARGET_CROSS)gcc" \
38 LD="$(TARGET_CROSS)ld" \
39 AR="$(TARGET_CROSS)ar rcu" \
40 RANLIB="$(TARGET_CROSS)ranlib" \
41 INSTALL_ROOT=/usr \
42 LUAINC=$(STAGING_DIR)/usr/include
43 $(STRIP) $(PKG_BUILD_DIR)/posix.so
44 endef
45
46 define Package/luaposix/install
47 $(INSTALL_DIR) $(1)/usr/lib/lua
48 $(CP) $(PKG_BUILD_DIR)/posix.so $(1)/usr/lib/lua
49 endef
50
51 $(eval $(call BuildPackage,luaposix))