2 # Copyright (C) 2018 Jianhui Zhao
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
=https
://github.com
/zhaojh329
/libuhttpd
/releases
/download
/v
$(PKG_VERSION
)
16 PKG_HASH
:=0639ce20f81d4826e96c3abf7d287f15220e53912ba9d56e228e2409252985e1
18 PKG_MAINTAINER
:=Jianhui Zhao
<zhaojh329@gmail.com
>
20 PKG_LICENSE_FILES
:=LICENSE
24 include $(INCLUDE_DIR
)/package.mk
25 include ..
/..
/devel
/ninja
/ninja-cmake.mk
27 define Package
/libuhttpd
/Default
31 TITLE
:=A lightweight HTTP server library based on libev
32 URL
:=https
://github.com
/zhaojh329
/libuhttpd
38 Package
/libuhttpd-openssl
=$(call Package
/libuhttpd
/Default
,openssl
,+PACKAGE_libuhttpd-openssl
:libopenssl
)
39 Package
/libuhttpd-wolfssl
=$(call Package
/libuhttpd
/Default
,wolfssl
,+PACKAGE_libuhttpd-wolfssl
:libwolfssl
)
40 Package
/libuhttpd-mbedtls
=$(call Package
/libuhttpd
/Default
,mbedtls
,+PACKAGE_libuhttpd-mbedtls
:libmbedtls
+PACKAGE_libuhttpd-mbedtls
:zlib
)
41 Package
/libuhttpd-nossl
=$(call Package
/libuhttpd
/Default
,nossl
)
43 ifeq ($(BUILD_VARIANT
),openssl
)
44 CMAKE_OPTIONS
+= -DUSE_OPENSSL
=ON
45 else ifeq ($(BUILD_VARIANT
),wolfssl
)
46 CMAKE_OPTIONS
+= -DUSE_WOLFSSL
=ON
47 else ifeq ($(BUILD_VARIANT
),mbedtls
)
48 CMAKE_OPTIONS
+= -DUSE_MBEDTLS
=ON
50 CMAKE_OPTIONS
+= -DSSL_SUPPORT
=OFF
53 define Package
/libuhttpd-
$(BUILD_VARIANT
)/install
54 $(INSTALL_DIR
) $(1)/usr
/lib
55 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libuhttpd.so
* $(1)/usr
/lib
/
58 $(eval
$(call BuildPackage
,libuhttpd-openssl
))
59 $(eval
$(call BuildPackage
,libuhttpd-mbedtls
))
60 $(eval
$(call BuildPackage
,libuhttpd-wolfssl
))
61 $(eval
$(call BuildPackage
,libuhttpd-nossl
))