package/libuhttpd: new package
authorJianhui Zhao <zhaojh329@gmail.com>
Sat, 4 Apr 2020 17:04:28 +0000 (01:04 +0800)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 4 Apr 2020 21:16:45 +0000 (23:16 +0200)
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/libuhttpd/Config.in [new file with mode: 0644]
package/libuhttpd/libuhttpd.hash [new file with mode: 0644]
package/libuhttpd/libuhttpd.mk [new file with mode: 0644]

index 12f5d1945b6bd8a20fa321a41dfcd10b06bc940f..af169ac984d0eab90eb3bdbb9a03a46b1f7e78a5 100644 (file)
@@ -1273,6 +1273,7 @@ F:        package/x11r7/xdriver_xf86-video-imx/
 F:     package/x11r7/xdriver_xf86-video-imx-viv/
 
 N:     Jianhui Zhao <zhaojh329@gmail.com>
+F:     package/libuhttpd/
 F:     package/libuwsc/
 F:     package/rtty/
 
index 4aaf2d93f8729d7c86fec8b26093d82c54d51a2a..09f92f0b855dd6645ef93e8064b0b8cd22c732ff 100644 (file)
@@ -1713,6 +1713,7 @@ menu "Networking"
        source "package/libtirpc/Config.in"
        source "package/libtorrent/Config.in"
        source "package/libtorrent-rasterbar/Config.in"
+       source "package/libuhttpd/Config.in"
        source "package/libupnp/Config.in"
        source "package/libupnp18/Config.in"
        source "package/libupnpp/Config.in"
diff --git a/package/libuhttpd/Config.in b/package/libuhttpd/Config.in
new file mode 100644 (file)
index 0000000..1ab39c5
--- /dev/null
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBUHTTPD
+       bool "libuhttpd"
+       select BR2_PACKAGE_LIBEV
+       help
+         A lightweight and fully asynchronous HTTP server
+         library based on libev
+
+         https://github.com/zhaojh329/libuhttpd
diff --git a/package/libuhttpd/libuhttpd.hash b/package/libuhttpd/libuhttpd.hash
new file mode 100644 (file)
index 0000000..65014ca
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 9f938b75074f812375c5079189f8299c328e94801117ab1190a29fae0806f1a8  libuhttpd-3.1.2.tar.gz
+sha256 99efed4bbc0b62f96f999ef23399e38234fb91651af734fd389a52b033a85b55  LICENSE
diff --git a/package/libuhttpd/libuhttpd.mk b/package/libuhttpd/libuhttpd.mk
new file mode 100644 (file)
index 0000000..ce805e8
--- /dev/null
@@ -0,0 +1,39 @@
+################################################################################
+#
+# libuhttpd
+#
+################################################################################
+
+LIBUHTTPD_VERSION = 3.1.2
+LIBUHTTPD_SITE = https://github.com/zhaojh329/libuhttpd/releases/download/v$(LIBUHTTPD_VERSION)
+LIBUHTTPD_LICENSE = MIT
+LIBUHTTPD_LICENSE_FILES = LICENSE
+LIBUHTTPD_INSTALL_STAGING = YES
+LIBUHTTPD_DEPENDENCIES = libev
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+LIBUHTTPD_DEPENDENCIES += openssl
+LIBUHTTPD_CONF_OPTS += \
+       -DUHTTPD_SSL_SUPPORT=ON \
+       -DUHTTPD_USE_MBEDTLS=OFF \
+       -DUHTTPD_USE_OPENSSL=ON \
+       -DUHTTPD_USE_WOLFSSL=OFF
+else ifeq ($(BR2_PACKAGE_WOLFSSL),y)
+LIBUHTTPD_DEPENDENCIES += wolfssl
+LIBUHTTPD_CONF_OPTS += \
+       -DUHTTPD_SSL_SUPPORT=ON \
+       -DUHTTPD_USE_MBEDTLS=OFF \
+       -DUHTTPD_USE_OPENSSL=OFF \
+       -DUHTTPD_USE_WOLFSSL=ON
+else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
+LIBUHTTPD_DEPENDENCIES += mbedtls
+LIBUHTTPD_CONF_OPTS += \
+       -DUHTTPD_SSL_SUPPORT=ON \
+       -DUHTTPD_USE_MBEDTLS=ON \
+       -DUHTTPD_USE_OPENSSL=OFF \
+       -DUHTTPD_USE_WOLFSSL=OFF
+else
+LIBUHTTPD_CONF_OPTS += -DUHTTPD_SSL_SUPPORT=OFF
+endif
+
+$(eval $(cmake-package))