package-$(BR2_PACKAGE_MATRIXSSL) += matrixssl
package-$(BR2_PACKAGE_MICROCOM) += microcom
package-$(BR2_PACKAGE_MICROPERL) += microperl
-package-$(BR2_PACKAGE_MINI_HTTPD) += mini_httpd
+package-$(BR2_COMPILE_MINI_HTTPD) += mini_httpd
package-$(BR2_PACKAGE_MINI_SENDMAIL) += mini_sendmail
package-$(BR2_PACKAGE_MONIT) += monit
package-$(BR2_PACKAGE_MPD) += mpd
libxml2-compile: zlib-compile
libxslt-compile: libxml2-compile
lighttpd-compile: openssl-compile pcre-compile
-mini_httpd-compile: matrixssl-compile
mt-daapd-compile: howl-compile libgdbm-compile libid3tag-compile
mtr-compile: ncurses-compile
mysql-compile: ncurses-compile zlib-compile
freeradius-compile: postgresql-compile
endif
+ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
+mini_httpd-compile: matrixssl-compile
+endif
+ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
+mini_httpd-compile: openssl-compile
+endif
+
ifneq ($(BR2_PACKAGE_MPD_MP3),)
mpd-compile: libid3tag-compile libmad-compile
endif
+config BR2_COMPILE_MINI_HTTPD
+ bool
+ default n
+ depends BR2_PACKAGE_MINI_HTTPD || BR2_PACKAGE_MINI_HTTPD_MATRIXSSL || BR2_PACKAGE_MINI_HTTPD_OPENSSL
+
config BR2_PACKAGE_MINI_HTTPD
tristate "mini-httpd - A small web server"
default m if CONFIG_DEVEL
+ select BR2_COMPILE_MINI_HTTPD
+ help
+ mini_httpd is a small HTTP server. Its performance is not great, but for
+ low or medium traffic sites it's quite adequate. It implements all the
+ basic features of an HTTP server, including:
+
+ * GET, HEAD, and POST methods.
+ * CGI.
+ * Basic authentication.
+ * Security against ".." filename snooping.
+ * The common MIME types.
+ * Trailing-slash redirection.
+ * index.html, index.htm, index.cgi
+ * Directory listings.
+ * Multihoming / virtual hosting.
+ * Standard logging.
+ * Custom error pages.
+
+ It can also be configured to do IPv6.
+
+ http://www.acme.com/software/mini_httpd/
+
+
+config BR2_PACKAGE_MINI_HTTPD_MATRIXSSL
+ tristate "mini-httpd-matrixssl - A small web server, built with SSL support using MatrixSSL"
+ default m if CONFIG_DEVEL
+ select BR2_COMPILE_MINI_HTTPD
+ select BR2_PACKAGE_LIBMATRIXSSL
+ help
+ mini_httpd is a small HTTP server. Its performance is not great, but for
+ low or medium traffic sites it's quite adequate. It implements all the
+ basic features of an HTTP server, including:
+
+ * GET, HEAD, and POST methods.
+ * CGI.
+ * Basic authentication.
+ * Security against ".." filename snooping.
+ * The common MIME types.
+ * Trailing-slash redirection.
+ * index.html, index.htm, index.cgi
+ * Directory listings.
+ * Multihoming / virtual hosting.
+ * Standard logging.
+ * Custom error pages.
+
+ It can also be configured to do SSL/HTTPS and IPv6.
+
+ http://www.acme.com/software/mini_httpd/
+
+
+config BR2_PACKAGE_MINI_HTTPD_OPENSSL
+ tristate "mini-httpd-openssl - A small web server, built with SSL support using OpenSSL"
+ default m if CONFIG_DEVEL
+ select BR2_COMPILE_MINI_HTTPD
+ select BR2_PACKAGE_LIBOPENSSL
help
mini_httpd is a small HTTP server. Its performance is not great, but for
low or medium traffic sites it's quite adequate. It implements all the
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,MINI_HTTPD_MATRIXSSL,mini-httpd-matrixssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
+ # with MatrixSSL
+ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
$(MAKE) -C $(PKG_BUILD_DIR) \
CC=$(TARGET_CC) \
OFLAGS="$(TARGET_CFLAGS)" \
+ SSL_DEFS="-DUSE_SSL -DHAVE_MATRIXSSL" \
SSL_INC="-I$(STAGING_DIR)/usr/include" \
SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lmatrixssl" \
+ SSL_OBJS="matrixssl_helper.o" \
all
+ (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-matrixssl; )
+ $(MAKE) -C $(PKG_BUILD_DIR) clean
+endif
+ # with OpenSSL
+ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC=$(TARGET_CC) \
+ OFLAGS="$(TARGET_CFLAGS)" \
+ SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
+ SSL_INC="-I$(STAGING_DIR)/usr/include" \
+ SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \
+ all
+ (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-openssl; )
+ $(MAKE) -C $(PKG_BUILD_DIR) clean
+endif
+ # without SSL
+ifneq ($(BR2_PACKAGE_MINI_HTTPD),)
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC=$(TARGET_CC) \
+ OFLAGS="$(TARGET_CFLAGS)" \
+ all
+endif
touch $@
$(IPKG_MINI_HTTPD):
install -d -m0755 $(IDIR_MINI_HTTPD)/etc
- install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/
- install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD)/etc/
+ install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/mini_httpd.conf
install -d -m0755 $(IDIR_MINI_HTTPD)/etc/default
install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD)/etc/default/mini_httpd
install -d -m0755 $(IDIR_MINI_HTTPD)/etc/init.d
install -m0755 $(PKG_BUILD_DIR)/mini_httpd $(IDIR_MINI_HTTPD)/usr/sbin/
$(RSTRIP) $(IDIR_MINI_HTTPD)
$(IPKG_BUILD) $(IDIR_MINI_HTTPD) $(PACKAGE_DIR)
+
+$(IPKG_MINI_HTTPD_MATRIXSSL):
+ install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc
+ install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf
+ install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/
+ install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default
+ install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd
+ install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d
+ install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd
+ install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin
+ install -m0755 $(PKG_BUILD_DIR)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd
+ $(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL)
+ $(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR)
+
+$(IPKG_MINI_HTTPD_OPENSSL):
+ install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc
+ install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf
+ install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/
+ install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default
+ install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd
+ install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d
+ install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd
+ install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin
+ install -m0755 $(PKG_BUILD_DIR)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd
+ $(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL)
+ $(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR)
--- /dev/null
+cgipat=cgi-bin/**|**.sh
+dir=/www
+nochroot
+pidfile=/var/run/mini_httpd.pid
+user=root
+ssl
+certfile=/etc/mini_httpd.pem
-cgipat=cgi-bin/*
+cgipat=cgi-bin/**|**.sh
dir=/www
nochroot
pidfile=/var/run/mini_httpd.pid
user=root
-ssl
-certfile=/etc/mini_httpd.pem
#!/bin/sh
-DEFAULT=/etc/default/mini_httpd
+BIN=mini_httpd
+DEFAULT=/etc/default/$BIN
RUN_D=/var/run
-PID_F=$RUN_D/mini_httpd.pid
+PID_F=$RUN_D/$BIN.pid
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
[ -d $RUN_D ] || mkdir -p $RUN_D
- mini_httpd $OPTIONS
+ $BIN $OPTIONS 2>/dev/null
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
*)
- echo "usage: $0 (start|stop)"
+ echo "usage: $0 (start|stop|restart)"
exit 1
esac
--- /dev/null
+/etc/default/mini_httpd
+/etc/mini_httpd.conf
+/etc/mini_httpd.pem
--- /dev/null
+Package: mini-httpd-matrixssl
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
+Source: buildroot internal
+Description: A small HTTP server, built with SSL support using MatrixSSL.
+Depends: libmatrixssl
--- /dev/null
+/etc/default/mini_httpd
+/etc/mini_httpd.conf
+/etc/mini_httpd.pem
--- /dev/null
+Package: mini-httpd-openssl
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
+Source: buildroot internal
+Description: A small HTTP server, built with SSL support using OpenSSL.
+Depends: libopenssl
/etc/default/mini_httpd
/etc/mini_httpd.conf
-/etc/mini_httpd.pem
Section: net
Version: [TBDL]
Architecture: [TBDL]
-Maintainer: OpenWrt Developers Team <bugs@openwrt.org>
-Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/mini_httpd/
+Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
+Source: buildroot internal
Description: A small HTTP server, built with SSL support using MatrixSSL.
Depends: libmatrixssl
--- /dev/null
+diff -ruN mini_httpd-1.19-old/mini_httpd.c mini_httpd-1.19-new/mini_httpd.c
+--- mini_httpd-1.19-old/mini_httpd.c 2005-10-19 01:11:24.000000000 +0200
++++ mini_httpd-1.19-new/mini_httpd.c 2005-10-19 01:13:05.000000000 +0200
+@@ -138,10 +138,10 @@
+ #define CGI_NICE 10
+ #endif /* CGI_NICE */
+ #ifndef CGI_PATH
+-#define CGI_PATH "/usr/local/bin:/usr/ucb:/bin:/usr/bin"
++#define CGI_PATH "/usr/bin:/bin:/usr/sbin:/sbin"
+ #endif /* CGI_PATH */
+ #ifndef CGI_LD_LIBRARY_PATH
+-#define CGI_LD_LIBRARY_PATH "/usr/local/lib:/usr/lib"
++#define CGI_LD_LIBRARY_PATH "/usr/lib:/lib"
+ #endif /* CGI_LD_LIBRARY_PATH */
+ #ifndef AUTH_FILE
+ #define AUTH_FILE ".htpasswd"
+#SSL_OBJS =
+
+# MatrixSSL
-+SSL_TREE =
-+SSL_DEFS = -DUSE_SSL -DHAVE_MATRIXSSL
-+SSL_INC =
-+SSL_LIBS = -lmatrixssl
-+SSL_OBJS = matrixssl_helper.o
++#SSL_TREE =
++#SSL_DEFS = -DUSE_SSL -DHAVE_MATRIXSSL
++#SSL_INC =
++#SSL_LIBS = -lmatrixssl
++#SSL_OBJS = matrixssl_helper.o
-BINDIR = /usr/local/sbin