commit:     4c99d2bb9c095e711767aa8a912a90c4bc82c0c9
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 22 08:21:01 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sun Oct 22 08:21:01 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=4c99d2bb

dev-lisp/restas: Adds new ebuild.

Bug: https://bugs.gentoo.org/379625

 dev-lisp/restas/files/70restas-gentoo.el |  2 ++
 dev-lisp/restas/files/restas.lo          | 33 +++++++++++++++++++++
 dev-lisp/restas/restas-0.1.4.ebuild      | 51 ++++++++++++++++++++++++++++++++
 3 files changed, 86 insertions(+)

diff --git a/dev-lisp/restas/files/70restas-gentoo.el 
b/dev-lisp/restas/files/70restas-gentoo.el
new file mode 100644
index 00000000..e6399055
--- /dev/null
+++ b/dev-lisp/restas/files/70restas-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+

diff --git a/dev-lisp/restas/files/restas.lo b/dev-lisp/restas/files/restas.lo
new file mode 100644
index 00000000..a7797a3f
--- /dev/null
+++ b/dev-lisp/restas/files/restas.lo
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# -*- mode: sh -*-
+
+opts="nodaemon"
+
+LISP="/usr/share/common-lisp/source/restas/contrib/restas-daemon.lisp"
+
+NAME="${SVCNAME#*.}"
+CONF="/etc/restas/${NAME}.lisp"
+
+start () {
+       ebegin "Starting ${NAME}"
+
+    export LC_ALL="ru_RU.UTF-8"
+
+    sbcl --noinform --no-userinit --no-sysinit --load $LISP $CONF start
+    
+    eend "$?" "Failed"
+}
+
+stop () {
+       ebegin "Stopping ${NAME}"
+    
+    sbcl --noinform --no-userinit --no-sysinit --load $LISP $CONF stop
+
+    eend "$?" "Failed"
+}
+
+nodaemon () {
+    export LC_ALL="ru_RU.UTF-8"
+
+    sbcl --noinform --no-userinit --no-sysinit --load $LISP $CONF nodaemon
+}

diff --git a/dev-lisp/restas/restas-0.1.4.ebuild 
b/dev-lisp/restas/restas-0.1.4.ebuild
new file mode 100644
index 00000000..efd4be59
--- /dev/null
+++ b/dev-lisp/restas/restas-0.1.4.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit common-lisp-3 elisp-common eutils
+
+MY_PV="version-${PV}"
+
+DESCRIPTION="Common Lisp application server"
+HOMEPAGE="https://github.com/archimag/restas";
+SRC_URI="https://github.com/archimag/restas/archive/${MY_PV}.tar.gz";
+
+LICENSE="LLGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="doc slime"
+
+RDEPEND=" >=dev-lisp/cl-routes-0.2.2
+                dev-lisp/alexandria
+                >=dev-lisp/hunchentoot-1.2.0
+                slime? ( dev-lisp/closer-mop )"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+SITEFILE=70${PN}-gentoo.el
+
+src_compile () {
+       if use slime ; then
+               elisp-compile slime/${PN}.el || die "Cannot compile elisp files"
+       fi
+}
+
+src_install() {
+       common-lisp-install-sources src/ contrib slime/restas-swank.lisp
+       common-lisp-install-asdf
+
+       doinitd "${FILESDIR}"/restas.lo || die "doinitd failed"
+
+       if use slime; then
+               elisp-install ${PN} slime/${PN}.el || die "Cannot install elisp 
sources"
+               elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die 
"Cannot install elisp site file"
+       fi
+}
+
+pkg_postinst() {
+       use slime && elisp-site-regen
+}
+
+pkg_postrm() {
+       use slime && elisp-site-regen
+}

Reply via email to