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