You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.0 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libhttp-parser
  9. PKG_VERSION:=2.8.0
  10. PKG_RELEASE=1
  11. PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
  12. PKG_LICENSE:=MIT
  13. PKG_LICENSE_FILES:=LICENSE-MIT
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  15. PKG_MIRROR_HASH:=83acea397da4cdb9192c27abbd53a9eb8e5a9e1bcea2873b499f7ccc0d68f518
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_URL:=git://github.com/nodejs/http-parser.git
  18. PKG_SOURCE_PROTO:=git
  19. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libhttp-parser
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=A library to parse http request and response
  25. URL:=https://github.com/nodejs/http-parser
  26. endef
  27. define Package/libhttp-parser/description
  28. A parser for HTTP messages written in C. It parses both requests and responses.
  29. The parser is designed to be used in performance HTTP applications.
  30. It does not make any syscalls nor allocations, it does not buffer data,
  31. it can be interrupted at anytime. Depending on your architecture,
  32. it only requires about 40 bytes of data per message stream
  33. (in a web server that is per connection).
  34. endef
  35. define Build/Compile
  36. $(call Build/Compile/Default, library)
  37. endef
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(1)/usr/include
  40. $(INSTALL_DATA) $(PKG_BUILD_DIR)/http_parser.h $(1)/usr/include/
  41. $(INSTALL_DIR) $(1)/usr/lib
  42. $(INSTALL_DATA) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
  43. ( cd $(1)/usr/lib ; \
  44. ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so ; \
  45. ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so.2.8 )
  46. endef
  47. define Package/libhttp-parser/install
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
  50. ( cd $(1)/usr/lib ; \
  51. ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so ; \
  52. ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so.2.8 )
  53. endef
  54. $(eval $(call BuildPackage,libhttp-parser))