aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/bsdftpd-ssl/Makefile
blob: cea885b7b9729d890e9e08aec835a9ef436d362c (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
# Created by: Nick Leuta
# $FreeBSD$

PORTNAME=   bsdftpd-ssl
PORTVERSION=    1.1.0
PORTREVISION=   4
CATEGORIES= ftp
MASTER_SITES=   http://bsdftpd.org/files/bsdftpd-ssl/archive/1.1/src/ \
        http://www.sourcefiles.org/System/Daemons/FTP/

MAINTAINER= skynick@mail.sc.ru
COMMENT=    Secure FTP client/server with TLS/SSL support

USE_OPENSSL=    yes
MAKE_ENV+=  OBJFORMAT=elf
MAKE_JOBS_UNSAFE=   yes

OPTIONS_DEFINE= SERVER
SERVER_DESC=    Build/install FTP server as well
OPTIONS_SUB=    yes
USE_RC_SUBR=    ${PORTNAME}

# in case people still have CLIENT_ONLY defined...
.if !defined(CLIENT_ONLY)
OPTIONS_DEFAULT=SERVER
.endif

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MSERVER} && ${PORT_OPTIONS:MEXAMPLES}
SUB_FILES=  pkg-message
.endif

post-patch:
    ${MV} ${WRKSRC}/docs/README ${WRKSRC}/docs/README-docs

do-configure:
    (cd ${WRKSRC} && ./config.sh FreeBSD) || true

do-build:
    ${DO_MAKE_BUILD} -C ${WRKSRC}/port
    ${DO_MAKE_BUILD} -C ${WRKSRC}/ftp
.if ${PORT_OPTIONS:MSERVER}
    ${DO_MAKE_BUILD} -C ${WRKSRC}/ftpd
.endif

do-install:
# Client part
    ${INSTALL_PROGRAM} ${WRKSRC}/ftp/ftps ${STAGEDIR}${PREFIX}/bin/ftps
    ${INSTALL_MAN} ${WRKSRC}/ftp/ftps.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/ftps.1.gz
# Server part
.if ${PORT_OPTIONS:MSERVER}
    ${INSTALL_PROGRAM} ${WRKSRC}/ftpd/ftpd ${STAGEDIR}${PREFIX}/libexec/ftpd
    ${INSTALL_MAN} ${WRKSRC}/ftpd/ftpchroot.5.gz ${STAGEDIR}${MANPREFIX}/man/man5/ftpchroot.5.gz
    ${INSTALL_MAN} ${WRKSRC}/ftpd/xferlog.5.gz ${STAGEDIR}${MANPREFIX}/man/man5/xferlog.5.gz
    ${INSTALL_MAN} ${WRKSRC}/ftpd/ftpd.8.gz ${STAGEDIR}${MANPREFIX}/man/man8/ftpd.8.gz
    ${LN} -s ftpchroot.5.gz ${STAGEDIR}${MANPREFIX}/man/man5/ftpchroot-ssl.5.gz
    ${LN} -s ftpd.8.gz ${STAGEDIR}${MANPREFIX}/man/man8/ftpd-ssl.8.gz
.endif

post-install:
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
. for file in COPYRIGHT README INSTALL ChangeLog
    ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
. endfor
.endif

.if ${PORT_OPTIONS:MSERVER} && ${PORT_OPTIONS:MEXAMPLES}
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/cert
    ${INSTALL_SCRIPT} ${WRKSRC}/cert/* ${STAGEDIR}${EXAMPLESDIR}/cert
. for file in README.examples ftpchroot ftpusers rc_conf_d.bsdftpd_ssl
    ${INSTALL_DATA} ${FILESDIR}/${file} ${STAGEDIR}${EXAMPLESDIR}
. endfor
.endif

.include <bsd.port.mk>