[packages] package luaposix, the general Lua POSIX library
[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:=5.1.11
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/4813
16 PKG_MD5SUM:=edb76911dbdabe98dec49e3d8a126227
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
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://luaposix.luaforge.net/
27 DEPENDS:=+lua
28 endef
29
30 define Package/luaposix/description
31 luaposix is a general POSIX library for Lua providing access
32 to various low level libc functions.
33 endef
34
35 define Build/Configure
36 endef
37
38 TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99
39
40 ifneq ($(CONFIG_USE_EGLIBC),)
41 ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
42 TARGET_CFLAGS += -DNO_GETLOGIN
43 endif
44 endif
45
46
47 define Package/luaposix/install
48 $(INSTALL_DIR) $(1)/usr/lib/lua
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/posix.so $(1)/usr/lib/lua
50 endef
51
52 $(eval $(call BuildPackage,luaposix))