2
0

Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #
  2. # Copyright (C) 2010-2015 Jo-Philipp Wich <jo@mein.io>
  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_RELEASE:=1
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL=$(LEDE_GIT)/project/uhttpd.git
  12. PKG_SOURCE_DATE:=2016-10-25
  13. PKG_SOURCE_VERSION:=1628fa4b34aa143187353f81e8001b9a15286bda
  14. PKG_MIRROR_HASH:=2ac4ba8dc0b349d72174aac9ff693a73a214295a9890fe3d2a8eedcad54d06e3
  15. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  16. PKG_LICENSE:=ISC
  17. PKG_BUILD_DEPENDS = ustream-ssl
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. include $(INCLUDE_DIR)/version.mk
  21. define Package/uhttpd/default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=Web Servers/Proxies
  25. TITLE:=uHTTPd - tiny, single threaded HTTP server
  26. endef
  27. define Package/uhttpd
  28. $(Package/uhttpd/default)
  29. DEPENDS:=+libubox +libblobmsg-json +libjson-script
  30. endef
  31. define Package/uhttpd/description
  32. uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
  33. support. It is intended as a drop-in replacement for the Busybox
  34. HTTP daemon.
  35. endef
  36. define Package/uhttpd/config
  37. config PACKAGE_uhttpd_debug
  38. bool "Build with debug messages"
  39. default n
  40. endef
  41. define Package/uhttpd-mod-lua
  42. $(Package/uhttpd/default)
  43. TITLE+= (Lua plugin)
  44. DEPENDS:=uhttpd +liblua
  45. endef
  46. define Package/uhttpd-mod-lua/description
  47. The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
  48. endef
  49. define Package/uhttpd-mod-ubus
  50. $(Package/uhttpd/default)
  51. TITLE+= (ubus plugin)
  52. DEPENDS:=uhttpd +libubus +libblobmsg-json
  53. endef
  54. define Package/uhttpd-mod-ubus/description
  55. The ubus plugin adds a HTTP/JSON RPC proxy for ubus and publishes the
  56. session.* namespace and procedures.
  57. endef
  58. define Package/uhttpd/conffiles
  59. /etc/config/uhttpd
  60. /etc/uhttpd.crt
  61. /etc/uhttpd.key
  62. endef
  63. ifneq ($(CONFIG_USE_GLIBC),)
  64. TARGET_CFLAGS += -D_DEFAULT_SOURCE
  65. endif
  66. TARGET_LDFLAGS += -lcrypt
  67. CMAKE_OPTIONS = -DTLS_SUPPORT=on
  68. define Package/uhttpd/install
  69. $(INSTALL_DIR) $(1)/etc/init.d
  70. $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
  71. $(INSTALL_DIR) $(1)/etc/config
  72. $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
  73. $(VERSION_SED_SCRIPT) $(1)/etc/config/uhttpd
  74. $(INSTALL_DIR) $(1)/usr/sbin
  75. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
  76. endef
  77. define Package/uhttpd-mod-lua/install
  78. $(INSTALL_DIR) $(1)/usr/lib
  79. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
  80. endef
  81. define Package/uhttpd-mod-ubus/install
  82. $(INSTALL_DIR) $(1)/usr/lib $(1)/etc/uci-defaults
  83. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
  84. $(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus
  85. endef
  86. $(eval $(call BuildPackage,uhttpd))
  87. $(eval $(call BuildPackage,uhttpd-mod-lua))
  88. $(eval $(call BuildPackage,uhttpd-mod-ubus))