Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #
  2. # Copyright (C) 2010-2012 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-03-15
  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:=3675d407ecf4908a231eb6bde6bb6408f20a9e81
  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 +PACKAGE_uhttpd-mod-tls_cyassl:libustream-cyassl +PACKAGE_uhttpd-mod-tls_openssl:libustream-openssl
  44. endef
  45. define Package/uhttpd-mod-tls/description
  46. The TLS plugin adds HTTPS support to uHTTPd.
  47. endef
  48. define Package/uhttpd-mod-tls/config
  49. choice
  50. depends on PACKAGE_uhttpd-mod-tls
  51. prompt "TLS Provider"
  52. default PACKAGE_uhttpd-mod-tls_cyassl
  53. config PACKAGE_uhttpd-mod-tls_cyassl
  54. bool "CyaSSL"
  55. config PACKAGE_uhttpd-mod-tls_openssl
  56. bool "OpenSSL"
  57. endchoice
  58. endef
  59. define Package/uhttpd-mod-lua
  60. $(Package/uhttpd/default)
  61. TITLE+= (Lua plugin)
  62. DEPENDS:=uhttpd +liblua
  63. endef
  64. define Package/uhttpd-mod-lua/description
  65. The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
  66. endef
  67. define Package/uhttpd-mod-ubus
  68. $(Package/uhttpd/default)
  69. TITLE+= (ubus plugin)
  70. DEPENDS:=uhttpd +libubus +libblobmsg-json
  71. endef
  72. define Package/uhttpd-mod-ubus/description
  73. The ubus plugin adds a HTTP/JSON RPC proxy for ubus and publishes the
  74. session.* namespace and procedures.
  75. endef
  76. define Package/uhttpd/conffiles
  77. /etc/config/uhttpd
  78. /etc/uhttpd.crt
  79. /etc/uhttpd.key
  80. endef
  81. TARGET_LDFLAGS += -lcrypt
  82. CMAKE_OPTIONS = -DTLS_SUPPORT=on
  83. define Package/uhttpd/install
  84. $(INSTALL_DIR) $(1)/etc/init.d
  85. $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
  86. $(INSTALL_DIR) $(1)/etc/config
  87. $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
  88. $(INSTALL_DIR) $(1)/usr/sbin
  89. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
  90. endef
  91. define Package/uhttpd-mod-tls/install
  92. true
  93. endef
  94. define Package/uhttpd-mod-lua/install
  95. $(INSTALL_DIR) $(1)/usr/lib
  96. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
  97. endef
  98. define Package/uhttpd-mod-ubus/install
  99. $(INSTALL_DIR) $(1)/usr/lib
  100. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
  101. endef
  102. $(eval $(call BuildPackage,uhttpd))
  103. $(eval $(call BuildPackage,uhttpd-mod-tls))
  104. $(eval $(call BuildPackage,uhttpd-mod-lua))
  105. $(eval $(call BuildPackage,uhttpd-mod-ubus))