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.

82 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2014-2017 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:=libuhttpd
  9. PKG_VERSION:=2.0.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  13. PKG_SOURCE_URL=https://github.com/zhaojh329/libuhttpd.git
  14. PKG_MIRROR_HASH:=f20e4081ba1bbea277a3c86f28fa451d54546817a58814fff91470550a5b8e5d
  15. CMAKE_INSTALL:=1
  16. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
  17. PKG_LICENSE:=LGPL-2.1
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/libuhttpd/default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. SUBMENU:=Networking
  26. TITLE:=libuhttpd
  27. DEPENDS:=+libubox +liblua
  28. endef
  29. define Package/libuhttpd-nossl
  30. $(Package/libuhttpd/default)
  31. TITLE += (NO SSL)
  32. VARIANT:=nossl
  33. endef
  34. define Package/libuhttpd-openssl
  35. $(Package/libuhttpd/default)
  36. TITLE += (openssl)
  37. DEPENDS += +libustream-openssl
  38. VARIANT:=openssl
  39. endef
  40. define Package/libuhttpd-wolfssl
  41. $(Package/libuhttpd/default)
  42. TITLE += (wolfssl)
  43. DEPENDS += +libustream-wolfssl
  44. VARIANT:=wolfssl
  45. endef
  46. define Package/libuhttpd-mbedtls
  47. $(Package/libuhttpd/default)
  48. TITLE += (mbedtls)
  49. DEPENDS += +libustream-mbedtls
  50. VARIANT:=mbedtls
  51. endef
  52. ifeq ($(BUILD_VARIANT),nossl)
  53. CMAKE_OPTIONS += -DUHTTPD_SSL_SUPPORT=off
  54. endif
  55. define Package/libuhttpd/default/install
  56. $(INSTALL_DIR) $(1)/usr/lib/
  57. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/
  58. endef
  59. Package/libuhttpd-nossl/install = $(Package/libuhttpd/default/install)
  60. Package/libuhttpd-openssl/install = $(Package/libuhttpd/default/install)
  61. Package/libuhttpd-wolfssl/install = $(Package/libuhttpd/default/install)
  62. Package/libuhttpd-mbedtls/install = $(Package/libuhttpd/default/install)
  63. $(eval $(call BuildPackage,libuhttpd-nossl))
  64. $(eval $(call BuildPackage,libuhttpd-mbedtls))
  65. $(eval $(call BuildPackage,libuhttpd-wolfssl))
  66. $(eval $(call BuildPackage,libuhttpd-openssl))