View | Details | Raw Unified | Return to bug 94243
Collapse All | Expand All

(-)wapsh/Makefile (-40 / +57 lines)
Lines 5-43 Link Here
5
# $FreeBSD: ports/shells/wapsh/Makefile,v 1.11 2005/02/21 01:19:33 kris Exp $
5
# $FreeBSD: ports/shells/wapsh/Makefile,v 1.11 2005/02/21 01:19:33 kris Exp $
6
#
6
#
7
7
8
PORTNAME=		wapsh
8
PORTNAME=	wapsh
9
PORTVERSION=		1.0
9
PORTVERSION=	1.0.1
10
PORTREVISION=		1
10
CATEGORIES=	shells
11
CATEGORIES=		shells
11
MASTER_SITES=	http://www.exolution.de/geschaeft/produkte/wapsh/
12
MASTER_SITES=		http://www.exolution.de/wapsh/
12
DISTNAME=	${PORTNAME}_${PORTVERSION}
13
DISTNAME=		${PORTNAME}_${PORTVERSION}
13
14
14
MAINTAINER=	shaun@inerd.com
15
MAINTAINER=		ports@FreeBSD.org
15
COMMENT=	A system to allow remote shell logins via a WAP phone or web browser
16
COMMENT=		A system to allow remote shell logins via a WAP phone or web browser
16
17
17
USE_RC_SUBR=	htshd.sh
18
WRKSRC=			${WRKDIR}/${DISTNAME:S/_/-/}
18
19
19
WRKSRC=		${WRKDIR}/${DISTNAME:S/_/-/}
20
USERGUIDEDOCS=		Image10.jpg Image11.jpg Image12.jpg Image13.jpg \
20
21
			Image14.jpg Image15.jpg Image16.jpg Image17.jpg \
21
WWWOWN?=	www
22
			Image18.jpg Image19.jpg Image20.jpg Image21.jpg \
22
WWWGRP?=	www
23
			Image22.jpg Image23.jpg Image24.jpg Image25.gif \
23
WWWDIR?=	www/data/${PORTNAME}
24
			Image26.jpg Image27.jpg Image28.jpg Image29.jpg \
24
DATADIR=	${PREFIX}/${WWWDIR}
25
			Image30.jpg Image31.jpg Image32.jpg Image33.jpg \
25
SUB_FILES=	pkg-message
26
			Image34.jpg Image35.jpg Image36.jpg Image37.jpg \
26
27
			Image38.jpg Image39.jpg Image4.gif Image40.jpg \
27
USERGUIDEDOCS=	Image10.jpg Image11.jpg Image12.jpg Image13.jpg \
28
			Image41.jpg Image42.jpg Image43.jpg Image44.jpg \
28
		Image14.jpg Image15.jpg Image16.jpg Image17.jpg \
29
			Image45.jpg Image46.jpg Image47.jpg Image48.jpg \
29
		Image18.jpg Image19.jpg Image20.jpg Image21.jpg \
30
			Image49.jpg Image5.gif Image50.gif Image51.jpg \
30
		Image22.jpg Image23.jpg Image24.jpg Image25.gif \
31
			Image52.jpg Image53.gif Image54.jpg Image55.jpg \
31
		Image26.jpg Image27.jpg Image28.jpg Image29.jpg \
32
			Image56.jpg Image6.jpg Image7.jpg Image8.jpg \
32
		Image30.jpg Image31.jpg Image32.jpg Image33.jpg \
33
			Image9.jpg index.html
33
		Image34.jpg Image35.jpg Image36.jpg Image37.jpg \
34
34
		Image38.jpg Image39.jpg Image4.gif Image40.jpg  \
35
HTDOCS=			command.php command_html.inc command_wml.inc \
35
		Image41.jpg Image42.jpg Image43.jpg Image44.jpg \
36
			common.inc common_html.inc common_wml.inc \
36
		Image45.jpg Image46.jpg Image47.jpg Image48.jpg \
37
			controls_wml.php displayfuncs.inc getloginhosts.inc \
37
		Image49.jpg Image5.gif Image50.gif Image51.jpg  \
38
			history_edit_wml.php history_html.php history_wml.php \
38
		Image52.jpg Image53.gif Image54.jpg Image55.jpg \
39
			login_html.php login_wml.php scroll_wml.php \
39
		Image56.jpg Image6.jpg Image7.jpg Image8.jpg    \
