luaposix: update to v31
[openwrt/svn-archive/archive.git] / lang / luaposix / Makefile
1 #
2 # Copyright (C) 2011 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:=luaposix
11 PKG_VERSION:=v31
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=release-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/
16 PKG_MD5SUM:=a25ff76d54bbbebf7a1f3b20c9806ee3
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/luaposix
22 SUBMENU:=Lua
23 SECTION:=lang
24 CATEGORY:=Languages
25 TITLE:=luaposix
26 URL:=http://luaforge.net/projects/luaposix/
27 DEPENDS:=+lua +librt +luabitop
28 PKG_BUILD_DEPENDS:=+lua/host
29 endef
30
31 define Package/luaposix/description
32 luaposix is a general POSIX library for Lua providing access
33 to various low level libc functions.
34 endef
35
36 define Build/Configure
37 cd $(PKG_BUILD_DIR) && ./bootstrap
38 $(call Build/Configure/Default)
39 endef
40
41 TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99
42
43 ifneq ($(CONFIG_USE_EGLIBC),)
44 ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
45 TARGET_CFLAGS += -DNO_GETLOGIN
46 endif
47 endif
48
49
50 define Package/luaposix/install
51 $(INSTALL_DIR) $(1)/usr/lib/lua
52 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix_c.so $(1)/usr/lib/lua
53 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua
54 endef
55
56 $(eval $(call BuildPackage,luaposix))