2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 PKG_MD5SUM
:=792a529dfe974355aad8ba6c80e54e7a
16 PKG_SOURCE_URL
:=http
://www.acme.com
/software
/mini_httpd
/
17 PKG_SOURCE
:=mini_httpd-
$(PKG_VERSION
).
tar.gz
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/mini_httpd-
$(PKG_VERSION
)
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/mini-httpd
27 SUBMENU
:=A small web server
28 DESCRIPTION
:=mini_httpd is a small HTTP server. Its performance is not great
, but for
\\\
29 low or medium traffic sites it
's quite adequate. It implements all the\\\
30 basic features of an HTTP server, including:\\\
32 * GET, HEAD, and POST methods.\\\
34 * Basic authentication.\\\
35 * Security against ".." filename snooping.\\\
36 * The common MIME types.\\\
37 * Trailing-slash redirection.\\\
38 * index.html, index.htm, index.cgi\\\
39 * Directory listings.\\\
40 * Multihoming / virtual hosting.\\\
41 * Standard logging.\\\
42 * Custom error pages.\\\
44 It can also be configured to do IPv6.\\\
45 URL:=http://www.acme.com/software/mini_httpd/
48 define Package/mini-httpd-htpasswd
49 $(call Package/mini-httpd)
50 TITLE:=Utility to generate HTTP access files
51 DESCRIPTION:=This file generates .htaccess/.htpasswd files to use HTTP access authentication\\\
54 define Package/mini-httpd-matrixssl
55 $(call Package/mini-httpd)
56 TITLE:=A small web server, built with SSL support using MatrixSSL
57 DESCRIPTION:=mini_httpd is a small HTTP server. Its performance is not great, but for\\\
58 low or medium traffic sites it's quite adequate. It implements
all the
\\\
59 basic features of an HTTP server
, including
:\\\
61 * GET
, HEAD
, and POST methods.
\\\
63 * Basic authentication.
\\\
64 * Security against
".." filename snooping.
\\\
65 * The common MIME types.
\\\
66 * Trailing-slash redirection.
\\\
67 * index.html
, index.htm
, index.cgi
\\\
68 * Directory listings.
\\\
69 * Multihoming
/ virtual hosting.
\\\
70 * Standard logging.
\\\
71 * Custom error pages.
\\\
73 It can also be configured to do SSL
/HTTPS and IPv6.
\\\
76 define Package
/mini-httpd-openssl
77 $(call BuildPackage
,mini-httpd
)
78 TITLE
:=A small web server
, built with SSL support using OpenSSL
79 DESCRIPTION
:=mini_httpd is a small HTTP server. Its performance is not great
, but for
\\\
80 low or medium traffic sites it
's quite adequate. It implements all the\\\
81 basic features of an HTTP server, including:\\\
83 * GET, HEAD, and POST methods.\\\
85 * Basic authentication.\\\
86 * Security against ".." filename snooping.\\\
87 * The common MIME types.\\\
88 * Trailing-slash redirection.\\\
89 * index.html, index.htm, index.cgi\\\
90 * Directory listings.\\\
91 * Multihoming / virtual hosting.\\\
92 * Standard logging.\\\
93 * Custom error pages.\\\
95 It can also be configured to do SSL/HTTPS and IPv6.\\\
98 define Build/Configure
99 $(CP) ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/
104 ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
105 $(MAKE) -C $(PKG_BUILD_DIR) \
107 OFLAGS="$(TARGET_CFLAGS)" \
108 SSL_DEFS="-DUSE_SSL -DHAVE_MATRIXSSL" \
109 SSL_INC="-I$(STAGING_DIR)/usr/include" \
110 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lmatrixssl" \
111 SSL_OBJS="matrixssl_helper.o" \
113 (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-matrixssl; )
114 $(MAKE) -C $(PKG_BUILD_DIR) clean
117 ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
118 $(MAKE) -C $(PKG_BUILD_DIR) \
120 OFLAGS="$(TARGET_CFLAGS)" \
121 SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
122 SSL_INC="-I$(STAGING_DIR)/usr/include" \
123 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \
125 (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-openssl; )
126 $(MAKE) -C $(PKG_BUILD_DIR) clean
129 ifneq ($(BR2_PACKAGE_MINI_HTTPD),)
130 $(MAKE) -C $(PKG_BUILD_DIR) \
132 OFLAGS="$(TARGET_CFLAGS)" \
138 install -d -m0755 $(IDIR_MINI_HTTPD)/etc
139 install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/mini_httpd.conf
140 install -d -m0755 $(IDIR_MINI_HTTPD)/etc/default
141 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD)/etc/default/mini_httpd
142 install -d -m0755 $(IDIR_MINI_HTTPD)/etc/init.d
143 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD)/etc/init.d/mini_httpd
144 install -d -m0755 $(IDIR_MINI_HTTPD)/usr/sbin
145 install -m0755 $(PKG_BUILD_DIR)/mini_httpd $(IDIR_MINI_HTTPD)/usr/sbin/
146 $(RSTRIP) $(IDIR_MINI_HTTPD)
147 $(IPKG_BUILD) $(IDIR_MINI_HTTPD) $(PACKAGE_DIR)
149 $(IPKG_MINI_HTTPD_HTPASSWD):
150 install -d -m0755 $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin
151 install -m0755 $(PKG_BUILD_DIR)/htpasswd $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin/
152 $(RSTRIP) $(IDIR_MINI_HTTPD_HTPASSWD)
153 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_HTPASSWD) $(PACKAGE_DIR)
155 $(IPKG_MINI_HTTPD_MATRIXSSL):
156 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc
157 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf
158 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/
159 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default
160 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd
161 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d
162 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd
163 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin
164 install -m0755 $(PKG_BUILD_DIR)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd
165 $(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL)
166 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR)
168 $(IPKG_MINI_HTTPD_OPENSSL):
169 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc
170 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf
171 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/
172 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default
173 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd
174 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d
175 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd
176 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin
177 install -m0755 $(PKG_BUILD_DIR)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd
178 $(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL)
179 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR)