ath9k: validate eeprom chainmask settings, some Ubiquiti devices (and maybe others...
[openwrt.git] / package / uhttpd / Makefile
1 #
2 # Copyright (C) 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=uhttpd
11 PKG_RELEASE:=24
12
13 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
14 PKG_CONFIG_DEPENDS := \
15 CONFIG_PACKAGE_uhttpd-mod-tls_cyassl \
16 CONFIG_PACKAGE_uhttpd-mod-tls_openssl
17
18 include $(INCLUDE_DIR)/package.mk
19
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 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
26 endef
27
28 define Package/uhttpd
29 $(Package/uhttpd/default)
30 MENU:=1
31 endef
32
33 define Package/uhttpd/description
34 uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
35 support. It is intended as a drop-in replacement for the Busybox
36 HTTP daemon.
37 endef
38
39
40 define Package/uhttpd-mod-tls
41 $(Package/uhttpd/default)
42 TITLE+= (TLS plugin)
43 DEPENDS:=uhttpd +PACKAGE_uhttpd-mod-tls_cyassl:libcyassl +PACKAGE_uhttpd-mod-tls_openssl:libopenssl
44 endef
45
46 define Package/uhttpd-mod-tls/description
47 The TLS plugin adds HTTPS support to uHTTPd.
48 endef
49
50 define Package/uhttpd-mod-tls/config
51 choice
52 depends on PACKAGE_uhttpd-mod-tls
53 prompt "TLS Provider"
54 default PACKAGE_uhttpd-mod-tls_cyassl
55
56 config PACKAGE_uhttpd-mod-tls_cyassl
57 bool "CyaSSL"
58
59 config PACKAGE_uhttpd-mod-tls_openssl
60 bool "OpenSSL"
61 endchoice
62 endef
63
64 UHTTPD_TLS:=
65 TLS_CFLAGS:=
66
67 ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_cyassl),)
68 UHTTPD_TLS:=cyassl
69 TLS_CFLAGS:=-I$(STAGING_DIR)/usr/include/cyassl
70 endif
71
72 ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_openssl),)
73 UHTTPD_TLS:=openssl
74 endif
75
76
77 define Package/uhttpd-mod-lua
78 $(Package/uhttpd/default)
79 TITLE+= (Lua plugin)
80 DEPENDS:=uhttpd +liblua
81 endef
82
83 define Package/uhttpd-mod-lua/description
84 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
85 endef
86
87
88 TARGET_CFLAGS += $(TLS_CFLAGS)
89 MAKE_VARS += FPIC="$(FPIC)" UHTTPD_TLS="$(UHTTPD_TLS)"
90
91 define Build/Prepare
92 mkdir -p $(PKG_BUILD_DIR)
93 $(CP) ./src/* $(PKG_BUILD_DIR)/
94 endef
95
96 define Package/uhttpd/conffiles
97 /etc/config/uhttpd
98 /etc/uhttpd.crt
99 /etc/uhttpd.key
100 endef
101
102 define Package/uhttpd/install
103 $(INSTALL_DIR) $(1)/etc/init.d
104 $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
105 $(INSTALL_DIR) $(1)/etc/config
106 $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
107 $(INSTALL_DIR) $(1)/usr/sbin
108 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
109 endef
110
111 define Package/uhttpd-mod-tls/install
112 $(INSTALL_DIR) $(1)/usr/lib
113 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_tls.so $(1)/usr/lib/
114 endef
115
116 define Package/uhttpd-mod-lua/install
117 $(INSTALL_DIR) $(1)/usr/lib
118 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
119 endef
120
121
122 $(eval $(call BuildPackage,uhttpd))
123 $(eval $(call BuildPackage,uhttpd-mod-tls))
124 $(eval $(call BuildPackage,uhttpd-mod-lua))
This page took 0.040663 seconds and 5 git commands to generate.