diff options
Diffstat (limited to 'www-servers/ocsigenserver')
-rw-r--r-- | www-servers/ocsigenserver/ChangeLog | 12 | ||||
-rw-r--r-- | www-servers/ocsigenserver/files/ocsigenserver-2.1-makefile.patch | 14 | ||||
-rw-r--r-- | www-servers/ocsigenserver/files/ocsigenserver.confd | 22 | ||||
-rw-r--r-- | www-servers/ocsigenserver/files/ocsigenserver.initd | 51 | ||||
-rw-r--r-- | www-servers/ocsigenserver/metadata.xml | 5 | ||||
-rw-r--r-- | www-servers/ocsigenserver/ocsigenserver-2.1.ebuild | 83 |
6 files changed, 187 insertions, 0 deletions
diff --git a/www-servers/ocsigenserver/ChangeLog b/www-servers/ocsigenserver/ChangeLog new file mode 100644 index 000000000000..a8fcf7ce3130 --- /dev/null +++ b/www-servers/ocsigenserver/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for www-servers/ocsigenserver +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/ocsigenserver/ChangeLog,v 1.1 2012/08/07 18:32:35 aballier Exp $ + +*ocsigenserver-2.1 (07 Aug 2012) + + 07 Aug 2012; Alexis Ballier <aballier@gentoo.org> +ocsigenserver-2.1.ebuild, + +files/ocsigenserver-2.1-makefile.patch, +files/ocsigenserver.confd, + +files/ocsigenserver.initd, +metadata.xml: + initial import, split of www-servers/ocsigen, ebuild based on old one by + Guillaume Horel and Jacques-Pascal Deplaix, bug #406513 + diff --git a/www-servers/ocsigenserver/files/ocsigenserver-2.1-makefile.patch b/www-servers/ocsigenserver/files/ocsigenserver-2.1-makefile.patch new file mode 100644 index 000000000000..9c5913c3bad7 --- /dev/null +++ b/www-servers/ocsigenserver/files/ocsigenserver-2.1-makefile.patch @@ -0,0 +1,14 @@ +Tue Jul 3 16:21:48 CEST 2012 Jacques-Pascal Deplaix <jp.deplaix@gmail.com> + * Fix error on make logrotate +diff -rN -u old-ocsigenserver.dev/Makefile new-ocsigenserver.dev/Makefile +--- old-ocsigenserver.dev/Makefile 2012-08-07 20:23:31.171512318 +0200 ++++ new-ocsigenserver.dev/Makefile 2012-08-07 20:23:31.287514234 +0200 +@@ -138,7 +138,7 @@ + | sed s%USER%$(OCSIGENUSER)%g \ + | sed s%GROUP%$(OCSIGENGROUP)%g \ + | sed s%_COMMANDPIPE_%$(COMMANDPIPE)%g \ +- > $(TEMPROOT)/etc/logrotate.d/$(PROJECTNAME) } ++ > $(TEMPROOT)/etc/logrotate.d/$(PROJECTNAME) + + ### + diff --git a/www-servers/ocsigenserver/files/ocsigenserver.confd b/www-servers/ocsigenserver/files/ocsigenserver.confd new file mode 100644 index 000000000000..19de30cc93e3 --- /dev/null +++ b/www-servers/ocsigenserver/files/ocsigenserver.confd @@ -0,0 +1,22 @@ +# /etc/conf.d/ocsigenserver : config file for /etc/init.d/ocsigenserver + +# Path for the ocsigen binary (add opt for native executable) + +#DAEMON=/usr/bin/ocsigenserver.opt +DAEMON=/usr/bin/ocsigenserver + +# Name for ocsigen daemon + +NAME=ocsigenserver + +# Locstion of Ocsigen config file + +CONF=/etc/$NAME/ocsigenserver.conf + +# PID file location + +PIDFILE=/var/run/$NAME.pid + +# Add here any additional aptions for ocsigen + +OCSIGEN_OPTS="" diff --git a/www-servers/ocsigenserver/files/ocsigenserver.initd b/www-servers/ocsigenserver/files/ocsigenserver.initd new file mode 100644 index 000000000000..02edbd8fa603 --- /dev/null +++ b/www-servers/ocsigenserver/files/ocsigenserver.initd @@ -0,0 +1,51 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="depend checkconfig reload" + +depend() { + need net + use logger + after bootmist +} + + +checkconfig() { + if [ ! -f "$DAEMON" ] ; then + ewarn "Unable to find $DAEMON" + return 1 + fi + if [ ! -f "$CONF" ] ; then + ewarn $CONF " does not exist." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting ocsigen" + start-stop-daemon --start --exec $DAEMON -- \ + --pidfile $PIDFILE \ + --daemon \ + $OCSIGEN_OPTS + eend $? +} + +stop() { + ebegin "Stopping ocsigen" + start-stop-daemon --stop --pidfile $PIDFILE + eend $? +} + +reload() { + if [ ! -f "$PIDFILE" ] ; then + ewarn "$PIDFILE not found!!" + ewarn "Ocsigen is not running. Not reloading." + return 1 + fi + ebegin "Reloading ocsigen" + echo reload > /var/run/ocsigen_command + eend $? +} diff --git a/www-servers/ocsigenserver/metadata.xml b/www-servers/ocsigenserver/metadata.xml new file mode 100644 index 000000000000..2193d772e351 --- /dev/null +++ b/www-servers/ocsigenserver/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>ml</herd> +</pkgmetadata> diff --git a/www-servers/ocsigenserver/ocsigenserver-2.1.ebuild b/www-servers/ocsigenserver/ocsigenserver-2.1.ebuild new file mode 100644 index 000000000000..beeab824a22b --- /dev/null +++ b/www-servers/ocsigenserver/ocsigenserver-2.1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/ocsigenserver/ocsigenserver-2.1.ebuild,v 1.1 2012/08/07 18:32:35 aballier Exp $ + +EAPI=4 + +inherit eutils multilib findlib user + +DESCRIPTION="Ocaml-powered webserver and framework for dynamic web programming" +HOMEPAGE="http://www.ocsigen.org" +SRC_URI="http://ocsigen.org/download/${P}.tar.gz" + +LICENSE="LGPL-2.1-with-linking-exception" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug doc dbm +ocamlopt +sqlite zlib" +REQUIRED_USE="|| ( sqlite dbm )" +RESTRICT="strip installsources" + +DEPEND=">=dev-ml/lwt-2.3.0[react,ssl] + zlib? ( >=dev-ml/camlzip-1.03-r1 ) + dev-ml/cryptokit + >=dev-ml/ocamlnet-2.2.9 + >=dev-ml/pcre-ocaml-6.0.1 + >=dev-ml/tyxml-2.1 + >=dev-lang/ocaml-3.12[ocamlopt?] + dbm? ( >=dev-lang/ocaml-3.12[gdbm] ) + sqlite? ( dev-ml/ocaml-sqlite3 )" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup ocsigenserver + enewuser ocsigenserver -1 -1 /var/www ocsigenserver +} + +src_prepare() { + epatch "${FILESDIR}/${P}-makefile.patch" +} + +src_configure() { + sh configure \ + --prefix /usr \ + --temproot "${ED}" \ + --bindir /usr/bin \ + --docdir /usr/share/doc/${PF} \ + --mandir /usr/share/man/man1 \ + --libdir /usr/$(get_libdir)/ocaml \ + $(use_enable debug) \ + $(use_with zlib camlzip) \ + $(use_with sqlite) \ + $(use_with dbm) \ + --ocsigen-group ocsigenserver \ + --ocsigen-user ocsigenserver \ + --name ocsigenserver \ + || die "Error : configure failed!" +} + +src_compile() { + if use ocamlopt; then + emake + else + emake byte + fi + use doc && emake doc +} + +src_install() { + findlib_src_preinst + if use ocamlopt; then + emake install + else + emake install.byte + fi + if use doc ; then + emake install.doc + fi + emake logrotate + + newinitd "${FILESDIR}"/ocsigenserver.initd ocsigenserver || die + newconfd "${FILESDIR}"/ocsigenserver.confd ocsigenserver || die + + dodoc README +} |