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.

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