1 |
commit: 4c99d2bb9c095e711767aa8a912a90c4bc82c0c9 |
2 |
Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 22 08:21:01 2017 +0000 |
4 |
Commit: José María Alonso <nimiux <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 22 08:21:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=4c99d2bb |
7 |
|
8 |
dev-lisp/restas: Adds new ebuild. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/379625 |
11 |
|
12 |
dev-lisp/restas/files/70restas-gentoo.el | 2 ++ |
13 |
dev-lisp/restas/files/restas.lo | 33 +++++++++++++++++++++ |
14 |
dev-lisp/restas/restas-0.1.4.ebuild | 51 ++++++++++++++++++++++++++++++++ |
15 |
3 files changed, 86 insertions(+) |
16 |
|
17 |
diff --git a/dev-lisp/restas/files/70restas-gentoo.el b/dev-lisp/restas/files/70restas-gentoo.el |
18 |
new file mode 100644 |
19 |
index 00000000..e6399055 |
20 |
--- /dev/null |
21 |
+++ b/dev-lisp/restas/files/70restas-gentoo.el |
22 |
@@ -0,0 +1,2 @@ |
23 |
+(add-to-list 'load-path "@SITELISP@") |
24 |
+ |
25 |
|
26 |
diff --git a/dev-lisp/restas/files/restas.lo b/dev-lisp/restas/files/restas.lo |
27 |
new file mode 100644 |
28 |
index 00000000..a7797a3f |
29 |
--- /dev/null |
30 |
+++ b/dev-lisp/restas/files/restas.lo |
31 |
@@ -0,0 +1,33 @@ |
32 |
+#!/sbin/runscript |
33 |
+# -*- mode: sh -*- |
34 |
+ |
35 |
+opts="nodaemon" |
36 |
+ |
37 |
+LISP="/usr/share/common-lisp/source/restas/contrib/restas-daemon.lisp" |
38 |
+ |
39 |
+NAME="${SVCNAME#*.}" |
40 |
+CONF="/etc/restas/${NAME}.lisp" |
41 |
+ |
42 |
+start () { |
43 |
+ ebegin "Starting ${NAME}" |
44 |
+ |
45 |
+ export LC_ALL="ru_RU.UTF-8" |
46 |
+ |
47 |
+ sbcl --noinform --no-userinit --no-sysinit --load $LISP $CONF start |
48 |
+ |
49 |
+ eend "$?" "Failed" |
50 |
+} |
51 |
+ |
52 |
+stop () { |
53 |
+ ebegin "Stopping ${NAME}" |
54 |
+ |
55 |
+ sbcl --noinform --no-userinit --no-sysinit --load $LISP $CONF stop |
56 |
+ |
57 |
+ eend "$?" "Failed" |
58 |
+} |
59 |
+ |
60 |
+nodaemon () { |
61 |
+ export LC_ALL="ru_RU.UTF-8" |
62 |
+ |
63 |
+ sbcl --noinform --no-userinit --no-sysinit --load $LISP $CONF nodaemon |
64 |
+} |
65 |
|
66 |
diff --git a/dev-lisp/restas/restas-0.1.4.ebuild b/dev-lisp/restas/restas-0.1.4.ebuild |
67 |
new file mode 100644 |
68 |
index 00000000..efd4be59 |
69 |
--- /dev/null |
70 |
+++ b/dev-lisp/restas/restas-0.1.4.ebuild |
71 |
@@ -0,0 +1,51 @@ |
72 |
+# Copyright 1999-2017 Gentoo Foundation |
73 |
+# Distributed under the terms of the GNU General Public License v2 |
74 |
+ |
75 |
+EAPI=6 |
76 |
+ |
77 |
+inherit common-lisp-3 elisp-common eutils |
78 |
+ |
79 |
+MY_PV="version-${PV}" |
80 |
+ |
81 |
+DESCRIPTION="Common Lisp application server" |
82 |
+HOMEPAGE="https://github.com/archimag/restas" |
83 |
+SRC_URI="https://github.com/archimag/restas/archive/${MY_PV}.tar.gz" |
84 |
+ |
85 |
+LICENSE="LLGPL-2.1" |
86 |
+SLOT="0" |
87 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
88 |
+IUSE="doc slime" |
89 |
+ |
90 |
+RDEPEND=" >=dev-lisp/cl-routes-0.2.2 |
91 |
+ dev-lisp/alexandria |
92 |
+ >=dev-lisp/hunchentoot-1.2.0 |
93 |
+ slime? ( dev-lisp/closer-mop )" |
94 |
+ |
95 |
+S="${WORKDIR}/${PN}-${MY_PV}" |
96 |
+SITEFILE=70${PN}-gentoo.el |
97 |
+ |
98 |
+src_compile () { |
99 |
+ if use slime ; then |
100 |
+ elisp-compile slime/${PN}.el || die "Cannot compile elisp files" |
101 |
+ fi |
102 |
+} |
103 |
+ |
104 |
+src_install() { |
105 |
+ common-lisp-install-sources src/ contrib slime/restas-swank.lisp |
106 |
+ common-lisp-install-asdf |
107 |
+ |
108 |
+ doinitd "${FILESDIR}"/restas.lo || die "doinitd failed" |
109 |
+ |
110 |
+ if use slime; then |
111 |
+ elisp-install ${PN} slime/${PN}.el || die "Cannot install elisp sources" |
112 |
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die "Cannot install elisp site file" |
113 |
+ fi |
114 |
+} |
115 |
+ |
116 |
+pkg_postinst() { |
117 |
+ use slime && elisp-site-regen |
118 |
+} |
119 |
+ |
120 |
+pkg_postrm() { |
121 |
+ use slime && elisp-site-regen |
122 |
+} |