Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. #
  2. # Copyright (C) 2010-2013 Jo-Philipp Wich <[email protected]>
  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:=uhttpd
  9. PKG_VERSION:=2013-09-13
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=git://nbd.name/uhttpd2.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=8eb20e0aad7412468975b2c9ce7e374ea3084e42
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_MAINTAINER:=Felix Fietkau <[email protected]>
  17. PKG_BUILD_DEPENDS = ustream-ssl
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/uhttpd/default
  21. SECTION:=net
  22. CATEGORY:=Network
  23. SUBMENU:=Web Servers/Proxies
  24. TITLE:=uHTTPd - tiny, single threaded HTTP server
  25. endef
  26. define Package/uhttpd
  27. $(Package/uhttpd/default)
  28. DEPENDS:=+libubox
  29. endef
  30. define Package/uhttpd/description
  31. uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
  32. support. It is intended as a drop-in replacement for the Busybox
  33. HTTP daemon.
  34. endef
  35. define Package/uhttpd/config
  36. config PACKAGE_uhttpd_debug
  37. bool "Build with debug messages"
  38. default n
  39. endef
  40. define Package/uhttpd-mod-tls
  41. $(Package/uhttpd/default)
  42. TITLE+= (TLS plugin)
  43. DEPENDS:=uhttpd \
  44. +PACKAGE_uhttpd-mod-tls_polarssl:libustream-polarssl \
  45. +PACKAGE_uhttpd-mod-tls_cyassl:libustream-cyassl \
  46. +PACKAGE_uhttpd-mod-tls_openssl:libustream-openssl
  47. endef
  48. define Package/uhttpd-mod-tls/description
  49. The TLS plugin adds HTTPS support to uHTTPd.
  50. endef
  51. define Package/uhttpd-mod-tls/config
  52. choice
  53. depends on PACKAGE_uhttpd-mod-tls
  54. prompt "TLS Provider"
  55. default PACKAGE_uhttpd-mod-tls_polarssl
  56. config PACKAGE_uhttpd-mod-tls_polarssl
  57. bool "PolarSSL"
  58. config PACKAGE_uhttpd-mod-tls_cyassl
  59. bool "CyaSSL"
  60. config PACKAGE_uhttpd-mod-tls_openssl
  61. bool "OpenSSL"
  62. endchoice
  63. endef
  64. define Package/uhttpd-mod-lua
  65. $(Package/uhttpd/default)
  66. TITLE+= (Lua plugin)
  67. DEPENDS:=uhttpd +liblua
  68. endef
  69. define Package/uhttpd-mod-lua/description
  70. The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
  71. endef
  72. define Package/uhttpd-mod-ubus
  73. $(Package/uhttpd/default)
  74. TITLE+= (ubus plugin)
  75. DEPENDS:=uhttpd +libubus +libblobmsg-json
  76. endef
  77. define Package/uhttpd-mod-ubus/description
  78. The ubus plugin adds a HTTP/JSON RPC proxy for ubus and publishes the
  79. session.* namespace and procedures.
  80. endef
  81. define Package/uhttpd/conffiles
  82. /etc/config/uhttpd
  83. /etc/uhttpd.crt
  84. /etc/uhttpd.key
  85. endef
  86. TARGET_LDFLAGS += -lcrypt
  87. CMAKE_OPTIONS = -DTLS_SUPPORT=on
  88. define Package/uhttpd/install
  89. $(INSTALL_DIR) $(1)/etc/init.d
  90. $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
  91. $(INSTALL_DIR) $(1)/etc/config
  92. $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
  93. $(INSTALL_DIR) $(1)/usr/sbin
  94. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
  95. endef
  96. define Package/uhttpd-mod-tls/install
  97. true
  98. endef
  99. define Package/uhttpd-mod-lua/install
  100. $(INSTALL_DIR) $(1)/usr/lib
  101. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
  102. endef
  103. define Package/uhttpd-mod-ubus/install
  104. $(INSTALL_DIR) $(1)/usr/lib
  105. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
  106. endef
  107. $(eval $(call BuildPackage,uhttpd))
  108. $(eval $(call BuildPackage,uhttpd-mod-tls))
  109. $(eval $(call BuildPackage,uhttpd-mod-lua))
  110. $(eval $(call BuildPackage,uhttpd-mod-ubus))