Browse Source

Copy luafilesystem package from old repository

Signed-off-by: W. Michael Petullo <mike@flyn.org>
W. Michael Petullo 10 years ago
parent
commit
7dff39a10f
1 changed files with 66 additions and 0 deletions
  1. 66
    0
      lang/luafilesystem/Makefile

+ 66
- 0
lang/luafilesystem/Makefile View File

@@ -0,0 +1,66 @@
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
+  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
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))