From: Jonh Wendell <[email protected]>

Signed-off-by: Jonh Wendell <[email protected]>
---
 lang/luacurl/Makefile                              | 43 ++++++++++++++++++++++
 .../luacurl/patches/01-create-shared-library.patch | 18 +++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 lang/luacurl/Makefile
 create mode 100644 lang/luacurl/patches/01-create-shared-library.patch

diff --git a/lang/luacurl/Makefile b/lang/luacurl/Makefile
new file mode 100644
index 0000000..a6cab14
--- /dev/null
+++ b/lang/luacurl/Makefile
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=luacurl
+PKG_VERSION:=1.2.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=http://files.luaforge.net/releases/luacurl/luacurl/luacurl-1.2.1/
+PKG_MD5SUM:=4c83710a0fc5ca52818e5ec0101c4395
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/luacurl
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=LuaCURL
+  URL:=http://luaforge.net/projects/luacurl/
+  DEPENDS:=+liblua +libcurl
+endef
+
+define Package/luacurl/description
+ LuaCURL is Lua 5.x compatible module providing Internet browsing capabilities
+ based on the cURL library. The module interface follows strictly the cURL
+ architecture and is very easy to use if the programmer has already experience
+ with cURL.
+endef
+
+define Package/luacurl/install
+       $(INSTALL_DIR) $(1)/usr/lib/lua
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/libluacurl.so 
$(1)/usr/lib/lua/luacurl.so
+endef
+
+$(eval $(call BuildPackage,luacurl))
diff --git a/lang/luacurl/patches/01-create-shared-library.patch 
b/lang/luacurl/patches/01-create-shared-library.patch
new file mode 100644
index 0000000..82e2635
--- /dev/null
+++ b/lang/luacurl/patches/01-create-shared-library.patch
@@ -0,0 +1,18 @@
+diff -uNr luacurl-1.2.1-orig/CMakeLists.txt luacurl-1.2.1/CMakeLists.txt
+--- luacurl-1.2.1-orig/CMakeLists.txt  2008-04-30 23:02:57.000000000 -0300
++++ luacurl-1.2.1/CMakeLists.txt       2013-03-27 11:43:04.470506047 -0300
+@@ -1,5 +1,7 @@
+ # src/CMakeLists.txt
+ 
++PROJECT(luacurl)
++
+ FIND_LIBRARY(LIB_LUA lua PATHS
+       /usr/local/lib
+       /usr/lib
+@@ -39,5 +41,5 @@
+ )
+ 
+ LINK_LIBRARIES(${${PROJECT_NAME}_LIBRARIES} m)
+-ADD_LIBRARY(${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES})
++ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES})
+ INSTALL_TARGETS(/lib ${PROJECT_NAME})
-- 
1.8.1.4

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to