Add port for flash, a user-menu shell. This still needs a

good FreeBSD-specific template; Will is working on one.

PR:		15995
Submitted by:	Will Andrews <andrews@technologist.com>
This commit is contained in:
Wes Peters 2000-01-08 18:23:34 +00:00
parent 981b87c446
commit 37f5aac4ac
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24564
16 changed files with 297 additions and 0 deletions

70
shells/flash/Makefile Normal file
View File

@ -0,0 +1,70 @@
# New ports collection makefile for: flash
# Version required: 0.9.1
# Date created: 11 Dec 1999
# Whom: Will Andrews <andrews@technologist.com>
#
# $FreeBSD$
#
DISTNAME= flash-0.9.1
CATEGORIES= shells
MASTER_SITES= ftp://ftp.netsoc.ucd.ie/pub/computing/flash/
MAINTAINER= andrews@technologist.com
.include <bsd.port.pre.mk>
# outdated version of ncurses in non-CURRENT
.if ${OSVERSION} < 400000
LIB_DEPENDS= ncurses.4:${PORTSDIR}/devel/ncurses
.endif
GNU_CONFIGURE= yes
USE_GMAKE= yes
MAKE_ENV= prefix=${PREFIX}
WRKSRC= ${WRKDIR}/flash
MAN1= flash.1
pre-configure:
.if ${OSVERSION} < 400000
MAKE_ENV+= NCURSES=-DHAVE_NCURSES_NCURSES_H \
NC_CFLAGS="-I${LOCALBASE}/include" \
NC_LFLAGS="-L${LOCALBASE}/lib"
.endif
pre-build:
@${RM} -rf ${WRKSRC}/modules/countdown ${WRKSRC}/modules/background
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/flash ${PREFIX}/bin
@${MKDIR} ${PREFIX}/lib/flash/flashdocs/
.for DOC in checkflash system.bg.Netsoc.3 system.bg.Netsoc.4 system.flashlogin \
system.maillogin system.module system.module.9798 system.rc system.rc.mailshell
@${INSTALL_DATA} ${WRKSRC}/orcasetup/${DOC} ${PREFIX}/lib/flash/
.endfor
.for PROG in background countdown
@${INSTALL_PROGRAM} ${WRKSRC}/modules/${PROG} ${PREFIX}/lib/flash/
.endfor
.for SCRIPT in mailshell system.menu system.menu.9798 system.menu.oldlast system.menu~ \
system.menu.old
@${PERL} -pi -e "s:/usr/slocal:${PREFIX}:g" ${WRKSRC}/orcasetup/${SCRIPT}
@${INSTALL_SCRIPT} ${WRKSRC}/orcasetup/${SCRIPT} ${PREFIX}/lib/flash
.endfor
@${INSTALL_DATA} ${WRKSRC}/orcasetup/flashdocs/* ${PREFIX}/lib/flash/flashdocs/
@${INSTALL_MAN} ${WRKSRC}/flash.1 ${PREFIX}/man/man1
@${INSTALL_PROGRAM} ${WRKSRC}/flash ${PREFIX}/bin
post-install:
@${ECHO} "Updating /etc/shells"
@${CP} /etc/shells /etc/shells.bak
@(${GREP} -v ${PREFIX}/bin/flash /etc/shells.bak; \
${ECHO} ${PREFIX}/bin/flash) > /etc/shells
@${RM} /etc/shells.bak
@${ECHO}
@${ECHO} " -------------------- WARNING -------------------------- "
@${ECHO} "This software is not yet ready-to-go on your system. You "
@${ECHO} "need to configure flash in ${PREFIX}/lib/flash in order for"
@${ECHO} "it to work properly."
@${ECHO}
.include <bsd.port.mk>

1
shells/flash/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (flash-0.9.1.tar.gz) = 8b26c4d562b43d531b836b2279dad447

View File

@ -0,0 +1,56 @@
--- Makefile.in Mon Jun 28 11:28:50 1999
+++ Makefile.in.new Sun Jan 2 21:49:48 2000
@@ -7,9 +7,8 @@
INITIALMENU = system.menu
# Directory to install everything to
-prefix = /usr/slocal
EXEC_PREFIX = ${prefix}
-BINDIR = $(EXEC_PREFIX)/bin
+BINDIR = $(EXEC_PREFIX)/sbin
LIBDIR = $(prefix)/lib/flash
MANDIR = $(prefix)/man/man1
@@ -23,29 +22,38 @@
TAR = tar
TAROPTIONS = zcvf
RELNAME = $(PROGNAME).tar.gz
+NCURSES ?=
+NC_CFLAGS ?=
+NC_LFLAGS ?=
# C Compiler
CC = gcc
DEBUG = -g
#DEBUG = -DDEBUG -g
#CPPFLAGS = -I/usr/include/ncurses -DHAVE_CONFIG_H -DPREFIX=\"/usr/slocal\" #-DDEBUG
-CPPFLAGS = -DHAVE_CONFIG_H -DPREFIX=\"/usr/slocal\" -DDONT_HIGHLIGHT_WITH_REVERSE #-DLITTLE_ENDIAN
+CPPFLAGS = $(NCURSES) $(NC_CFLAGS) -DHAVE_CONFIG_H -DPREFIX=\"$(prefix)\" -DDONT_HIGHLIGHT_WITH_REVERSE #-DLITTLE_ENDIAN
CFLAGS = -O2 $(CPPFLAGS) $(DEBUG) -Wall -rdynamic
-LDFLAGS = -rdynamic
-LIBRARIES = -lncurses -ldl
+LDFLAGS = -rdynamic $(NC_LFLAGS)
+LIBRARIES = -lncurses
SCREEN_SOURCES = screens/nc_init.c screens/nc_lock.c screens/nc_about.c screens/nc_menus.c screens/nc_misc.c screens/nc_job.c screens/nc_module.c
+MODULE_PROGS = modules/countdown modules/background
SOURCES = main.c parse.c string.c set.c misc.c menu.c exec.c rc.c tree.c parseline.c event.c sha.c module.c debug.c $(SCREEN_SOURCES)
OBJECTS = $(SOURCES:.c=.o)
+all: $(PROGNAME)
+
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
-$(PROGNAME): $(OBJECTS)
+$(PROGNAME): $(OBJECTS) $(MODULE_PROGS)
$(RM) $@
$(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBRARIES)
+
+$(MODULE_PROGS):
+ $(MAKE) -C modules && $(MAKE)
shacrypt:
$(CC) $(CFLAGS) -DO_WRAP -o $@ sha.c

View File

@ -0,0 +1,10 @@
--- exec.h Wed Mar 5 06:59:11 1997
+++ exec.h.new Sat Dec 11 01:29:48 1999
@@ -3,6 +3,7 @@
#include<signal.h>
#include<termios.h>
+#include <sys/types.h>
#include "parse.h"
#include "menu.h"

View File

@ -0,0 +1,11 @@
--- menu.c Sun Apr 13 12:43:26 1997
+++ menu.c.new Sat Dec 11 01:30:45 1999
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
#include "menu.h"
#include "parse.h"

View File

@ -0,0 +1,10 @@
--- module.c Tue Jun 29 05:36:28 1999
+++ module.c.new Sat Dec 11 01:34:45 1999
@@ -25,7 +25,6 @@
#include<stdlib.h>
#include<pwd.h>
#include<sys/types.h>
-#include<sys/resource.h>
#include<sys/wait.h>
#include<sys/stat.h>
#include<fcntl.h>

View File

@ -0,0 +1,10 @@
--- parseline.c Tue Jun 29 05:36:47 1999
+++ parseline.c.new Sat Dec 11 01:34:21 1999
@@ -25,7 +25,6 @@
#include<string.h>
#include<pwd.h>
#include<sys/types.h>
-#include<sys/resource.h>
#include<sys/wait.h>
#include<sys/stat.h>
#include<fcntl.h>

View File

@ -0,0 +1,10 @@
--- rc.c Tue Jun 29 05:36:54 1999
+++ rc.c.new Sat Dec 11 01:34:05 1999
@@ -25,7 +25,6 @@
#include<stdlib.h>
#include<pwd.h>
#include<sys/types.h>
-#include<sys/resource.h>
#include<sys/wait.h>
#include<sys/stat.h>
#include<fcntl.h>

View File

@ -0,0 +1,10 @@
--- screens/nc_menus.c Tue Jun 29 05:42:18 1999
+++ screens/nc_menus.c.new Sat Dec 11 01:36:09 1999
@@ -783,7 +783,6 @@
struct menu *menu;
struct menu_items *HK;
int noclobber,gotch;
- char c;
if (!(firstmenu))
return;

View File

@ -0,0 +1,17 @@
--- modules/alarms.c Tue Apr 15 18:34:15 1997
+++ modules/alarms.c.new Sun Jan 2 20:50:02 2000
@@ -1,5 +1,14 @@
+#ifdef HAVE_CONFIG_H
+#include "../config.h"
+#endif
+
+#ifdef HAVE_NCURSES_NCURSES_H
+#include <ncurses/ncurses.h>
+#include <ncurses/term.h>
+#else
#include <curses.h>
#include <term.h>
+#endif
#include <stdlib.h>
#include <stdio.h>

View File

@ -0,0 +1,20 @@
--- modules/background.c Sat Oct 25 11:34:23 1997
+++ modules/background.c.new Sun Jan 2 20:48:46 2000
@@ -20,8 +20,17 @@
*/
+#ifdef HAVE_CONFIG_H
+#include "../config.h"
+#endif
+
+#ifdef HAVE_NCURSES_NCURSES_H
+#include <ncurses/ncurses.h>
+#include <ncurses/term.h>
+#else
#include <curses.h>
#include <term.h>
+#endif
#include <stdlib.h>
#include <stdio.h>

