Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / libs / libhttp-parser / Makefile
1 #
2 # Copyright (C) 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:=libhttp-parser
11 PKG_VERSION:=2.9.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/nodejs/http-parser/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=467b9e30fd0979ee301065e70f637d525c28193449e1b13fbcb1b1fab3ad224f
17 PKG_BUILD_DIR:=$(BUILD_DIR)/http-parser-$(PKG_VERSION)
18
19 PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>, Hirokazu MORIKAWA <morikw2@gmail.com>
20 PKG_LICENSE:=MIT
21 PKG_LICENSE_FILES:=LICENSE-MIT
22
23 PKG_BUILD_PARALLEL:=1
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libhttp-parser
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=A library to parse http request and response
32 URL:=https://github.com/nodejs/http-parser
33 endef
34
35 define Package/libhttp-parser/description
36 A parser for HTTP messages written in C. It parses both requests and responses.
37 The parser is designed to be used in performance HTTP applications.
38 It does not make any syscalls nor allocations, it does not buffer data,
39 it can be interrupted at anytime. Depending on your architecture,
40 it only requires about 40 bytes of data per message stream
41 (in a web server that is per connection).
42 endef
43
44 MAKE_FLAGS+=library \
45 PREFIX=/usr
46
47 define Build/InstallDev
48 $(INSTALL_DIR) $(1)/usr/include
49 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/http_parser.h $(1)/usr/include/
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttp_parser.so* $(1)/usr/lib/
52 endef
53
54 define Package/libhttp-parser/install
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttp_parser.so* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libhttp-parser))