40
			shortcuts_wml.php
40
		Image9.jpg index.html
41
42
HTDOCS=		command.php command_html.inc command_wml.inc          \
43
		common.inc common_html.inc common_wml.inc             \
44
		controls_wml.php displayfuncs.inc getloginhosts.inc   \
45
		history_edit_wml.php history_html.php history_wml.php \
46
		login_html.php login_wml.php scroll_wml.php           \
47
		shortcuts_wml.php index.html
41
48
42
post-patch:
49
post-patch:
43
	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/htshd/htshd.c > ${WRKDIR}/foo && \
50
	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/htshd/htshd.c > ${WRKDIR}/foo && \
Lines 47-52 Link Here
47
	(cd ${WRKSRC}/htshd && ${CC} ${CFLAGS} -o htshd htshd.c -lcrypt \
54
	(cd ${WRKSRC}/htshd && ${CC} ${CFLAGS} -o htshd htshd.c -lcrypt \
48
		-lutil -DUSE_DEV_RANDOM=1 -DHAVE_SETENV)
55
		-lutil -DUSE_DEV_RANDOM=1 -DHAVE_SETENV)
49
56
57
pre-install:
58
	@${ECHO_MSG} "----------------------------------------------------------------"
59
	@${ECHO_MSG} "Set WWWDIR to the location of your web server's document root,"
60
	@${ECHO_MSG} "relative to ${PREFIX}"
61
	@${ECHO_MSG} ""
62
	@${ECHO_MSG} "${PORTNAME} will be installed under ${PREFIX}/\$$WWWDIR/"
63
	@${ECHO_MSG} ""
64
	@${ECHO_MSG} "The current value of WWWDIR is: ${WWWDIR}"
65
	@${ECHO_MSG} ""
66
	@${ECHO_MSG} "Press CTRL+C now to change it."
67
	@${ECHO_MSG} "----------------------------------------------------------------"
68
	@sleep 2
69
50
do-install:
70
do-install:
51
	${INSTALL_PROGRAM} ${WRKSRC}/htshd/htshd ${PREFIX}/sbin
71
	${INSTALL_PROGRAM} ${WRKSRC}/htshd/htshd ${PREFIX}/sbin
52
72
Lines 59-68 Link Here
59
	fi
79
	fi
60
.endfor
80
.endfor
61
81
62
	${MKDIR} ${PREFIX}/share/wapsh/htdocs
82
	${MKDIR} ${DATADIR}
63
.for H in ${HTDOCS}
83
.for H in ${HTDOCS}
64
	${INSTALL_DATA} ${WRKSRC}/htdocs/$H ${PREFIX}/share/wapsh/htdocs
84
	${INSTALL_DATA} ${WRKSRC}/htdocs/$H ${DATADIR}
65
.endfor
85
.endfor
86
	${CHOWN} -R ${WWWOWN}:${WWWGRP} ${DATADIR}
66
87
67
.if !defined(NOPORTDOCS)
88
.if !defined(NOPORTDOCS)
68
	${MKDIR} ${DOCSDIR}/admin_guide
89
	${MKDIR} ${DOCSDIR}/admin_guide
Lines 87-96 Link Here
87
	@${ECHO} "updating /etc/services"
108
	@${ECHO} "updating /etc/services"
88
	@${CP} /etc/services /etc/services.bak
109
	@${CP} /etc/services /etc/services.bak
89
	@(${GREP} -v ^htsh /etc/services.bak; ${ECHO_CMD} "htsh		3001/tcp    # htsh/wapsh server") > /etc/services
110
	@(${GREP} -v ^htsh /etc/services.bak; ${ECHO_CMD} "htsh		3001/tcp    # htsh/wapsh server") > /etc/services
90
	@if [ ! -f ${PREFIX}/etc/rc.d/htshd.sh ]; then \
111
	@${CAT} ${PKGMESSAGE}
91
		${ECHO} "===>   Installing ${PREFIX}/etc/rc.d/htshd.sh startup file."; \
92
		${INSTALL_SCRIPT} ${FILESDIR}/htshd.sh ${PREFIX}/etc/rc.d/htshd.sh; \
93
	fi
94
	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${PKGMESSAGE}
