blob: d53c5d084bd1aaa117833a67f6f744be89967faf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
PORTNAME= scponly
PORTVERSION= 4.8.20110526
PORTREVISION= 8
CATEGORIES= shells security
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-snapshots
DISTNAME= ${PORTNAME}-20110526
MAINTAINER= garga@FreeBSD.org
COMMENT= Tiny shell that only permits scp and sftp
WWW= https://github.com/scponly/scponly/wiki
LICENSE= BSD2CLAUSE
USES= cpe tar:tgz
PORTDOCS= BUILDING-JAILS.TXT INSTALL README SECURITY
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share
OPTIONS_DEFINE= CHROOT DEFAULT_CHDIR DOCS GFTP RSYNC SCP SUBVERSION SVNSERVE \
UNISON WILDCARDS WINSCP
OPTIONS_DEFAULT= WILDCARDS
DEFAULT_CHDIR_DESC= Chdir(2) by default
WILDCARDS_DESC= Wildcards processing
GFTP_DESC= gftp support
RSYNC_DESC= rsync support
CHROOT_DESC= chroot(8) functionality
SCP_DESC= vanilla scp support
SVNSERVE_DESC= Subversion support for svn+ssh://
UNISON_DESC= Unisson support
WINSCP_DESC= WinSCP support
OPTIONS_SUB= yes
.if !exists(/usr/bin/sftp)
BUILD_DEPENDS+= openssh-portable>0:security/openssh-portable
RUN_DEPENDS+= openssh-portable>0:security/openssh-portable
.endif
DEFAULT_CHDIR_CONFIGURE_ON= --with-default-chdir=${SCPONLY_DEFAULT_CHDIR}
WILDCARDS_CONFIGURE_ENABLE= wildcards
GFTP_CONFIGURE_ENABLE= gftp-compat
CHROOT_CONFIGURE_ENABLE= chrooted-binary
CHROOT_USE= RC_SUBR=scponlyc
RSYNC_BUILD_DEPENDS= rsync:net/rsync
RSYNC_RUN_DEPENDS= rsync:net/rsync
RSYNC_CONFIGURE_ENABLE= rsync-compat
SCP_CONFIGURE_ENABLE= scp-compat
SUBVERSION_CONFIGURE_ENABLE= svn-compat
.if ${WITH_SUBVERSION_VER:U} == LTS
SUBVERSION_BUILD_DEPENDS= svn:devel/subversion-lts
SUBVERSION_RUN_DEPENDS= svn:devel/subversion-lts
SVNSERVE_BUILD_DEPENDS= svn:devel/subversion-lts
SVNSERVE_RUN_DEPENDS= svn:devel/subversion-lts
.else
SUBVERSION_BUILD_DEPENDS= svn:devel/subversion
SUBVERSION_RUN_DEPENDS= svn:devel/subversion
SVNSERVE_BUILD_DEPENDS= svn:devel/subversion
SVNSERVE_RUN_DEPENDS= svn:devel/subversion
.endif
SVNSERVE_CONFIGURE_ENABLE= svnserv-compat
UNISON_BUILD_DEPENDS= unison:net/unison
UNISON_RUN_DEPENDS= unison:net/unison
UNISON_CONFIGURE_ENABLE= unison-compat
WINSCP_CONFIGURE_ENABLE= winscp-compat
post-patch:
@${ECHO_MSG} "In addition to knobs available from the OPTIONS dialog,"
@${ECHO_MSG} "you may set SCPONLY_DEFAULT_CHDIR to make users 'cd' to"
@${ECHO_MSG} "this directory after authentication."
@${REINPLACE_CMD} -e "s/-o 0 -g 0//g" ${WRKSRC}/Makefile.in
post-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/setup_chroot.sh ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/config.h ${STAGEDIR}${EXAMPLESDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/$i ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>
|