6c73cf501c2907f483b2efea750c5630d4213935
[project/luci.git] / contrib / package / luafilesystem / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=luafilesystem
4 PKG_VERSION:=1.4.0
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/3158
9 PKG_MD5SUM:=6f3d247f27820b8f045431ad81bcd3ad
10
11 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
12 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define Package/luafilesystem
17 SECTION:=lib
18 CATEGORY:=Libraries
19 TITLE:=Lua FS library
20 URL:=http://www.keplerproject.org/luafilesystem/
21 DEPENDS:=+liblua
22 MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
23 endef
24
25 define Build/Configure
26 endef
27
28 define Build/Compile
29 $(MAKE) -C $(PKG_BUILD_DIR) \
30 CC="$(TARGET_CROSS)gcc" \
31 LD="$(TARGET_CROSS)ld" \
32 AR="$(TARGET_CROSS)ar rcu" \
33 RANLIB="$(TARGET_CROSS)ranlib" \
34 INSTALL_ROOT=/usr \
35 LUA_INC=$(STAGING_DIR)/usr/include
36 endef
37
38 define Package/luafilesystem/install
39 $(INSTALL_DIR) $(1)/usr/lib/lua
40 $(STRIP) $(PKG_BUILD_DIR)/src/lfs.so
41 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua
42 endef
43
44 $(eval $(call BuildPackage,luafilesystem))