2009-04-09 14:01:24 +00:00
|
|
|
#
|
2010-01-01 17:36:31 +00:00
|
|
|
# Copyright (C) 2008-2010 OpenWrt.org
|
2009-04-09 14:01:24 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=luafilesystem
|
2010-02-05 10:58:19 +00:00
|
|
|
PKG_REV:=8ff20138af779f6f38cbff12d22df1a3151d9fa6
|
|
|
|
PKG_VERSION:=1.5.0
|
|
|
|
PKG_RELEASE:=1
|
2009-04-09 14:01:24 +00:00
|
|
|
|
2010-02-05 10:58:19 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
|
|
PKG_SOURCE_URL:=git://github.com/keplerproject/luafilesystem.git
|
|
|
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
2009-04-09 14:01:24 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2010-01-01 17:36:31 +00:00
|
|
|
define Package/luafilesystem
|
2009-04-25 20:36:30 +00:00
|
|
|
SUBMENU:=Lua
|
2009-04-09 14:01:24 +00:00
|
|
|
SECTION:=lang
|
|
|
|
CATEGORY:=Languages
|
2009-04-25 20:36:30 +00:00
|
|
|
TITLE:=LuaFileSystem
|
2010-02-05 10:58:19 +00:00
|
|
|
URL:=http://keplerproject.github.com/luafilesystem/
|
2009-04-09 14:01:24 +00:00
|
|
|
DEPENDS:=+liblua
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/luafilesystem/description
|
2009-04-25 20:36:30 +00:00
|
|
|
This package contains the LuaFileSystem library, a set of portable
|
2009-04-09 14:01:24 +00:00
|
|
|
functions for directory creation, listing and deletion and for file
|
|
|
|
locking.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
endef
|
|
|
|
|
2009-04-29 12:56:17 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS)
|
2009-04-09 14:01:24 +00:00
|
|
|
|
|
|
|
TARGET_LDFLAGS += -llua
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2009-10-29 16:50:46 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
|
2009-04-09 14:01:24 +00:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)"
|
2010-01-01 17:36:31 +00:00
|
|
|
$(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/luafilesystem.a $(PKG_BUILD_DIR)/src/lfs.o
|
2009-04-09 14:01:24 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2010-01-01 17:36:31 +00:00
|
|
|
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
|
|
|
|
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/lua
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(STAGING_DIR)/usr/lib/lua
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/luafilesystem.a $(STAGING_DIR)/usr/lib/lua
|
2009-04-09 14:01:24 +00:00
|
|
|
endef
|
|
|
|
|
2010-01-01 17:36:31 +00:00
|
|
|
define Package/luafilesystem/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua/lfs.so
|
2009-04-09 14:01:24 +00:00
|
|
|
endef
|
|
|
|
|
2010-01-01 17:36:31 +00:00
|
|
|
$(eval $(call BuildPackage,luafilesystem))
|