summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www-servers/tinytinyhttpd/Manifest5
-rw-r--r--www-servers/tinytinyhttpd/files/tinytinyhttpd-0.0.6b-gcc44.patch34
-rw-r--r--www-servers/tinytinyhttpd/files/tthttpd.conf8
-rw-r--r--www-servers/tinytinyhttpd/files/tthttpd.init24
-rw-r--r--www-servers/tinytinyhttpd/tinytinyhttpd-0.0.6b.ebuild34
5 files changed, 105 insertions, 0 deletions
diff --git a/www-servers/tinytinyhttpd/Manifest b/www-servers/tinytinyhttpd/Manifest
new file mode 100644
index 0000000..15cd48c
--- /dev/null
+++ b/www-servers/tinytinyhttpd/Manifest
@@ -0,0 +1,5 @@
+AUX tinytinyhttpd-0.0.6b-gcc44.patch 691 RMD160 a57c1b762718af3d3b893c28c824f11e05ca4b16 SHA1 f098f219847f11d09336befa3155c5c642008822 SHA256 2a9f1809dcf4b92f885bc6f1f601f1b997e2aeb9754b64acf672be10a6ac86ae
+AUX tthttpd.conf 125 RMD160 c9886c4c6f4697cd9666331ea617302488fcbf66 SHA1 23b97fad065ac574184ce2554f316a7e5a995799 SHA256 aa4a8c684062130002a79a9d982124f0688e70dea643d056468875de82494a35
+AUX tthttpd.init 607 RMD160 8b88b0e33a888492d0645e7bc58b9ac56248b1f3 SHA1 921b7328ff8fa699382fcd862aa2ff4e56196877 SHA256 cffe8f5ea384b42686cc5b3e975312cfed42fb9208ffa063cd6868ee64a7d8da
+DIST tinytinyhttpd-0.0.6b.tar.gz 109746 RMD160 163e7a47a8bbb3f6b2881d59ee6c17143c48ad2f SHA1 2c80b2f2c785b92de3f78df2087bed686d2993a0 SHA256 63cc78b52103094c75d27dfd32899ae464063b29edb925bd067bbf4bba388b0b
+EBUILD tinytinyhttpd-0.0.6b.ebuild 704 RMD160 d4fcc06470704276aed92671d599427842b954c8 SHA1 4a9a8a5894791d2c6657117b01ac71162c4e917a SHA256 d6a2a10259870aca7145d1e8d0bbce13772ba36c9a7a158e2c28124b69dc9134
diff --git a/www-servers/tinytinyhttpd/files/tinytinyhttpd-0.0.6b-gcc44.patch b/www-servers/tinytinyhttpd/files/tinytinyhttpd-0.0.6b-gcc44.patch
new file mode 100644
index 0000000..96631b3
--- /dev/null
+++ b/www-servers/tinytinyhttpd/files/tinytinyhttpd-0.0.6b-gcc44.patch
@@ -0,0 +1,34 @@
+diff --git a/httpd.cxx b/httpd.cxx
+index 07b6145..8d235b8 100644
+--- a/httpd.cxx
++++ b/httpd.cxx
+@@ -24,6 +24,7 @@
+ #include <time.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <stdio.h>
+ #include <string.h>
+ #ifndef _WIN32
+ #include <signal.h>
+diff --git a/main.cxx b/main.cxx
+index 2d55c94..b4a9c7b 100644
+--- a/main.cxx
++++ b/main.cxx
+@@ -1,4 +1,5 @@
+ #include "httpd.h"
++#include <stdio.h>
+ #include <string.h>
+
+ int opterr = 1;
+diff --git a/utils.cxx b/utils.cxx
+index 568c93a..86b9b4e 100644
+--- a/utils.cxx
++++ b/utils.cxx
+@@ -28,6 +28,7 @@
+ #include <iconv.h>
+ #endif
+ #include <errno.h>
++#include <stdio.h>
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <time.h>
diff --git a/www-servers/tinytinyhttpd/files/tthttpd.conf b/www-servers/tinytinyhttpd/files/tthttpd.conf
new file mode 100644
index 0000000..08aa8dd
--- /dev/null
+++ b/www-servers/tinytinyhttpd/files/tthttpd.conf
@@ -0,0 +1,8 @@
+[global]
+port=80
+root=/var/www/localhost/htdocs
+indexpages=index.html,index.php
+spawnexec=on
+
+[mime/types]
+php=@/usr/bin/php
diff --git a/www-servers/tinytinyhttpd/files/tthttpd.init b/www-servers/tinytinyhttpd/files/tthttpd.init
new file mode 100644
index 0000000..a1a8699
--- /dev/null
+++ b/www-servers/tinytinyhttpd/files/tthttpd.init
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+TTHTTPD_OPTS="${TTHTTPD_OPTS:--c /etc/${SVCNAME}.conf}"
+TTHTTPD_BINARY="${TTHTTPD_BINARY:-/usr/bin/tthttpd}"
+
+depend() {
+ need net
+ use netmount
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --background --exec ${TTHTTPD_BINARY} --make-pidfile --pidfile /var/run/${SVCNAME}.pid -- ${TTHTTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec ${TTHTTPD_BINARY} --pidfile /var/run/${SVCNAME}.pid
+ eend $?
+}
diff --git a/www-servers/tinytinyhttpd/tinytinyhttpd-0.0.6b.ebuild b/www-servers/tinytinyhttpd/tinytinyhttpd-0.0.6b.ebuild
new file mode 100644
index 0000000..8c43c55
--- /dev/null
+++ b/www-servers/tinytinyhttpd/tinytinyhttpd-0.0.6b.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils
+
+DESCRIPTION="tiny tiny httpd"
+HOMEPAGE="http://github.com/mattn/tinytinyhttpd/"
+SRC_URI="http://cloud.github.com/downloads/mattn/tinytinyhttpd/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-gcc44.patch"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ rm -rf "${D}/usr/share/tthttpd"
+
+ insinto /etc; doins "${FILESDIR}/tthttpd.conf"
+
+ newinitd "${FILESDIR}/tthttpd.init" tthttpd
+
+ keepdir /var/www/localhost/htdocs
+
+ dodoc AUTHORS ChangeLog NEWS README* example.conf
+}