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.

86 lines
2.3 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.2.2
  10. PKG_RELEASE:=2
  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:=98f217238160489468fafe8c643b7f96f168c80000ee07d3ca808d54f4c6a608
  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. CONFLICTS:=libuhttpd-openssl libuhttpd-wolfssl libuhttpd-mbedtls
  34. endef
  35. define Package/libuhttpd-openssl
  36. $(Package/libuhttpd/default)
  37. TITLE += (openssl)
  38. DEPENDS += +libustream-openssl
  39. VARIANT:=openssl
  40. CONFLICTS:=libuhttpd-wolfssl libuhttpd-mbedtls
  41. endef
  42. define Package/libuhttpd-wolfssl
  43. $(Package/libuhttpd/default)
  44. TITLE += (wolfssl)
  45. DEPENDS += +libustream-wolfssl
  46. VARIANT:=wolfssl
  47. CONFLICTS:=libuhttpd-mbedtls
  48. endef
  49. define Package/libuhttpd-mbedtls
  50. $(Package/libuhttpd/default)
  51. TITLE += (mbedtls)
  52. DEPENDS += +libustream-mbedtls
  53. VARIANT:=mbedtls
  54. endef
  55. ifeq ($(BUILD_VARIANT),nossl)
  56. CMAKE_OPTIONS += -DUHTTPD_SSL_SUPPORT=off
  57. endif
  58. define Package/libuhttpd/default/install
  59. $(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/lib/lua/
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/uhttpd.so* $(1)/usr/lib/lua/
  62. endef
  63. Package/libuhttpd-nossl/install = $(Package/libuhttpd/default/install)
  64. Package/libuhttpd-openssl/install = $(Package/libuhttpd/default/install)
  65. Package/libuhttpd-wolfssl/install = $(Package/libuhttpd/default/install)
  66. Package/libuhttpd-mbedtls/install = $(Package/libuhttpd/default/install)
  67. $(eval $(call BuildPackage,libuhttpd-nossl))
  68. $(eval $(call BuildPackage,libuhttpd-mbedtls))
  69. $(eval $(call BuildPackage,libuhttpd-wolfssl))
  70. $(eval $(call BuildPackage,libuhttpd-openssl))