View File

@ -0,0 +1,20 @@
--- modules/countdown.c Wed Oct 29 13:42:28 1997
+++ modules/countdown.c.new Sun Jan 2 20:50:16 2000
@@ -4,8 +4,17 @@
*/
+#ifdef HAVE_CONFIG_H
+#include "../config.h"
+#endif
+
+#ifdef HAVE_NCURSES_NCURSES_H
+#include <ncurses/ncurses.h>
+#include <ncurses/term.h>
+#else
#include <curses.h>
#include <term.h>
+#endif
#include <stdlib.h>
#include <stdio.h>

View File

@ -0,0 +1,12 @@
--- modules/Makefile Sat Oct 25 18:59:03 1997
+++ modules/Makefile.new Sun Jan 2 21:51:53 2000
@@ -1,7 +1,7 @@
CC = gcc
DEBUG = #-g
-CFLAGS = $(DEBUG) -O3 -fpic -shared -Wall
-LDFLAGS = -shared
+CFLAGS = $(NCURSES) $(NC_CFLAGS) $(DEBUG) -O3 -fpic -shared -Wall
+LDFLAGS = $(NC_LFLAGS) -lncurses -shared
OBJECTS = background test alarms countdown

1
shells/flash/pkg-comment Normal file
View File

@ -0,0 +1 @@
ncurses-based restriction shell.