95
112
96
.include <bsd.port.mk>
113
.include <bsd.port.mk>
(-)wapsh/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (wapsh_1.0.tar.gz) = 4e836a2edd189d3301ca6fa7ba52cafb
1
MD5 (wapsh_1.0.1.tar.gz) = dc5efdfffd7fc8b4a610b160585113ff
2
SHA256 (wapsh_1.0.tar.gz) = aab2b3ef5b3b497785cd281682c5d9ef20e8780a9b1ba97f279c4d59e742d3f1
2
SHA256 (wapsh_1.0.1.tar.gz) = 49ee84ed6e92e747931a090a2804d933bac31f4c92eda66ee091ad9698d5aef7
3
SIZE (wapsh_1.0.tar.gz) = 3552353
3
SIZE (wapsh_1.0.1.tar.gz) = 3547292
(-)wapsh/files/htshd.sh (-20 lines)
Lines 1-20 Link Here
1
#!/bin/sh
2
3
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
4
    echo "$0: Cannot determine the PREFIX" >&2
5
    exit 1
6
fi
7
8
case "$1" in
9
start)
10
	[ -x "${PREFIX}/sbin/htshd" -a -f "${PREFIX}/etc/wapsh/htshd.conf" ] && ${PREFIX}/sbin/htshd -f ${PREFIX}/etc/wapsh/htshd.conf > /dev/null && echo -n ' htshd'
11
	;;
12
stop)
13
	killall htshd && echo -n ' htshd'
14
	;;
15
*)
16
	echo "Usage: `basename $0` {start|stop}" >&2
17
	;;
