Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2006 12:04:29 +0300
From:      "Ion-Mihai "IOnut" Tetcu" <itetcu@people.tecnik93.com>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/95735: [PATCH] www/instiki: modern USE_RC_SUBR, fix a MASTER_SITE and WWW
Message-ID:  <1145005469.87975@it.buh.tecnik93.com>
Resent-Message-ID: <200604140910.k3E9ACvV031496@freefall.freebsd.org>

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

>Number:         95735
>Category:       ports
>Synopsis:       [PATCH] www/instiki: modern USE_RC_SUBR, fix a MASTER_SITE and WWW
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 14 09:10:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Ion-Mihai "IOnut" Tetcu
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
Tecnik'93 
>Environment:


System: FreeBSD 6.1-PRERELEASE #2: Fri Mar 31 13:08:13 EEST 2006
    root@it.buh.tecnik93.com:/usr/obj/usr/src/sys/IT6_U_P



>Description:


Fix a MASTER_SITE and WWW. [1]
And while here, switch to the modern way fo using rc.d script:
- USE_RC_SUBR=  ${PORTNAME}
(drop  files/instiki.sh, add files/instiki.in with content closer to the example in PH)

Reported by:		fenner's distfiles survey [1]


>How-To-Repeat:





>Fix:


--- instiki.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/instiki/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	14 Feb 2006 12:31:09 -0000	1.5
+++ Makefile	14 Apr 2006 09:02:54 -0000
@@ -11,7 +11,7 @@
 CATEGORIES=	www ruby
 MASTER_SITES=	http://rubyforge.lauschmusik.de/instiki/	\
 		http://rubyforge.planetargon.com/instiki/	\
-		http://rubyforge.org/frs/download.php/5350/
+		http://rubyforge.rubyuser.de/instiki/
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	arsptr@optusnet.com.au
@@ -24,10 +24,8 @@
 
 PLIST_SUB=	INSTIKIDIR=${INSTIKIDIR}/
 
-USE_RC_SUBR=	yes
-SED_SCRIPT=	-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
-		-e 's,%%PREFIX%%,${PREFIX},g' \
-		-e 's,%%INSTIKIDIR%%,${INSTIKIDIR},g' \
+USE_RC_SUBR=	${PORTNAME}
+SED_LIST+=	-e 's,%%INSTIKIDIR%%,${INSTIKIDIR},g' \
 		-e 's,%%INSTIKIPORT%%,${INSTIKIPORT},g' \
 		-e 's,%%RUBY_WITH_SUFFIX%%,${RUBY_WITH_SUFFIX},g'
 
@@ -38,12 +36,8 @@
 post-patch:
 	@${FIND} ${WRKSRC} -name '*.orig' -delete
 
-pre-install:
-	@${SED} ${SED_SCRIPT} ${FILESDIR}/${PORTNAME}.sh >${WRKDIR}/${PORTNAME}.sh
-
 do-install:
 	${CP} -pR ${WRKSRC}/ ${PREFIX}/${INSTIKIDIR}
-	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d/${PORTNAME}.sh
 	${MKDIR} ${PREFIX}/${INSTIKIDIR}/storage/${INSTIKIPORT}
 	${CHMOD} +x ${PREFIX}/${INSTIKIDIR}/instiki
 
Index: pkg-descr
===================================================================
RCS file: /home/ncvs/ports/www/instiki/pkg-descr,v
retrieving revision 1.2
diff -u -r1.2 pkg-descr
--- pkg-descr	17 Jul 2005 21:07:31 -0000	1.2
+++ pkg-descr	14 Apr 2006 09:02:54 -0000
@@ -1,7 +1,8 @@
 Instiki is a wiki clone implemented in ruby with no dependencies
 other than ruby-1.8.1 or greater. Instiki was written and is
 maintained by David Heinemeier Hansson. Homepage is
-WWW: http://www.instiki.org
+
+WWW:  http://www.instiki.org/show/HomePage
 
 - Kelley Reynolds
 kelley@insidesystems.net
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/www/instiki/pkg-plist,v
retrieving revision 1.3
diff -u -r1.3 pkg-plist
--- pkg-plist	22 Jan 2006 02:57:32 -0000	1.3
+++ pkg-plist	14 Apr 2006 09:02:54 -0000
@@ -1,4 +1,3 @@
-etc/rc.d/instiki.sh
 %%INSTIKIDIR%%natives/osx/desktop_launcher/English.lproj/MainMenu.nib/classes.nib
 %%INSTIKIDIR%%natives/osx/desktop_launcher/English.lproj/MainMenu.nib/info.nib
 %%INSTIKIDIR%%natives/osx/desktop_launcher/English.lproj/MainMenu.nib/objects.nib
Index: files/instiki.in
===================================================================
RCS file: files/instiki.in
diff -N files/instiki.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/instiki.in	14 Apr 2006 09:02:54 -0000
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# PROVIDE: instiki
+# REQUIRE: DAEMON
+#
+# Add the following line to /etc/rc.conf[.local] to enable instiki:
+# instiki_enable (bool):      Set to "NO" by default
+#                             Set it to "YES" to enable instiki
+# instiki_flags (str):        Set to "--port %%INSTIKIPORT%% --storage %%PREFIX%%/%%INSTIKIDIR%%/storage --daemon" by default.
+#                             Extra flags passed to start command
+#
+
+. %%RC_SUBR%%
+
+name="instiki"
+rcvar=${name}_enable
+
+#rcvar=`set_rcvar`
+
+command="%%PREFIX%%/%%INSTIKIDIR%%/instiki"
+command_interpreter="%%RUBY_WITH_SUFFIX%%"
+
+: ${doormand_enable="NO"}
+: ${instiki_flags="--port %%INSTIKIPORT%% --storage %%PREFIX%%/%%INSTIKIDIR%%/storage --daemon"}
+
+sig_stop=-TERM
+
+load_rc_config $name
Index: files/instiki.sh
===================================================================
RCS file: files/instiki.sh
diff -N files/instiki.sh
--- files/instiki.sh	20 Feb 2006 20:47:48 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# PROVIDE: instiki
-# REQUIRE: DAEMON
-#
-# Add the following line to /etc/rc.conf to enable instiki:
-# instiki_enable (bool):      Set to "NO" by default
-#                             Set it to "YES" to enable instiki
-# instiki_flags (str):        Set to "--port %%INSTIKIPORT%% --storage %%PREFIX%%/%%INSTIKIDIR%%/storage --daemon" by default.
-#                             Extra flags passed to start command
-#
-. %%RC_SUBR%%
-
-name="instiki"
-rcvar=`set_rcvar`
-
-command="%%PREFIX%%/%%INSTIKIDIR%%/instiki"
-command_interpreter="%%RUBY_WITH_SUFFIX%%"
-
-[ -z "$instiki_enable" ]	&& instiki_enable="NO"
-[ -z "$instiki_flags" ]	&& instiki_flags="--port %%INSTIKIPORT%% --storage %%PREFIX%%/%%INSTIKIDIR%%/storage --daemon"
-
-load_rc_config $name
-
-sig_stop=-TERM
-
-run_rc_command "$1"
-
--- instiki.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?1145005469.87975>