summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2012-01-22 12:54:29 +0000
committerPacho Ramos <pacho@gentoo.org>2012-01-22 12:54:29 +0000
commitd5f8697db0797de47459910b9f6561d94b5cf03d (patch)
tree18eeef34e153191baf22f5a84728bede156f7859 /dev-dotnet/xsp
parentRevision bump to create stable candidate. (diff)
downloadgentoo-2-d5f8697db0797de47459910b9f6561d94b5cf03d.tar.gz
gentoo-2-d5f8697db0797de47459910b9f6561d94b5cf03d.tar.bz2
gentoo-2-d5f8697db0797de47459910b9f6561d94b5cf03d.zip
Fix mod-mono-server init.d to support MonoServerVersion=4, bug #388669.
(Portage version: 2.1.10.44/cvs/Linux x86_64)
Diffstat (limited to 'dev-dotnet/xsp')
-rw-r--r--dev-dotnet/xsp/ChangeLog8
-rw-r--r--dev-dotnet/xsp/files/2.2/mod-mono-server-r1.initd83
-rw-r--r--dev-dotnet/xsp/xsp-2.10.2-r1.ebuild46
3 files changed, 136 insertions, 1 deletions
diff --git a/dev-dotnet/xsp/ChangeLog b/dev-dotnet/xsp/ChangeLog
index ff36ce9eda1a..4d51d0f2ffb5 100644
--- a/dev-dotnet/xsp/ChangeLog
+++ b/dev-dotnet/xsp/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-dotnet/xsp
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/xsp/ChangeLog,v 1.101 2012/01/22 11:19:39 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/xsp/ChangeLog,v 1.102 2012/01/22 12:54:29 pacho Exp $
+
+*xsp-2.10.2-r1 (22 Jan 2012)
+
+ 22 Jan 2012; Pacho Ramos <pacho@gentoo.org>
+ +files/2.2/mod-mono-server-r1.initd, +xsp-2.10.2-r1.ebuild:
+ Fix mod-mono-server init.d to support MonoServerVersion=4, bug #388669.
22 Jan 2012; Pacho Ramos <pacho@gentoo.org> -xsp-2.10.ebuild:
Drop old.
diff --git a/dev-dotnet/xsp/files/2.2/mod-mono-server-r1.initd b/dev-dotnet/xsp/files/2.2/mod-mono-server-r1.initd
new file mode 100644
index 000000000000..9e466461da80
--- /dev/null
+++ b/dev-dotnet/xsp/files/2.2/mod-mono-server-r1.initd
@@ -0,0 +1,83 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: mod-mono-server-r1.initd,v 1.1 2012/01/22 12:54:29 pacho Exp $
+
+depend() {
+ use net
+ after dotnet
+}
+
+start() {
+ [ -z "$MonoServerRootDir" ] && \
+ MonoServerRootDir="/usr/lib/xsp/test"
+ [ -z "$MonoApplications" ] && \
+ MonoApplications="/mono:/usr/lib/xsp/test,/:."
+ [ -z "$UnixSocketFileName" ] && \
+ UnixSocketFileName="/tmp/mod_mono_server"
+ [ -z "$MonoServerAddress" ] && \
+ MonoServerAddress=127.0.0.1
+ [ -z "$MonoServerPort" ] && \
+ MonoServerPort=8080
+ [ -z "$MonoServerVersion" ] && \
+ MonoServerVersion=1
+
+ MONO_SERVER_OPTS="--root ${MonoServerRootDir} \
+--applications ${MonoApplications} --nonstop"
+
+ [ -n "$MonoApplicationsConfigDir" ] && \
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--appconfigdir ${MonoApplicationsConfigDir}"
+
+ case "$MonoServerChannel" in
+ "tcp" )
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--address ${MonoServerAddress} --port ${MonoServerPort}"
+ ;;
+
+ "unix" )
+ [ -f "$UnixSocketFileName" ] && rm -f $UnixSocketFileName
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--filename ${UnixSocketFileName}"
+ ;;
+
+ * )
+ eerror "Please set a valid value for MonoServerChannel"
+ return 1
+ ;;
+ esac
+
+ if [ ${MonoServerVersion} -eq 1 ]; then
+ modmonoserverpath=1.0/mod-mono-server.exe
+ elif [ ${MonoServerVersion} -eq 2 ]; then
+ modmonoserverpath=2.0/mod-mono-server2.exe
+ elif [ ${MonoServerVersion} -eq 4 ]; then
+ modmonoserverpath=4.0/mod-mono-server4.exe
+ else
+ eerror "MonoServerVersion was not properly set. Check your /etc/conf.d/mod-mono-server"
+ return 1
+ fi
+
+ export MONO_SHARED_DIR=/tmp
+
+ ebegin "Starting mod-mono-server"
+
+ start-stop-daemon --quiet --start \
+ --background \
+ --make-pidfile \
+ --pidfile /var/run/aspnet/mod-mono-server.pid \
+ --user aspnet \
+ --exec /usr/bin/mono /usr/lib/mono/${modmonoserverpath} \
+ -- $MONO_SERVER_OPTS
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping mod-mono-server"
+
+ start-stop-daemon --quiet --stop \
+ --pidfile /var/run/aspnet/mod-mono-server.pid
+
+ eend $?
+}
diff --git a/dev-dotnet/xsp/xsp-2.10.2-r1.ebuild b/dev-dotnet/xsp/xsp-2.10.2-r1.ebuild
new file mode 100644
index 000000000000..98ea509d8c71
--- /dev/null
+++ b/dev-dotnet/xsp/xsp-2.10.2-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/xsp/xsp-2.10.2-r1.ebuild,v 1.1 2012/01/22 12:54:29 pacho Exp $
+
+EAPI="4"
+inherit go-mono mono
+
+PATCHDIR="${FILESDIR}/2.2/"
+
+DESCRIPTION="XSP is a small web server that can host ASP.NET pages"
+HOMEPAGE="http://www.mono-project.com/ASP.NET"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE=""
+
+RDEPEND="dev-db/sqlite:3"
+DEPEND="${RDEPEND}"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+
+src_configure() {
+ default
+}
+
+pkg_preinst() {
+ enewgroup aspnet
+ # Give aspnet home dir of /tmp since it must create ~/.wapi
+ enewuser aspnet -1 -1 /tmp aspnet
+}
+
+src_install() {
+ mv_command="cp -ar" go-mono_src_install
+ newinitd "${PATCHDIR}"/xsp.initd xsp
+ newinitd "${PATCHDIR}"/mod-mono-server-r1.initd mod-mono-server
+ newconfd "${PATCHDIR}"/xsp.confd xsp
+ newconfd "${PATCHDIR}"/mod-mono-server.confd mod-mono-server
+
+ keepdir /var/run/aspnet
+}
+
+pkg_postinst() {
+ chown aspnet:aspnet /var/run/aspnet
+}