12
shells/flash/pkg-descr Normal file
View File

@ -0,0 +1,12 @@
Flash is an attempt to create a secure menu-driver shell for UNIX-derived OSes,
while providing user-friendliness and easy configurability. An ideal situation
requiring the use of flash would be a student-run telnet server which needs to:
a) shelter the users from some of the nastinesses of UNIX
b) shelter the system from nasty users
c) provide an easy way to launch applications
d) support multitasking/job control as elegantly as possible
e) support easy-to-get-right configuration by administrators
WWW: http://www.netsoc.ucd.ie/flash/
Author: Steve Fegan <flash@netsoc.ucd.ie>

27
shells/flash/pkg-plist Normal file
View File

@ -0,0 +1,27 @@
bin/flash
lib/flash/background
lib/flash/countdown
lib/flash/mailshell
lib/flash/system.bg.Netsoc.3
lib/flash/system.bg.Netsoc.4
lib/flash/system.flashlogin
lib/flash/system.maillogin
lib/flash/system.menu
lib/flash/system.menu.9798
lib/flash/system.menu.oldlast
lib/flash/system.menu.old
lib/flash/system.menu~
lib/flash/system.module
lib/flash/system.module.9798
lib/flash/system.rc
lib/flash/system.rc.mailshell
lib/flash/flashdocs/IrcHelp.txt
lib/flash/flashdocs/apropertelnet.txt
lib/flash/flashdocs/glossary.txt
lib/flash/flashdocs/howuseppgate.txt
lib/flash/flashdocs/howusesquid.txt
lib/flash/flashdocs/speedweb.txt
lib/flash/flashdocs/uselynx.txt
lib/flash/checkflash
@dirrm lib/flash/flashdocs
@dirrm lib/flash