Makefile 1.8 KB

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