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.

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