Add package for mongoose web server

[Peter: drop noauth patch, cleanup Config.in, don't install to staging, ..]
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Charles Manning 2012-12-12 12:03:16 +00:00 committed by Peter Korsgaard
parent e9b7712837
commit c85da87012
4 changed files with 78 additions and 0 deletions

View File

@ -705,6 +705,7 @@ source "package/linphone/Config.in"
source "package/lrzsz/Config.in"
source "package/macchanger/Config.in"
source "package/mii-diag/Config.in"
source "package/mongoose/Config.in"
source "package/mongrel2/Config.in"
source "package/mrouted/Config.in"
source "package/msmtp/Config.in"

View File

@ -0,0 +1,10 @@
config BR2_PACKAGE_MONGOOSE
bool "mongoose"
depends on BR2_TOOLCHAIN_HAS_THREADS
help
Mongoose is a small and easy to use web server
https://github.com/valenok/mongoose
comment "mongoose needs a toolchain with thread support"
depends on !BR2_TOOLCHAIN_HAS_THREADS

41
package/mongoose/S85mongoose Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
#
# Start/stop the mongoose HTTP server
#
set -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=mongoose
DESC="Mongoose HTTP server"
DAEMON=`which mongoose`
OPTIONS="-max_threads 3 -root /var/www -ports 80"
[ -e /etc/default/mongoose ] && . /etc/default/mongoose
case "$1" in
start)
echo "Starting $DESC:"
start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon -K -x "$DAEMON"
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon -K -x "$DAEMON"
start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,26 @@
#############################################################
#
# mongoose
#
#############################################################
MONGOOSE_VERSION = 3.3
MONGOOSE_SOURCE = mongoose-$(MONGOOSE_VERSION).tgz
MONGOOSE_SITE = https://mongoose.googlecode.com/files
MONGOOSE_LICENSE = MIT
MONGOOSE_LICENSE_FILES = COPYING
MONGOOSE_CFLAGS = $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -DNO_SSL
define MONGOOSE_BUILD_CMDS
$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) \
linux COPT="$(MONGOOSE_CFLAGS)"
endef
define MONGOOSE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 755 $(@D)/mongoose $(TARGET_DIR)/usr/sbin/mongoose
$(INSTALL) -D -m 755 package/mongoose/S85mongoose \
$(TARGET_DIR)/etc/init.d/S85mongoose
endef
$(eval $(generic-package))