2009-04-09 14:01:24 +00:00
|
|
|
#
|
2009-04-25 20:36:30 +00:00
|
|
|
# Copyright (C) 2008-2009 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
|
2009-08-15 14:43:48 +00:00
|
|
|
PKG_VERSION:=1.4.2
|
2009-04-09 14:01:24 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2009-08-15 14:43:48 +00:00
|
|
|
PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/3931
|
|
|
|
PKG_MD5SUM:=8e7b2a9b899d669280456d0f95afd961
|
2009-04-09 14:01:24 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/liblua-filesystem
|
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
|
2009-04-09 14:01:24 +00:00
|
|
|
URL:=http://www.luaforge.net/projects/luafilesystem
|
|
|
|
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) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)"
|
|
|
|
$(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/liblua-filesystem.a $(PKG_BUILD_DIR)/src/lfs.o
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib/lua/5.1/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/src/lfs.so \
|
|
|
|
$(STAGING_DIR)/usr/lib/liblua-filesystem.so.0.0.0
|
|
|
|
cd $(STAGING_DIR)/usr/lib/ && \
|
|
|
|
ln -fs liblua-filesystem.so.0.0.0 liblua-filesystem.so
|
|
|
|
cd $(STAGING_DIR)/usr/lib/ && \
|
|
|
|
ln -fs liblua-filesystem.so.0.0.0 liblua-filesystem.so.0
|
|
|
|
cd $(STAGING_DIR)/usr/lib/lua/5.1/ && \
|
|
|
|
ln -fs ../../liblua-filesystem.so.0.0.0 lfs.so
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/src/liblua-filesystem.a $(STAGING_DIR)/usr/lib
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/liblua-filesystem/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/5.1
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/src/lfs.so \
|
|
|
|
$(1)/usr/lib/liblua-filesystem.so.0.0.0
|
|
|
|
cd $(1)/usr/lib/ && ln -fs liblua-filesystem.so.0.0.0 liblua-filesystem.so
|
|
|
|
cd $(1)/usr/lib/lua/5.1/ && \
|
|
|
|
ln -fs ../../liblua-filesystem.so.0.0.0 lfs.so
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,liblua-filesystem))
|