Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 2004 12:46:29 +0400
From:      Roman Bogorodskiy <bogorodskiy@inbox.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/68164: [ maintainer ] ftp/wzdftpd: some improvements
Message-ID:  <E1BcKRh-000NIS-00.bogorodskiy-inbox-ru@mx1.mail.ru>
Resent-Message-ID: <200406210850.i5L8oFZ2050561@freefall.freebsd.org>

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

>Number:         68164
>Category:       ports
>Synopsis:       [ maintainer ] ftp/wzdftpd: some improvements
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 21 08:50:15 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 5.2.1-RELEASE-p8 i386
>Organization:
>Environment:
System: FreeBSD lame.novel.ru 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #5: Sat Jun 19 22:04:33 MSD 2004 root@lame.novel.ru:/usr/obj/usr/src/sys/NOV i386

>Description:
	The following things were done:
		
	1. Added rc script
	2. Dynamic pkg-message generation (seems, it's more correct to keep 
		the pattern in files/ and put result into work/, isn't it?)
	3. Loaction of the sample 'users' file was changed
	4. Bump PORTREVISION
	
>How-To-Repeat:
>Fix:

diff -ruN wzdftpd/Makefile /usr/ports/ftp/wzdftpd/Makefile
--- wzdftpd/Makefile	Tue May 25 01:31:32 2004
+++ /usr/ports/ftp/wzdftpd/Makefile	Mon Jun 21 12:35:41 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	wzdftpd
 PORTVERSION=	0.3.2
+PORTREVISION=	1
 CATEGORIES=	ftp ipv6
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -14,6 +15,7 @@
 MAINTAINER=	bogorodskiy@inbox.ru
 COMMENT=	Modular FTP server configurable online using SITE commands
 
+USE_RC_SUBR=    yes
 USE_REINPLACE=	yes
 USE_GMAKE=	yes
 USE_GETOPT_LONG=yes
@@ -22,6 +24,7 @@
 USE_LIBTOOL_VER=13
 CONFIGURE_ARGS+=	--without-mysql
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+PKGMESSAGE=     ${WRKDIR}/pkg-message
 
 .if defined(PACKAGE_BUILDING)
 WITH_UTF8=	yes
@@ -55,6 +58,9 @@
 DOCS=		AUTHORS Permissions.ReadMeFirst README TLS.ReadMeFirst \
 		ChangeLog src/DOCS_XFERLOG_FORMAT src/KNOWN_BUGS src/TODO
 
+RC_SCRIPTS_SUB=	PREFIX=${PREFIX} \
+		RC_SUBR=${RC_SUBR}
+
 post-extract:
 .if defined(WITH_TCL)
 	@${REINPLACE_CMD} -e 's|-ltcl8.4|-ltcl84|g' ${WRKSRC}/configure
@@ -62,11 +68,15 @@
 
 post-install:
 	${MV} ${PREFIX}/etc/wzd.cfg ${PREFIX}/etc/wzd.cfg.sample
-	${MV} ${PREFIX}/etc/users ${DATADIR}/users.sample
+	${MV} ${PREFIX}/etc/users ${PREFIX}/etc/users.sample
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
 .endif
-	${SED} -e 's,PREFIX,${PREFIX},g' ${PKGMESSAGE}
+	@${SED} -e 's,PREFIX,${PREFIX},g' ${FILESDIR}/pkg-message.in > ${PKGMESSAGE}
+	@${CAT} ${PKGMESSAGE}
+	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+		${FILESDIR}/wzdftpd.sh > ${PREFIX}/etc/rc.d/wzdftpd.sh
+	@${CHMOD} ${BINMODE} ${PREFIX}/etc/rc.d/wzdftpd.sh
 
 .include <bsd.port.mk>
diff -ruN wzdftpd/files/pkg-message.in /usr/ports/ftp/wzdftpd/files/pkg-message.in
--- wzdftpd/files/pkg-message.in	Thu Jan  1 03:00:00 1970
+++ /usr/ports/ftp/wzdftpd/files/pkg-message.in	Mon Jun 21 12:26:47 2004
@@ -0,0 +1,4 @@
+--------------------------------------------------------------------------
+Sample config file can be found at PREFIX/etc/wzd.cfg.sample
+Sample users file can be found at PREFIX/etc/users.sample
+--------------------------------------------------------------------------
diff -ruN wzdftpd/files/wzdftpd.sh /usr/ports/ftp/wzdftpd/files/wzdftpd.sh
--- wzdftpd/files/wzdftpd.sh	Thu Jan  1 03:00:00 1970
+++ /usr/ports/ftp/wzdftpd/files/wzdftpd.sh	Mon Jun 21 11:49:59 2004
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Start or stop wzdftpd
+# $FreeBSD$
+
+# PROVIDE: wzdftpd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
+#
+
+prefix=%%PREFIX%%
+
+wzdftpd_enable=${wzdftpd_enable:-"NO"}		# Enable wzdftpd
+wzdftpd_program="${prefix}/sbin/wzdftpd"	# Location of wzdftpd
+wzdftpd_flags=${gkrellmd_flags:-""}		# Flags to wzdftpd
+
+. %%RC_SUBR%%
+
+name="wzdftpd"
+rcvar=`set_rcvar`
+command="${prefix}/sbin/${name}"
+required_files="${prefix}/etc/wzd.cfg"
+
+load_rc_config $name
+run_rc_command "$1"
diff -ruN wzdftpd/pkg-message /usr/ports/ftp/wzdftpd/pkg-message
--- wzdftpd/pkg-message	Mon Feb 23 09:27:33 2004
+++ /usr/ports/ftp/wzdftpd/pkg-message	Thu Jan  1 03:00:00 1970
@@ -1,2 +0,0 @@
-Sample config file can be found at PREFIX/etc/wzd.cfg.sample
-Sample users file can be found at PREFIX/share/wzdftpd/users.sample
diff -ruN wzdftpd/pkg-plist /usr/ports/ftp/wzdftpd/pkg-plist
--- wzdftpd/pkg-plist	Tue May 25 01:31:32 2004
+++ /usr/ports/ftp/wzdftpd/pkg-plist	Mon Jun 21 12:25:22 2004
@@ -4,6 +4,7 @@
 bin/sitewho
 etc/wzd.cfg.sample
 etc/wzd.pem
+etc/users.sample
 lib/libwzd.a
 lib/libwzd.so
 lib/libwzd.la
@@ -27,7 +28,6 @@
 etc/file_vfs.txt
 etc/file_who.txt
 etc/file_groups.txt
-%%DATADIR%%/users.sample
 %%DATADIR%%/backends/libwzdplaintext.a
 %%DATADIR%%/backends/libwzdplaintext.so
 %%DATADIR%%/backends/libwzdplaintext.la

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1BcKRh-000NIS-00.bogorodskiy-inbox-ru>