[packages] luafilesystem: update to 1.5.0
[openwrt/svn-archive/archive.git] / lang / luafilesystem / Makefile
1 #
2 # Copyright (C) 2008-2010 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:=luafilesystem
11 PKG_REV:=8ff20138af779f6f38cbff12d22df1a3151d9fa6
12 PKG_VERSION:=1.5.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_URL:=git://github.com/keplerproject/luafilesystem.git
19 PKG_SOURCE_VERSION:=$(PKG_REV)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/luafilesystem
24 SUBMENU:=Lua
25 SECTION:=lang
26 CATEGORY:=Languages
27 TITLE:=LuaFileSystem
28 URL:=http://keplerproject.github.com/luafilesystem/
29 DEPENDS:=+liblua
30 endef
31
32 define Package/luafilesystem/description
33 This package contains the LuaFileSystem library, a set of portable
34 functions for directory creation, listing and deletion and for file
35 locking.
36 endef
37
38 define Build/Configure
39 endef
40
41 TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS)
42
43 TARGET_LDFLAGS += -llua
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 $(TARGET_CONFIGURE_OPTS) \
48 CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
49 LDFLAGS="$(TARGET_LDFLAGS)"
50 $(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/luafilesystem.a $(PKG_BUILD_DIR)/src/lfs.o
51 endef
52
53 define Build/InstallDev
54 $(INSTALL_DIR) $(STAGING_DIR)/usr/include
55 $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/lua
56 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(STAGING_DIR)/usr/lib/lua
58 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/luafilesystem.a $(STAGING_DIR)/usr/lib/lua
59 endef
60
61 define Package/luafilesystem/install
62 $(INSTALL_DIR) $(1)/usr/lib/lua
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua/lfs.so
64 endef
65
66 $(eval $(call BuildPackage,luafilesystem))