All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] This patch add new package ShellInABox that is a program that implements an in-browser command line shell. It works on any JavaScript and CSS enabled web browser.
@ 2016-02-05 12:43 Lucas Zampar Bernardi
  0 siblings, 0 replies; only message in thread
From: Lucas Zampar Bernardi @ 2016-02-05 12:43 UTC (permalink / raw)
  To: buildroot

Installing it on your Linux board you can get the access to the command
prompt directly from web without any needs to install terminal software
on your PC.

Signed-off-by: Lucas Zampar Bernardi <lucas.zampar@gmail.com>
---

Changes v1 -> v2:
  - Correct missing double quote at package/Config.in
---
 package/Config.in                                  |  1 +
 package/shellinabox/Config.in                      | 10 +++++++
 package/shellinabox/S51shellinabox                 | 33 ++++++++++++++++++++++
 .../shellinabox-2.19-remove-static-library.patch   | 12 ++++++++
 package/shellinabox/shellinabox.mk                 | 20 +++++++++++++
 5 files changed, 76 insertions(+)
 create mode 100644 package/shellinabox/Config.in
 create mode 100644 package/shellinabox/S51shellinabox
 create mode 100644 package/shellinabox/shellinabox-2.19-remove-static-library.patch
 create mode 100644 package/shellinabox/shellinabox.mk

diff --git a/package/Config.in b/package/Config.in
index 529ad33..52f7cf2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1444,6 +1444,7 @@ endif
 	source "package/sconeserver/Config.in"
 	source "package/ser2net/Config.in"
 	source "package/shairport-sync/Config.in"
+	source "package/shellinabox/Config.in"
 	source "package/smcroute/Config.in"
 	source "package/socat/Config.in"
 	source "package/socketcand/Config.in"
diff --git a/package/shellinabox/Config.in b/package/shellinabox/Config.in
new file mode 100644
index 0000000..4187e18
--- /dev/null
+++ b/package/shellinabox/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_SHELLINABOX
+	bool "shellinabox"
+	select BR2_PACKAGE_ZLIB
+	help
+	Shell in a box - implements a web server that can 
+	export arbitrary command line tools to a web based terminal emulator.
+	This emulator is accessible to any JavaScript and CSS 
+	enabled web browser and does not require any additional browser plugins.
+
+	  http://shellinabox.googlecode.com
diff --git a/package/shellinabox/S51shellinabox b/package/shellinabox/S51shellinabox
new file mode 100644
index 0000000..16298e8
--- /dev/null
+++ b/package/shellinabox/S51shellinabox
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+NAME=shellinaboxd
+DAEMON=/usr/bin/$NAME
+ARGS="-s/:LOGIN -t --no-beep -b"
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+case "$1" in
+  start)
+    printf "Starting $NAME: "
+    start-stop-daemon -S -q -x $DAEMON -- $ARGS
+    [ $? = 0 ] && echo "OK" || echo "FAIL"
+    ;;
+  stop)
+    printf "Stopping $NAME: "
+    start-stop-daemon -K -q -n $NAME
+    [ $? = 0 ] && echo "OK" || echo "FAIL"
+    ;;
+  restart|reload)
+    echo "Restarting $NAME: "
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|restart|reload}" >&2
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/package/shellinabox/shellinabox-2.19-remove-static-library.patch b/package/shellinabox/shellinabox-2.19-remove-static-library.patch
new file mode 100644
index 0000000..dcbeb05
--- /dev/null
+++ b/package/shellinabox/shellinabox-2.19-remove-static-library.patch
@@ -0,0 +1,12 @@
+diff -rup shellinabox-2.19_original/Makefile.am shellinabox-2.19/Makefile.am
+--- shellinabox-2.19_original/Makefile.am	2016-02-03 14:17:44.699913649 -0200
++++ shellinabox-2.19/Makefile.am	2016-02-03 14:08:59.795376662 -0200
+@@ -126,7 +126,7 @@ BUILT_SOURCES        = shellinabox/beep.
+ 
+ shellinaboxd_LDADD   = liblogging.la                                          \
+                        libhttp.la
+-shellinaboxd_LDFLAGS = -static
++#shellinaboxd_LDFLAGS = -static
+ ## Added this for compatibility with older versions of autoconf/automake
+ docdir               = ${datadir}/doc/${PACKAGE}
+ 
diff --git a/package/shellinabox/shellinabox.mk b/package/shellinabox/shellinabox.mk
new file mode 100644
index 0000000..c2fe686
--- /dev/null
+++ b/package/shellinabox/shellinabox.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# shellinabox
+#
+################################################################################
+
+SHELLINABOX_VERSION = 2.19
+SHELLINABOX_SOURCE = v$(SHELLINABOX_VERSION).tar.gz
+SHELLINABOX_SITE = https://github.com/shellinabox/shellinabox/archive
+SHELLINABOX_AUTORECONF = YES
+SHELLINABOX_DEPENDENCIES = zlib openssl
+SHELLINABOX_LICENSE = GPLv2
+
+
+define NTP_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 package/shellinabox/S51shellinabox $(TARGET_DIR)/etc/init.d/S51shellinabox
+endef
+
+
+$(eval $(autotools-package))
-- 
2.5.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-05 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05 12:43 [Buildroot] [PATCH v2] This patch add new package ShellInABox that is a program that implements an in-browser command line shell. It works on any JavaScript and CSS enabled web browser Lucas Zampar Bernardi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.