Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # Copyright (C) 2010 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_RELEASE:=9
  10. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  11. include $(INCLUDE_DIR)/package.mk
  12. define Package/uhttpd/default
  13. SECTION:=net
  14. CATEGORY:=Network
  15. TITLE:=uHTTPd - tiny, single threaded HTTP server
  16. endef
  17. define Package/uhttpd
  18. $(Package/uhttpd/default)
  19. MENU:=1
  20. endef
  21. define Package/uhttpd/description
  22. uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
  23. support. It is intended as a drop-in replacement for the Busybox
  24. HTTP daemon.
  25. endef
  26. define Package/uhttpd-mod-tls
  27. $(Package/uhttpd/default)
  28. TITLE+= (TLS plugin)
  29. DEPENDS:=uhttpd +libcyassl
  30. endef
  31. define Package/uhttpd-mod-tls/description
  32. The TLS plugin adds HTTPS support to uHTTPd.
  33. endef
  34. define Package/uhttpd-mod-lua
  35. $(Package/uhttpd/default)
  36. TITLE+= (Lua plugin)
  37. DEPENDS:=uhttpd +liblua
  38. endef
  39. define Package/uhttpd-mod-lua/description
  40. The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
  41. endef
  42. # hack to use CyASSL headers
  43. TARGET_CFLAGS += -I$(firstword $(wildcard $(BUILD_DIR)/cyassl-*/include))
  44. TARGET_LDFLAGS += -lm
  45. MAKE_VARS += FPIC="$(FPIC)"
  46. define Build/Prepare
  47. mkdir -p $(PKG_BUILD_DIR)
  48. $(CP) ./src/* $(PKG_BUILD_DIR)/
  49. endef
  50. define Package/uhttpd/conffiles
  51. /etc/config/uhttpd
  52. endef
  53. define Package/uhttpd/install
  54. $(INSTALL_DIR) $(1)/etc/init.d
  55. $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
  56. $(INSTALL_DIR) $(1)/etc/config
  57. $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
  58. $(INSTALL_DIR) $(1)/usr/sbin
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
  60. endef
  61. define Package/uhttpd-mod-tls/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_tls.so $(1)/usr/lib/
  64. endef
  65. define Package/uhttpd-mod-lua/install
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
  68. endef
  69. $(eval $(call BuildPackage,uhttpd))
  70. $(eval $(call BuildPackage,uhttpd-mod-tls))
  71. $(eval $(call BuildPackage,uhttpd-mod-lua))