aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynn Lin <lynn.lin@avocent.com>2009-02-14 18:35:07 -0800
committerKhem Raj <raj.khem@gmail.com>2009-02-14 18:35:07 -0800
commitfef3375fcfc10d047f7b54416ee19062f78ae07b (patch)
treeb4d9638a374b50c54747bc422be419e3ddde5c86
parent3e57b182e19ea69bb05f2622c3e367799d5d1c38 (diff)
downloadopenembedded-fef3375fcfc10d047f7b54416ee19062f78ae07b.tar.gz
Signed-off-by: Khem Raj <raj.khem@gmail.com>
mini-httpd: New recipe.
-rw-r--r--conf/checksums.ini4
-rw-r--r--packages/mini-httpd/.mini-httpd_1.19.bb.swpbin0 -> 12288 bytes
-rw-r--r--packages/mini-httpd/files/init70
-rw-r--r--packages/mini-httpd/files/mini-httpd.conf37
-rw-r--r--packages/mini-httpd/files/new-bindir-mandir.patch15
-rw-r--r--packages/mini-httpd/files/remove-CC.patch13
-rw-r--r--packages/mini-httpd/mini-httpd_1.19.bb36
7 files changed, 175 insertions, 0 deletions
diff --git a/conf/checksums.ini b/conf/checksums.ini
index 2eda0dd673..2aee8cc431 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -14966,6 +14966,10 @@ sha256=64d7c31354d318ec2085e39e724287c78742a66302fd0b27dab7a3f705d5c54d
md5=7e192e01b08023c7f3e63bf1c796bc14
sha256=68c64a38f0b29347f86871248f0399e7e1b12645dc6263af7b2e4940f1392eaa
+[http://www.acme.com/software/mini_httpd/mini_httpd-1.19.tar.gz]
+md5=7c68293ad265ecfe2edea917912f6f1f
+sha256=f7f36533b1338ea16d916ea525ea7006ab38fdd3544ac7df93a4688a8e270241
+
[http://gpe.linuxtogo.org/download/source/miniclipboard-0.3.tar.gz]
md5=8bea461bf4136aedbe110b6aec184d72
sha256=7f9c937c0f04760d215f7e7d9ca2709f8148e69be2693206d1ae81e2c88a656e
diff --git a/packages/mini-httpd/.mini-httpd_1.19.bb.swp b/packages/mini-httpd/.mini-httpd_1.19.bb.swp
new file mode 100644
index 0000000000..d384577124
--- /dev/null
+++ b/packages/mini-httpd/.mini-httpd_1.19.bb.swp
Binary files differ
diff --git a/packages/mini-httpd/files/init b/packages/mini-httpd/files/init
new file mode 100644
index 0000000000..5e9b176eb9
--- /dev/null
+++ b/packages/mini-httpd/files/init
@@ -0,0 +1,70 @@
+#! /bin/sh
+
+# Globals
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/mini_httpd
+NAME=mini-httpd
+DESC="web server"
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS="-C /etc/mini-httpd.conf"
+
+test -x $DAEMON || exit 0
+
+# Include mini-httpd defaults if available
+if [ -f /etc/default/mini-httpd ]
+then
+ . /etc/default/mini-httpd
+fi
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+
+ stop)
+ echo -n "Stopping $DESC: "
+ # Get pid number
+ if [ -e /var/run/$NAME.pid ]
+ then
+ PID=`cat /var/run/$NAME.pid`
+ if [ -d /proc/$PID ]
+ then
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
+ else
+ # we need to remove the pidfile manually
+ if [ -e /var/run/$NAME.pid ]
+ then
+ rm -f /var/run/$NAME.pid
+ fi
+ fi
+ fi
+ echo "$NAME."
+ ;;
+
+ restart|force-reload)
+ echo -n "Restarting $DESC: "
+ if [ "$START" = "0" ]
+ then
+ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $DAEMON_OPTS
+ fi
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/packages/mini-httpd/files/mini-httpd.conf b/packages/mini-httpd/files/mini-httpd.conf
new file mode 100644
index 0000000000..cb4150c3d9
--- /dev/null
+++ b/packages/mini-httpd/files/mini-httpd.conf
@@ -0,0 +1,37 @@
+# Example config for mini_httpd.
+# Author: Marvin Stark <marv@der-marv.de>
+
+# Uncomment this line for turning on ssl support.
+#ssl
+
+# On which host mini_httpd should bind?
+host=0.0.0.0
+
+# On which port mini_httpd should listen?
+port=80
+
+# Which user mini_httpd should use?
+user=nobody
+
+# Run in chroot mode?
+#chroot # yes
+nochroot # no
+
+# Working directory of mini_httpd.
+#dir=<work_dir>
+
+# We are the web files stored?
+data_dir=/etc/mini-httpd
+
+# Which certificate to use?
+#certfile=<certfile>
+
+# Which logfile to use?
+logfile=/var/log/mini-httpd.log
+
+# Which pidfile to use?
+pidfile=/var/run/mini-httpd.pid
+
+# Which charset to use?
+charset=iso-8859-1
+
diff --git a/packages/mini-httpd/files/new-bindir-mandir.patch b/packages/mini-httpd/files/new-bindir-mandir.patch
new file mode 100644
index 0000000000..7d48cd1685
--- /dev/null
+++ b/packages/mini-httpd/files/new-bindir-mandir.patch
@@ -0,0 +1,15 @@
+diff -NurpP --minimal mini_httpd-1.19/Makefile mini_httpd-1.19-new/Makefile
+--- mini_httpd-1.19/Makefile 2002-11-02 07:02:57.000000000 +0800
++++ mini_httpd-1.19-new/Makefile 2008-10-06 15:43:52.000000000 +0800
+@@ -20,8 +20,8 @@ CRYPT_LIB = -lcrypt
+ #SSL_LIBS = -L${SSL_TREE}/lib -lssl -lcrypto
+
+
+-BINDIR = /usr/local/sbin
+-MANDIR = /usr/local/man
++BINDIR = /usr/sbin
++MANDIR = /usr/share/man
+ CC = gcc
+ CDEFS = ${SSL_DEFS} ${SSL_INC}
+ CFLAGS = -O ${CDEFS}
+
diff --git a/packages/mini-httpd/files/remove-CC.patch b/packages/mini-httpd/files/remove-CC.patch
new file mode 100644
index 0000000000..0fddcd7cb6
--- /dev/null
+++ b/packages/mini-httpd/files/remove-CC.patch
@@ -0,0 +1,13 @@
+diff -NurpP --minimal mini_httpd-1.19/Makefile mini_httpd-1.19-new/Makefile
+--- mini_httpd-1.19/Makefile 2008-10-06 15:45:44.000000000 +0800
++++ mini_httpd-1.19-new/Makefile 2008-10-06 15:46:11.000000000 +0800
+@@ -22,7 +22,7 @@ CRYPT_LIB = -lcrypt
+
+ BINDIR = /usr/sbin
+ MANDIR = /usr/share/man
+-CC = gcc
++#CC = gcc
+ CDEFS = ${SSL_DEFS} ${SSL_INC}
+ CFLAGS = -O ${CDEFS}
+ #CFLAGS = -g ${CDEFS}
+
diff --git a/packages/mini-httpd/mini-httpd_1.19.bb b/packages/mini-httpd/mini-httpd_1.19.bb
new file mode 100644
index 0000000000..6ca44e79ee
--- /dev/null
+++ b/packages/mini-httpd/mini-httpd_1.19.bb
@@ -0,0 +1,36 @@
+# Copyright (C) 2009 Khem Raj <raj.khem@gmail.org>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "mini_httpd is a small HTTP server. \
+ It implements all the basic features of an HTTP server \
+ It can also be configured to do SSL/HTTPS and IPv6. \
+ "
+HOMEPAGE = "http://www.acme.com/software/mini_httpd/"
+LICENSE = "BSD"
+SECTION = "net"
+DEPENDS = "openssl"
+PR = "r0"
+
+SRC_URI="http://www.acme.com/software/mini_httpd/mini_httpd-${PV}.tar.gz \
+ file://new-bindir-mandir.patch;patch=1 \
+ file://remove-CC.patch;patch=1 \
+ file://mini-httpd.conf \
+ file://init \
+ "
+
+INITSCRIPT_NAME = "mini_httpd"
+INITSCRIPT_PARAMS = "defaults"
+
+S = "${WORKDIR}/mini_httpd-${PV}"
+
+
+inherit autotools update-rc.d
+
+do_install () {
+ install -d ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/mini-httpd
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/mini_httpd
+ install -m 0755 ${WORKDIR}/mini-httpd.conf ${D}${sysconfdir}/mini-httpd.conf
+ oe_runmake 'BINDIR=${D}${sbindir}' 'MANDIR=${D}${mandir}' install
+}