diff options
author | 2012-07-13 14:08:26 +0000 | |
---|---|---|
committer | 2012-07-13 14:08:26 +0000 | |
commit | 63c7491b84c9c9dd1ebaf3141ff420b4dcd679a2 (patch) | |
tree | 18739855f7735af6e6f63690ae6fcc4e7dd3fd3f /www-servers/thttpd | |
parent | Re-license init script as stated by Pavel in bug #426158. Version bump. (diff) | |
download | gentoo-2-63c7491b84c9c9dd1ebaf3141ff420b4dcd679a2.tar.gz gentoo-2-63c7491b84c9c9dd1ebaf3141ff420b4dcd679a2.tar.bz2 gentoo-2-63c7491b84c9c9dd1ebaf3141ff420b4dcd679a2.zip |
Version bump, multi-instance enhancement, bug #424826
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'www-servers/thttpd')
-rw-r--r-- | www-servers/thttpd/ChangeLog | 8 | ||||
-rw-r--r-- | www-servers/thttpd/files/thttpd.confd.1 | 35 | ||||
-rw-r--r-- | www-servers/thttpd/files/thttpd.init.1 | 34 | ||||
-rw-r--r-- | www-servers/thttpd/thttpd-2.26.4.ebuild | 61 |
4 files changed, 137 insertions, 1 deletions
diff --git a/www-servers/thttpd/ChangeLog b/www-servers/thttpd/ChangeLog index 04a895b8f877..343fad4b7077 100644 --- a/www-servers/thttpd/ChangeLog +++ b/www-servers/thttpd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for www-servers/thttpd # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/ChangeLog,v 1.44 2012/07/13 13:54:39 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/ChangeLog,v 1.45 2012/07/13 14:08:26 blueness Exp $ + +*thttpd-2.26.4 (13 Jul 2012) + + 13 Jul 2012; Anthony G. Basile <blueness@gentoo.org> +thttpd-2.26.4.ebuild, + +files/thttpd.confd.1, +files/thttpd.init.1: + Version bump, multi-instance enhancement, bug #424826 13 Jul 2012; Anthony G. Basile <blueness@gentoo.org> thttpd-2.26.2.ebuild: Keyword ~arm ~ppc ~ppc64 diff --git a/www-servers/thttpd/files/thttpd.confd.1 b/www-servers/thttpd/files/thttpd.confd.1 new file mode 100644 index 000000000000..cb61a1f2ae52 --- /dev/null +++ b/www-servers/thttpd/files/thttpd.confd.1 @@ -0,0 +1,35 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +## Config file for /etc/init.d/thttpd + +## the startup-dir of thttpd is the docroot, so we specify it here +## and the init-script does a "cd" prior to startup: +THTTPD_DOCROOT="/var/www/localhost" + +## There are 2 ways to configure thttpd: +## 1) specify all params on the cmd-line +## 2) use a config-file (and start with "-C <conf-file>") + +## For additional thttpd instances, run: +# ln -s /etc/init.d/thttpd /etc/init.d/thttpd.$NAME +# cp /etc/conf.d/thttpd /etc/conf.d/thttpd.$NAME + +## Note: 1) and 2) can be mixed but +## the init-script set PID (option -i) to +## /var/run/thttpd.$NAME.run +## and logfile (option -l) to +## /var/log/thttpd.$NAME.log +## +## We choose 1) here -- if you have a more complicated setup read +## thttpd(8) for details on 2). + +THTTPD_OPTS="-p 8080 -u thttpd -r" + +## For a more complex setup (e.g. cgi-support) use an external configfile: +## comment the THTTPD_OPTS line above und use the one below. +#THTTPD_OPTS="-C /etc/thttpd/thttpd.conf" + +## If you know what you are doing you can add cgi-support with the line below; +## but you _should_ use the extern-configfile version! +#THTTPD_OPTS="$THTTPD_OPTS -c **.cgi|**.sh" diff --git a/www-servers/thttpd/files/thttpd.init.1 b/www-servers/thttpd/files/thttpd.init.1 new file mode 100644 index 000000000000..415ead79d6a6 --- /dev/null +++ b/www-servers/thttpd/files/thttpd.init.1 @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v3 or later + +depend() { + need net + use dns logger netmount + after sshd +} + +checkconfig() { + if [ ! -d "$THTTPD_DOCROOT" ]; then + eend 1 "THTTPD_DOCROOT not set correctly in /etc/conf.d/${SVCNAME}" + fi +} + +start() { + ebegin "Starting ${SVCNAME}" + + checkconfig || return 1 + + start-stop-daemon --quiet --start --exec /usr/sbin/thttpd \ + --pidfile /var/run/${SVCNAME}.pid --chdir "$THTTPD_DOCROOT" -- \ + -i /var/run/${SVCNAME}.pid \ + -l /var/log/${SVCNAME}.log \ + ${THTTPD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --quiet --stop --pidfile /var/run/${SVCNAME}.pid + eend $? +} diff --git a/www-servers/thttpd/thttpd-2.26.4.ebuild b/www-servers/thttpd/thttpd-2.26.4.ebuild new file mode 100644 index 000000000000..291f08d7937e --- /dev/null +++ b/www-servers/thttpd/thttpd-2.26.4.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/thttpd-2.26.4.ebuild,v 1.1 2012/07/13 14:08:26 blueness Exp $ + +EAPI="4" + +inherit eutils flag-o-matic toolchain-funcs + +MY_P="s${P}" + +DESCRIPTION="Fork of thttpd, a small, fast, multiplexing webserver." +HOMEPAGE="http://opensource.dyc.edu/sthttpd" +SRC_URI="http://opensource.dyc.edu/pub/sthttpd/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND="" +DEPEND="" + +THTTPD_USER=thttpd +THTTPD_GROUP=thttpd +THTTPD_DOCROOT="${EPREFIX}/var/www/localhost/htdocs" + +DOCS=( README TODO ) + +pkg_setup() { + ebegin "Creating thttpd user and group" + enewgroup ${THTTPD_GROUP} + enewuser ${THTTPD_USER} -1 -1 -1 ${THTTPD_GROUP} +} + +src_configure() { + econf WEBDIR=${THTTPD_DOCROOT} +} + +src_install () { + default + + newinitd "${FILESDIR}"/thttpd.init.1 thttpd + newconfd "${FILESDIR}"/thttpd.confd.1 thttpd + + insinto /etc/logrotate.d + newins "${FILESDIR}/thttpd.logrotate" thttpd + + insinto /etc/thttpd + doins "${FILESDIR}"/thttpd.conf.sample +} + +pkg_postinst() { + chown root:${THTTPD_GROUP} "${EROOT}/usr/sbin/makeweb" \ + || die "Failed chown makeweb" + chmod 2751 "${EROOT}/usr/sbin/makeweb" \ + || die "Failed chmod makeweb" + chmod 755 "${THTTPD_DOCROOT}/cgi-bin/printenv" \ + || die "Failed chmod printenv" + elog "Adjust THTTPD_DOCROOT in /etc/conf.d/thttpd !" +} |