2 # Copyright (C) 2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=libhttp-parser
13 PKG_MAINTAINER
:=Ramanathan Sivagurunathan
<ramzthecoder@gmail.com
>
15 PKG_LICENSE_FILES
:=LICENSE-MIT
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
18 PKG_MIRROR_HASH
:=20e6acc415ae8a47f39c6821685dbba09d99ff5079902fe1a0f580c2c88ae18a
19 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_SOURCE_URL
:=git
://github.com
/joyent
/http-parser.git
22 PKG_SOURCE_VERSION
:=v
$(PKG_VERSION
)
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/libhttp-parser
30 TITLE
:=A library to parse http request and response
31 URL
:=https
://github.com
/joyent
/http-parser
34 define Package
/libhttp-parser
/description
35 A parser for HTTP messages written in C. It parses both requests and responses.
36 The parser is designed to be used in performance HTTP applications.
37 It does not make any syscalls nor allocations
, it does not buffer data
,
38 it can be interrupted at anytime. Depending on your architecture
,
39 it only requires about
40 bytes of data per message stream
40 (in a web server that is per connection
).
44 $(call Build
/Compile
/Default
, library
)
47 define Build
/InstallDev
48 $(INSTALL_DIR
) $(1)/usr
/include
49 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/http_parser.h
$(1)/usr
/include/
50 $(INSTALL_DIR
) $(1)/usr
/lib
51 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/libhttp_parser.so.
* $(1)/usr
/lib
/
52 ( cd
$(1)/usr
/lib
; ln
-s libhttp_parser.so.
* libhttp_parser.so
)
55 define Package
/libhttp-parser
/install
56 $(INSTALL_DIR
) $(1)/usr
/lib
57 $(CP
) $(PKG_BUILD_DIR
)/libhttp_parser.so.
* $(1)/usr
/lib
/
58 ( cd
$(1)/usr
/lib
; ln
-s libhttp_parser.so.
* libhttp_parser.so
)
61 $(eval
$(call BuildPackage
,libhttp-parser
))