Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2006 20:47:03 -0000
From:      Shaun Amott <shaun@inerd.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/94243: shells/wapsh - update, make fetchable, take maintainership
Message-ID:  <1141850823.22989@charon.picobyte.net>
Resent-Message-ID: <200603082050.k28Ko4tO061340@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         94243
>Category:       ports
>Synopsis:       shells/wapsh - update, make fetchable, take maintainership
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 08 20:50:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Shaun Amott
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
>Environment:

>Description:

- Upgrade to latest version (make fetchable again)
- Add WWW line and more supported phones to pkg-descr
- Single PLIST file addition
- Replace rc.d script with new rc.subr-style
- Install in more appropriate place
- Take maintainership

>How-To-Repeat:

>Fix:

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

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1141850823.22989>