summaryrefslogtreecommitdiff
path: root/libs/libhttp-parser
diff options
context:
space:
mode:
authorageekymonk <ramzthecoder@gmail.com>2014-11-27 01:00:49 +0000
committerageekymonk <ramzthecoder@gmail.com>2014-11-27 10:27:45 +0000
commitc77a0ead59a7cf09459e99eba7e1f6dd2c9875ba (patch)
treea384ae904e1d88b7234d52319afff589cde1c220 /libs/libhttp-parser
parentb80fe2edbc891cbafcd845b5cb79236606690187 (diff)
Adding support for libhttp-parser
Signed-off-by: Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
Diffstat (limited to 'libs/libhttp-parser')
-rw-r--r--libs/libhttp-parser/Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/libs/libhttp-parser/Makefile b/libs/libhttp-parser/Makefile
new file mode 100644
index 000000000..88e756807
--- /dev/null
+++ b/libs/libhttp-parser/Makefile
@@ -0,0 +1,60 @@
+#
+# 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:=libhttp-parser
+PKG_VERSION:=2.3.0
+PKG_RELEASE=1
+PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILE:=LICENSE-MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=git://github.com/joyent/http-parser.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=56f7ad0e2e5a80f79d214015c91e1f17d11d109f
+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libhttp-parser
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A library to parse http request and response
+ URL:=https://github.com/joyent/http-parser
+endef
+
+define Package/libhttp-parser/description
+ A parser for HTTP messages written in C. It parses both requests and responses.
+ The parser is designed to be used in performance HTTP applications.
+ It does not make any syscalls nor allocations, it does not buffer data,
+ it can be interrupted at anytime. Depending on your architecture,
+ it only requires about 40 bytes of data per message stream
+ (in a web server that is per connection).
+endef
+
+define Build/Compile
+ $(call Build/Compile/Default, library)
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/http_parser.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
+ ( cd $(1)/usr/lib ; ln -s libhttp_parser.so.* libhttp_parser.so )
+endef
+
+define Package/libhttp-parser/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
+ ( cd $(1)/usr/lib ; ln -s libhttp_parser.so.* libhttp_parser.so )
+endef
+
+$(eval $(call BuildPackage,libhttp-parser))