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