aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/p5-Net-FTPServer/Makefile
blob: 89ef334c17e916f4e1480e22bfe99a1906ca9f11 (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
82
83
84
85
86
# ex:ts=8
# New ports collection makefile for:    p5-Net-FTPServer
# Date created:         Jul 30, 2001
# Whom:                 ijliao
#
# $FreeBSD$
#

PORTNAME=   Net-FTPServer
PORTVERSION=    1.122
CATEGORIES= ftp perl5
MASTER_SITES=   ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Net
PKGNAMEPREFIX=  p5-

MAINTAINER= perl@FreeBSD.org
COMMENT=    A full-featured, secure, extensible and configurable Perl FTP server

RUN_DEPENDS=    ${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \
        ${SITE_PERL}/${PERL_ARCH}/Authen/PAM.pm:${PORTSDIR}/security/p5-Authen-PAM \
        ${SITE_PERL}/${PERL_ARCH}/BSD/Resource.pm:${PORTSDIR}/devel/p5-BSD-Resource \
        ${SITE_PERL}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \
        ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI \
        ${SITE_PERL}/${PERL_ARCH}/File/Sync.pm:${PORTSDIR}/devel/p5-File-Sync \
        ${SITE_PERL}/IO/Scalar.pm:${PORTSDIR}/devel/p5-IO-stringy
BUILD_DEPENDS=  ${RUN_DEPENDS}

MAKE_ENV+=  NOCONF=1
PERL_CONFIGURE= yes

PKGMESSAGE= ${WRKDIR}/pkg-message

MAN3=   Net::FTPServer.3 \
    Net::FTPServer::DBeg1::DirHandle.3 \
    Net::FTPServer::DBeg1::FileHandle.3 \
    Net::FTPServer::DBeg1::IOBlob.3 \
    Net::FTPServer::DBeg1::Server.3 \
    Net::FTPServer::DirHandle.3 \
    Net::FTPServer::FileHandle.3 \
    Net::FTPServer::Full::DirHandle.3 \
    Net::FTPServer::Full::FileHandle.3 \
    Net::FTPServer::Full::Server.3 \
    Net::FTPServer::Handle.3 \
    Net::FTPServer::InMem::DirHandle.3 \
    Net::FTPServer::InMem::FileHandle.3 \
    Net::FTPServer::InMem::Server.3 \
    Net::FTPServer::Proxy::DirHandle.3 \
    Net::FTPServer::Proxy::FileHandle.3 \
    Net::FTPServer::Proxy::Server.3 \
    Net::FTPServer::RO::DirHandle.3 \
    Net::FTPServer::RO::FileHandle.3 \
    Net::FTPServer::RO::Server.3

DOCS=   FAQ README TODO doc/*

.include <bsd.port.pre.mk>

.if ${PERL_LEVEL} < 500601
IGNORE= requires perl 5.6.1 or later. Install lang/perl5.8 then try again
.endif

.if ${PERL_LEVEL} < 500703
RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
        ${SITE_PERL}/Net/FTP.pm:${PORTSDIR}/net/p5-Net
.endif

post-patch:
    @${REINPLACE_CMD} -e "s/root,root/root,wheel/" \
        -e "s,/usr/sbin,${TARGETDIR}/sbin," \
        ${WRKSRC}/Net-FTPServer.spec.PL
    @${REINPLACE_CMD} -e "s/-g root/-g wheel/" \
        -e "s,$$.PREFIX./sbin,${TARGETDIR}/sbin," \
        -e "s,$$.SITEPREFIX./sbin,${TARGETDIR}/sbin," \
        ${WRKSRC}/Makefile.PL

post-install:
    @${MKDIR} ${EXAMPLESDIR}
    @${INSTALL_DATA} ${WRKSRC}/ftpd.conf ${EXAMPLESDIR}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
    @${PERL} -p -e 's,PREFIX,${TARGETDIR},g' ${PKGDIR}/pkg-message > ${PKGMESSAGE}
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>