lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (1867B)


      1 #
      2 # Copyright (C) 2009-2013 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:=luasocket
     11 PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
     12 PKG_VERSION:=3.0-rc1-20130909
     13 PKG_RELEASE:=3
     14 
     15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
     16 PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git
     17 PKG_SOURCE_PROTO:=git
     18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
     19 
     20 include $(INCLUDE_DIR)/package.mk
     21 
     22 define Package/luasocket
     23   SUBMENU:=Lua
     24   SECTION:=lang
     25   CATEGORY:=Languages
     26   TITLE:=LuaSocket
     27   URL:=http://luasocket.luaforge.net/
     28   MAINTAINER:=W. Michael Petullo <mike@flyn.org>
     29   DEPENDS:=+lua
     30 endef
     31 
     32 define Package/luasocket/description
     33   LuaSocket is the most comprehensive networking support
     34   library for the Lua language. It provides easy access to
     35   TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
     36 endef
     37 
     38 define Build/Configure
     39 endef
     40 
     41 define Build/Compile
     42 	$(MAKE) -C $(PKG_BUILD_DIR)/ \
     43 		LIBDIR="$(TARGET_LDFLAGS)" \
     44 		CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
     45 		LD="$(TARGET_CROSS)ld -shared" \
     46 		all
     47 endef
     48 
     49 
     50 define Package/luasocket/install
     51 	$(INSTALL_DIR) $(1)/usr/lib/lua
     52 	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
     53 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua
     54 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua
     55 	$(INSTALL_DIR) $(1)/usr/lib/lua/mime
     56 	ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so
     57 	$(INSTALL_DIR) $(1)/usr/lib/lua/socket
     58 	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket
     59 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket
     60 	ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so
     61 endef
     62 
     63 $(eval $(call BuildPackage,luasocket))