aboutsummaryrefslogtreecommitdiffstats
path: root/ftp
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-06-23 03:18:41 +0800
committerpav <pav@FreeBSD.org>2004-06-23 03:18:41 +0800
commitd5ee2d5c2e0585c56d2bb27e1ba42c7c453a4520 (patch)
tree8fef67952e02301943de3cbcfc7e8d5ea445fe11 /ftp
parent7abe8833aad26a39d2957cf3f495ef772985bcc2 (diff)
downloadfreebsd-ports-gnome-d5ee2d5c2e0585c56d2bb27e1ba42c7c453a4520.tar.gz
freebsd-ports-gnome-d5ee2d5c2e0585c56d2bb27e1ba42c7c453a4520.tar.zst
freebsd-ports-gnome-d5ee2d5c2e0585c56d2bb27e1ba42c7c453a4520.zip
- Add rc script
- Expand variables in pkg-message - Move users.sample to better place PR: ports/68164 Submitted by: Roman Bogorodskiy <bogorodskiy@inbox.ru> (maintainer)
Diffstat (limited to 'ftp')
-rw-r--r--ftp/wzdftpd/Makefile14
-rw-r--r--ftp/wzdftpd/files/pkg-message.in4
-rw-r--r--ftp/wzdftpd/files/wzdftpd.sh26
-rw-r--r--ftp/wzdftpd/pkg-message2
-rw-r--r--ftp/wzdftpd/pkg-plist3
5 files changed, 44 insertions, 5 deletions
diff --git a/ftp/wzdftpd/Makefile b/ftp/wzdftpd/Makefile
index 1af5e976cd0b..b4f8c82d4273 100644
--- a/ftp/wzdftpd/Makefile
+++ b/ftp/wzdftpd/Makefile
@@ -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 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
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 @@ INSTALLS_SHLIB= yes
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 @@ CONFIGURE_ARGS+= --enable-ipv6
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-extract:
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 --git a/ftp/wzdftpd/files/pkg-message.in b/ftp/wzdftpd/files/pkg-message.in
new file mode 100644
index 000000000000..1fac5bda79f3
--- /dev/null
+++ b/ftp/wzdftpd/files/pkg-message.in
@@ -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 --git a/ftp/wzdftpd/files/wzdftpd.sh b/ftp/wzdftpd/files/wzdftpd.sh
new file mode 100644
index 000000000000..d8098f5a21d1
--- /dev/null
+++ b/ftp/wzdftpd/files/wzdftpd.sh
@@ -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 --git a/ftp/wzdftpd/pkg-message b/ftp/wzdftpd/pkg-message
deleted file mode 100644
index 703144cafc05..000000000000
--- a/ftp/wzdftpd/pkg-message
+++ /dev/null
@@ -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 --git a/ftp/wzdftpd/pkg-plist b/ftp/wzdftpd/pkg-plist
index f96794d3f59d..00b7e7633e33 100644
--- a/ftp/wzdftpd/pkg-plist
+++ b/ftp/wzdftpd/pkg-plist
@@ -2,6 +2,8 @@
bin/siteconfig
bin/siteuptime
bin/sitewho
+etc/rc.d/wzdftpd.sh
+etc/users.sample
etc/wzd.cfg.sample
etc/wzd.pem
lib/libwzd.a
@@ -27,7 +29,6 @@ etc/file_users.txt
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