summaryrefslogtreecommitdiffstats
path: root/package/libhttpparser/libhttpparser.mk
diff options
context:
space:
mode:
authorRenaud AUBIN <root@renaud.io>2015-08-27 22:54:56 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-08-28 19:18:13 +0200
commitba1b3a5f39cb3507d548269f58770b66d441a545 (patch)
tree590618345ff4682880c35d2f4728537213b2c4dd /package/libhttpparser/libhttpparser.mk
parent0d83de383224c65ec250a005130b1d3cc6fd6d76 (diff)
downloadbuildroot-ba1b3a5f39cb3507d548269f58770b66d441a545.tar.gz
buildroot-ba1b3a5f39cb3507d548269f58770b66d441a545.zip
package/libhttpparser: New package
http-parser provides a simple C API to parse HTTP responses and requests. This packaging uses the official Joyent repository. [Thomas: - since we're always building the shared library, depend on !BR2_STATIC_LIBS in Config.in. We could build only the static library, but then we would have to do all the lib installation manually. - indent using tabs in Config.in - use 'make install' instead of handcoding the library installation. - use $(TARGET_CONFIGURE_OPTS) instead of just CC= and LD=. - use tabs for indentation in commands instead of spaces - add patch to fix reinstallation.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/libhttpparser/libhttpparser.mk')
-rw-r--r--package/libhttpparser/libhttpparser.mk26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/libhttpparser/libhttpparser.mk b/package/libhttpparser/libhttpparser.mk
new file mode 100644
index 0000000000..d6ec236650
--- /dev/null
+++ b/package/libhttpparser/libhttpparser.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# libhttpparser
+#
+################################################################################
+
+LIBHTTPPARSER_VERSION = v2.5.0
+LIBHTTPPARSER_SITE = $(call github,joyent,http-parser,$(LIBHTTPPARSER_VERSION))
+LIBHTTPPARSER_INSTALL_STAGING = YES
+LIBHTTPPARSER_LICENSE = MIT
+LIBHTTPPARSER_LICENSE_FILES = LICENSE-MIT
+
+define LIBHTTPPARSER_BUILD_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) library package
+endef
+
+define LIBHTTPPARSER_INSTALL_STAGING_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) PREFIX=$(STAGING_DIR)/usr install
+ $(INSTALL) -D -m 0644 $(@D)/libhttp_parser.a $(STAGING_DIR)/usr/lib/libhttp_parser.a
+endef
+
+define LIBHTTPPARSER_INSTALL_TARGET_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) PREFIX=$(TARGET_DIR)/usr install
+endef
+
+$(eval $(generic-package))
OpenPOWER on IntegriCloud