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

(-)ftp/vsftpd/Makefile (-16 / +4 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	vsftpd
8
PORTNAME=	vsftpd
9
PORTVERSION=	2.0.3
9
PORTVERSION=	2.0.3
10
PORTREVISION=	1
10
CATEGORIES=	ftp ipv6
11
CATEGORIES=	ftp ipv6
11
MASTER_SITES=	ftp://vsftpd.beasts.org/users/cevans/
12
MASTER_SITES=	ftp://vsftpd.beasts.org/users/cevans/
12
PKGNAMESUFFIX?=	${SSL_SUFFIX}${PKGNAMESUFFIX2}
13
PKGNAMESUFFIX?=	${SSL_SUFFIX}${PKGNAMESUFFIX2}
Lines 24-40 Link Here
24
25
25
LDFLAGS+=	-lwrap
26
LDFLAGS+=	-lwrap
26
27
27
OPTIONS=	RC_NG		"install RC_NG script"		off \
28
OPTIONS=	VSFTPD_SSL	"Include support for SSL"	off
28
		VSFTPD_SSL	"Include support for SSL"	off
29
29
30
.include <bsd.port.pre.mk>
30
USE_RC_SUBR=	vsftpd.sh
31
31
32
.if defined(WITH_RC_NG)
32
.include <bsd.port.pre.mk>
33
USE_RC_SUBR=	yes
34
PLIST_SUB+=	RC_NG=""
35
.else
36
PLIST_SUB+=	RC_NG="@comment "
37
.endif
38
33
39
.if !defined(WITHOUT_SSL) && defined(WITH_VSFTPD_SSL)
34
.if !defined(WITHOUT_SSL) && defined(WITH_VSFTPD_SSL)
40
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
35
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
Lines 46-55 Link Here
46
.endif
41
.endif
47
42
48
do-configure:
43
do-configure:
49
.if defined(WITH_RC_NG)
50
	@${SED} -e 's,%%RC_SUBR%%,${RC_SUBR},g' -e 's,%%PREFIX%%,${PREFIX},g' \
51
		${FILESDIR}/${PORTNAME}.sh >${WRKDIR}/${PORTNAME}.sh
52
.endif
53
	${REINPLACE_CMD} -e "s=/etc/vsftpd.conf=${PREFIX}/etc/vsftpd.conf=" \
44
	${REINPLACE_CMD} -e "s=/etc/vsftpd.conf=${PREFIX}/etc/vsftpd.conf=" \
54
		${WRKSRC}/defs.h
45
		${WRKSRC}/defs.h
55
	${REINPLACE_CMD} \
46
	${REINPLACE_CMD} \
Lines 96-104 Link Here
96
	${CP} -p -R -L ${WRKSRC}/${i}/./ ${DOCSDIR}/${i}/
87
	${CP} -p -R -L ${WRKSRC}/${i}/./ ${DOCSDIR}/${i}/
97
	${CHMOD} -R -L a+rX,go-w ${DOCSDIR}/${i}/
88
	${CHMOD} -R -L a+rX,go-w ${DOCSDIR}/${i}/
98
.endfor
89
.endfor
99
.endif
100
.if defined(WITH_RC_NG)
101
	@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d/${PORTNAME}.sh
102
.endif
90
.endif
103
91
104
.include <bsd.port.post.mk>
92
.include <bsd.port.post.mk>
(-)ftp/vsftpd/files/vsftpd.sh (-42 lines)
Lines 1-42 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/ftp/vsftpd/files/vsftpd.sh,v 1.1 2005/05/02 10:40:20 dinoex Exp $
4
#
5
6
# PROVIDE: vsftpd
7
# REQUIRE: DAEMON
8
# KEYWORD: FreeBSD
9
10
# Add the following line to /etc/rc.conf to enable `vsftpd':
11
#
12
# vsftpd_enable="YES"
13
# vsftpd_flags="/some/path/conf.file" # Not required
14
#
15
16
. "%%RC_SUBR%%"
17
18
name="vsftpd"
19
rcvar=`set_rcvar`
20
21
load_rc_config "$name"
22
: ${vsftpd_enable="NO"}
23
: ${vsftpd_flags=""}
24
25
command="%%PREFIX%%/libexec/$name ${vsftpd_flags}"
26
required_files="%%PREFIX%%/etc/$name.conf"
27
28
vsftpd_check()
29
{
30
	cat ${required_files} | egrep -E "^listen.*=.*YES$" > /dev/null
31
	if [ $? = 1 ]; then
32
		err 1 "vsftpd script need "listen=YES" on config file"
33
	fi
34
	cat ${required_files} | egrep -E "^background.*=.*YES$" > /dev/null
35
	if [ $? = 1 ]; then
36
		err 1 "vsftpd script need "background=YES" on config file"
37
	fi
38
}
39
40
vsftpd_check
41
42
run_rc_command "$1"
(-)ftp/vsftpd/files/vsftpd.sh.in (+42 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/ftp/vsftpd/files/vsftpd.sh,v 1.1 2005/05/02 10:40:20 dinoex Exp $
4
#
5
6
# PROVIDE: vsftpd
7
# REQUIRE: DAEMON
8
# KEYWORD: FreeBSD
9
10
# Add the following line to /etc/rc.conf to enable `vsftpd':
11
#
12
# vsftpd_enable="YES"
13
# vsftpd_flags="/some/path/conf.file" # Not required
14
#
15
16
. "%%RC_SUBR%%"
17
18
name="vsftpd"
19
rcvar=`set_rcvar`
20
21
load_rc_config "$name"
22
: ${vsftpd_enable="NO"}
23
: ${vsftpd_flags=""}
24
25
command="%%PREFIX%%/libexec/$name ${vsftpd_flags}"
26
required_files="%%PREFIX%%/etc/$name.conf"
27
28
vsftpd_check()
29
{
30
	cat ${required_files} | egrep -E "^listen.*=.*YES$" > /dev/null
31
	if [ $? = 1 ]; then
32
		err 1 "vsftpd script need "listen=YES" on config file"
33
	fi
34
	cat ${required_files} | egrep -E "^background.*=.*YES$" > /dev/null
35
	if [ $? = 1 ]; then
36
		err 1 "vsftpd script need "background=YES" on config file"
37
	fi
38
}
39
40
vsftpd_check
41
42
run_rc_command "$1"
(-)ftp/vsftpd/pkg-plist (-1 lines)
Lines 4-10 Link Here
4
etc/vsftpd.conf.dist
4
etc/vsftpd.conf.dist
5
@exec if [ ! -f %B/vsftpd.conf ]; then cp %B/vsftpd.conf.dist %B/vsftpd.conf; fi
5
@exec if [ ! -f %B/vsftpd.conf ]; then cp %B/vsftpd.conf.dist %B/vsftpd.conf; fi
6
@exec if [ ! -d /var/ftp ]; then mkdir /var/ftp ; fi
6
@exec if [ ! -d /var/ftp ]; then mkdir /var/ftp ; fi
7
%%RC_NG%%etc/rc.d/vsftpd.sh
8
@unexec rmdir /var/ftp 2>/dev/null || true
7
@unexec rmdir /var/ftp 2>/dev/null || true
9
@dirrm share/vsftpd/empty
8
@dirrm share/vsftpd/empty
10
@dirrm share/vsftpd
9
@dirrm share/vsftpd

Return to bug 87354