18
esac
19
20
exit 0
(-)wapsh/files/htshd.sh.in (+18 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# PROVIDE: htshd
4
# REQUIRE: DAEMON
5
# BEFORE:  LOGIN
6
7
. %%RC_SUBR%%
8
9
name="htshd"
10
rcvar=`set_rcvar`
11
load_rc_config $name
12
13
htshd_enable=${htshd_enable:-"NO"}
14
15
command="%%PREFIX%%/sbin/htshd"
16
required_files="%%PREFIX%%/etc/wapsh/htshd.conf"
17
18
run_rc_command "$1"
(-)wapsh/files/patch-htshd::htshd.c (-72 lines)
Lines 13-87 Link Here
13
 				/* Default name of global user 
13
 				/* Default name of global user 
14
 				   initialisation file */
14
 				   initialisation file */
15
 #define RCFILE ".htshrc"	/* Name of user-specific initialisation file
15
 #define RCFILE ".htshrc"	/* Name of user-specific initialisation file
16
@@ -3572,39 +3572,38 @@
17
 usage(void)
18
 {
19
     if (!weAreDaemon) {
20
-        fprintf(stderr, 
21
-"htsh options are:
22
--b numbytes         Specify upper limit for per-user shell output buffers
23
-		    (Default: %d bytes)
24
--c numbytes	    Maximum number of bytes to be transferred at a time 
25
-                    between Client Shell and HTTP Server.  
26
-		    (Default: %d bytes, minimum setting %d bytes)
27
--d		    Run in debug mode
28
--D [y|n]	    If argument is 'y' run as daemon, otherwise ('n')
29
-		    do not daemonise.  
30
-		    (If run from inetd, htsh is always a daemon.  If run from a 
31
-		    shell, htsh is a daemon by default)
32
--f config-file	    Use named file for startup configuration, instead of %s
33
--F		    Do not use standard configuration file (%s)
34
--h		    Display this help message
35
--g global-init-file Use named file as login initialisation file for all user
36
-		    logins.  (Default: %s)
37
--H http-server	    Specify HTTP server from which connections will 
38
-                    be accepted.  (Can be specified multiple times)
39
--L log-file-dir     Record script(1) style log of each login session
40
-                    in named directory
41
--o numsecs	    Timeout for shell output (Default: %3.1f seconds, 
42
-                    minimum: %3.1f, maximum: %4.1f seconds)
43
--p port-num	    Specify TCP port on which htsh should listen for 
44
-                    connections.  (Default is %s in /etc/services)
45
--P 'proto-name... ' Specify list of allowed login protocols 
46
-                    (can be '%s' and or '%s'
47
--t numsecs    	    Timeout for shell input (Default: %d seconds)
48
--u username	    Specify user who is allowed to login to htsh
49
-                    (Can be repeated multiple times)
50
-
51
-The -c, -D, -o, -p, and -t options override corresponding options in the
52
-configuration file.  The -h and -u options are additive with corresponding
53
+        fprintf(stderr, "htsh options are: \n\
54
+-b numbytes         Specify upper limit for per-user shell output buffers \n\
55
+		    (Default: %d bytes)\n\
56
+-c numbytes	    Maximum number of bytes to be transferred at a time \n\
57
+                    between Client Shell and HTTP Server.  \n\
58
+		    (Default: %d bytes, minimum setting %d bytes)\n\
59
+-d		    Run in debug mode\n\
60
+-D [y|n]	    If argument is 'y' run as daemon, otherwise ('n')\n\
61
+		    do not daemonise.  \n\
62
+		    (If run from inetd, htsh is always a daemon.  If run from a \n\
63
+		    shell, htsh is a daemon by default)\n\
64
+-f config-file	    Use named file for startup configuration, instead of %s\n\
65
+-F		    Do not use standard configuration file (%s)\n\
66
+-h		    Display this help message\n\
67
+-g global-init-file Use named file as login initialisation file for all user\n\
68
+		    logins.  (Default: %s)\n\
69
+-H http-server	    Specify HTTP server from which connections will \n\
70
+                    be accepted.  (Can be specified multiple times)\n\
71
+-L log-file-dir     Record script(1) style log of each login session\n\
72
+                    in named directory\n\
73
+-o numsecs	    Timeout for shell output (Default: %3.1f seconds, \n\
74
+                    minimum: %3.1f, maximum: %4.1f seconds)\n\
75
+-p port-num	    Specify TCP port on which htsh should listen for \n\
76
+                    connections.  (Default is %s in /etc/services)\n\
77
+-P 'proto-name... ' Specify list of allowed login protocols \n\
78
+                    (can be '%s' and or '%s'\n\
79
+-t numsecs    	    Timeout for shell input (Default: %d seconds)\n\
80
+-u username	    Specify user who is allowed to login to htsh\n\
81
+                    (Can be repeated multiple times)\n\
82
+\n\
83
+The -c, -D, -o, -p, and -t options override corresponding options in the\n\
84
+configuration file.  The -h and -u options are additive with corresponding\n\
85
 options in the configuration file\n", 
86
     		DEF_OUTPUT_BUFFER_LIMIT,
87
         	DEF_CS_MAX_TRANSFER_SIZE, CS_MAX_TRANSFER_SIZE_LOW_BOUND,
(-)wapsh/files/pkg-message.in (+11 lines)
Line 0 Link Here
1
------------------------------------------------------------------------
2
wapsh/htsh is now installed.
3
4
Sample configuration files can be found in %%PREFIX%%/etc/wapsh
5
6
PHP scripts for both HTTP and WAP access have been installed in
7
%%DATADIR%%
8
9
Please read the installed documentation for information on how to create
10
the configuration files.
11
------------------------------------------------------------------------
(-)wapsh/pkg-descr (-1 / +6 lines)
Lines 6-14 Link Here
6
htsh:
6
htsh:
7
  * Nokia 6210
7
  * Nokia 6210
8
  * Nokia 7110
8
  * Nokia 7110
9
  * Siemens C35 and S35
9
  * Motorola Timeport P7389
10
  * Siemens C35 and S35, S45, S55
11
  * Samsung SCH-20
12
  * Sony CMD-J5
10
  * Nokia WAP Toolkit 2.0 "Blueprint" phone emulator
13
  * Nokia WAP Toolkit 2.0 "Blueprint" phone emulator
11
  * UP.Simulator 4.0 from Phone.com
14
  * UP.Simulator 4.0 from Phone.com
12
15
13
We welcome feedback (at wapsh@exolution.de) from users about their
16
We welcome feedback (at wapsh@exolution.de) from users about their
14
experiences using other phone types.
17
experiences using other phone types.
18
19
WWW: http://www.exolution.de/geschaeft/produkte/wapsh.en.htm
(-)wapsh/pkg-message (-12 lines)
Lines 1-12 Link Here
1
2
wapsh/htsh is now installed.
3
4
Sample configuration files can be found in %%PREFIX%%/etc/wapsh
5
6
HTML documentation has been installed in %%PREFIX%%/share/doc/wapsh
7
8
PHP scripts for both HTTP and WAP access have been installed in
9
%%PREFIX%%/share/wapsh/htdocs
10
11
Please read the installed documentation for information on how to create
12
the configuration files.
(-)wapsh/pkg-plist (-18 / +17 lines)
Lines 1-5 Link Here
1
sbin/htshd
1
sbin/htshd
2
etc/rc.d/htshd.sh
3
@unexec if cmp -s %D/etc/wapsh/htsh_profile %D/etc/wapsh/htsh_profile.dist; then rm -f %D/etc/wapsh/htsh_profile; fi
2
@unexec if cmp -s %D/etc/wapsh/htsh_profile %D/etc/wapsh/htsh_profile.dist; then rm -f %D/etc/wapsh/htsh_profile; fi
4
etc/wapsh/htsh_profile.dist
3
etc/wapsh/htsh_profile.dist
5
@exec [ -f %B/htsh_profile ] || cp %B/%f %B/htsh_profile
4
@exec [ -f %B/htsh_profile ] || cp %B/%f %B/htsh_profile
Lines 9-30 Link Here
9
@unexec if cmp -s %D/etc/wapsh/loginhosts %D/etc/wapsh/loginhosts.dist; then rm -f %D/etc/wapsh/loginhosts; fi
8
@unexec if cmp -s %D/etc/wapsh/loginhosts %D/etc/wapsh/loginhosts.dist; then rm -f %D/etc/wapsh/loginhosts; fi
10
etc/wapsh/loginhosts.dist
9
etc/wapsh/loginhosts.dist
11
@exec [ -f %B/loginhosts ] || cp %B/%f %B/loginhosts
10
@exec [ -f %B/loginhosts ] || cp %B/%f %B/loginhosts
12
%%DATADIR%%/htdocs/command.php
11
%%DATADIR%%/command.php
13
%%DATADIR%%/htdocs/command_html.inc
12
%%DATADIR%%/command_html.inc
14
%%DATADIR%%/htdocs/command_wml.inc
13
%%DATADIR%%/command_wml.inc
15
%%DATADIR%%/htdocs/common.inc
14
%%DATADIR%%/common.inc
16
%%DATADIR%%/htdocs/common_html.inc
15
%%DATADIR%%/common_html.inc
17
%%DATADIR%%/htdocs/common_wml.inc
16
%%DATADIR%%/common_wml.inc
18
%%DATADIR%%/htdocs/controls_wml.php
17
%%DATADIR%%/controls_wml.php
19
%%DATADIR%%/htdocs/displayfuncs.inc
18
%%DATADIR%%/displayfuncs.inc
20
%%DATADIR%%/htdocs/getloginhosts.inc
19
%%DATADIR%%/getloginhosts.inc
21
%%DATADIR%%/htdocs/history_edit_wml.php
20
%%DATADIR%%/history_edit_wml.php
22
%%DATADIR%%/htdocs/history_html.php
21
%%DATADIR%%/history_html.php
23
%%DATADIR%%/htdocs/history_wml.php
22
%%DATADIR%%/history_wml.php
24
%%DATADIR%%/htdocs/login_html.php
23
%%DATADIR%%/index.html
25
%%DATADIR%%/htdocs/login_wml.php
24
%%DATADIR%%/login_html.php
26
%%DATADIR%%/htdocs/scroll_wml.php
25
%%DATADIR%%/login_wml.php
27
%%DATADIR%%/htdocs/shortcuts_wml.php
26
%%DATADIR%%/scroll_wml.php
27
%%DATADIR%%/shortcuts_wml.php
28
%%PORTDOCS%%%%DOCSDIR%%/Image1.jpg
28
%%PORTDOCS%%%%DOCSDIR%%/Image1.jpg
29
%%PORTDOCS%%%%DOCSDIR%%/Image2.jpg
29
%%PORTDOCS%%%%DOCSDIR%%/Image2.jpg
30
%%PORTDOCS%%%%DOCSDIR%%/Image3.jpg
30
%%PORTDOCS%%%%DOCSDIR%%/Image3.jpg
Lines 94-98 Link Here
94
%%PORTDOCS%%@dirrm %%DOCSDIR%%/implementation_notes
94
%%PORTDOCS%%@dirrm %%DOCSDIR%%/implementation_notes
95
%%PORTDOCS%%@dirrm %%DOCSDIR%%/user_guide
95
%%PORTDOCS%%@dirrm %%DOCSDIR%%/user_guide
96
%%PORTDOCS%%@dirrm %%DOCSDIR%%
96
%%PORTDOCS%%@dirrm %%DOCSDIR%%
97
@dirrm %%DATADIR%%/htdocs
98
@dirrm %%DATADIR%%
97
@dirrm %%DATADIR%%

Return to bug 94243