[packages] luasec: update to 0.4
[openwrt/svn-archive/archive.git] / lang / luasec / Makefile
1 #
2 # Copyright (C) 2009-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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=luasec
11 PKG_VERSION:=0.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/4255
16 PKG_MD5SUM:=712158d60207bdbb6215fc7e07d8db24
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/luasec
23 SUBMENU:=Lua
24 SECTION:=lang
25 CATEGORY:=Languages
26 TITLE:=LuaSec
27 URL:=http://luasec.luaforge.net/
28 DEPENDS:=+lua +libopenssl +luasocket
29 endef
30
31 define Package/luasec/description
32 LuaSec is a binding for OpenSSL library to provide TLS/SSL communication.
33 endef
34
35 define Build/Configure
36 endef
37
38 MAKE_PATH = ./src
39
40 MAKE_FLAGS += \
41 INCDIR="$(TARGET_CPPFLAGS)" \
42 LIBDIR="$(TARGET_LDFLAGS)" \
43 CC="$(TARGET_CC) $(TARGET_CFLAGS) -std=gnu99" \
44 LD="$(TARGET_CROSS)ld -shared" \
45 LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
46 LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
47 linux \
48
49 define Package/luasec/install
50 $(INSTALL_DIR) $(1)/usr/lib/lua
51 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/
52 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/
53 $(INSTALL_DIR) $(1)/usr/lib/lua/ssl
54 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/
55 endef
56
57 $(eval $(call BuildPackage,luasec))