You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.8 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=luafilesystem
  9. PKG_VERSION:=1.8.0
  10. PKG_RELEASE:=1
  11. PKG_MIRROR_HASH:=0342b54bcbd4aa1679bf23b2a4cc8177f630e6415b7a82e58cefb9f8991e0a8e
  12. PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git
  13. PKG_SOURCE_VERSION:=v$(subst .,_,$(PKG_VERSION))
  14. PKG_SOURCE_PROTO:=git
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/luafilesystem
  17. SUBMENU:=Lua
  18. SECTION:=lang
  19. CATEGORY:=Languages
  20. TITLE:=LuaFileSystem
  21. URL:=http://keplerproject.github.com/luafilesystem/
  22. MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  23. DEPENDS:=+liblua
  24. endef
  25. define Package/luafilesystem/description
  26. This package contains the LuaFileSystem library, a set of portable
  27. functions for directory creation, listing and deletion and for file
  28. locking.
  29. endef
  30. define Build/Configure
  31. endef
  32. TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS)
  33. TARGET_LDFLAGS += -llua
  34. define Build/Compile
  35. $(MAKE) -C $(PKG_BUILD_DIR) \
  36. $(TARGET_CONFIGURE_OPTS) \
  37. CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
  38. LDFLAGS="$(TARGET_LDFLAGS)"
  39. $(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/luafilesystem.a $(PKG_BUILD_DIR)/src/lfs.o
  40. endef
  41. define Build/InstallDev
  42. $(INSTALL_DIR) $(STAGING_DIR)/usr/include
  43. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/lua
  44. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include
  45. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(STAGING_DIR)/usr/lib/lua
  46. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/luafilesystem.a $(STAGING_DIR)/usr/lib/lua
  47. endef
  48. define Package/luafilesystem/install
  49. $(INSTALL_DIR) $(1)/usr/lib/lua
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua/lfs.so
  51. endef
  52. $(eval $(call BuildPackage,luafilesystem))