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.

62 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.1
  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.gz
  15. PKG_SOURCE_URL:=https://codeload.github.com/nodejs/http-parser/tar.gz/v$(PKG_VERSION)?
  16. PKG_HASH:=51615f68b8d67eadfd2482decc63b3e55d749ce0055502bbb5b0032726d22d96
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/http-parser-$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/libhttp-parser
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=A library to parse http request and response
  23. URL:=https://github.com/nodejs/http-parser
  24. endef
  25. define Package/libhttp-parser/description
  26. A parser for HTTP messages written in C. It parses both requests and responses.
  27. The parser is designed to be used in performance HTTP applications.
  28. It does not make any syscalls nor allocations, it does not buffer data,
  29. it can be interrupted at anytime. Depending on your architecture,
  30. it only requires about 40 bytes of data per message stream
  31. (in a web server that is per connection).
  32. endef
  33. define Build/Compile
  34. $(call Build/Compile/Default, library)
  35. endef
  36. define Build/InstallDev
  37. $(INSTALL_DIR) $(1)/usr/include
  38. $(INSTALL_DATA) $(PKG_BUILD_DIR)/http_parser.h $(1)/usr/include/
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(INSTALL_DATA) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
  41. ( cd $(1)/usr/lib ; \
  42. ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so ; \
  43. ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so.2.8 )
  44. endef
  45. define Package/libhttp-parser/install
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
  48. ( cd $(1)/usr/lib ; \
  49. ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so ; \
  50. ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so.2.8 )
  51. endef
  52. $(eval $(call BuildPackage,libhttp-parser))