aboutsummaryrefslogtreecommitdiffstats
path: root/mail/pine4/Makefile
blob: 81fa34aed8b31cdf877b68f08a41aa323cf57bdf (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
87
88
89
90
91
92
93
94
95
96
97
98
99
# New ports collection makefile for:    pine
# Date created:     09 July 1998
# Whom:         Adrian Penisoara <ady@freebsd.ady.ro>
#
# $FreeBSD$
#

PORTNAME=   pine
PORTVERSION=    4.53
CATEGORIES= mail news
MASTER_SITES=   ftp://ftp.cac.washington.edu/pine/ \
        http://mirror.sit.wisc.edu/pub/net/mail/pine/ \
        ftp://sunsite.doc.ic.ac.uk/packages/pine/ \
        ftp://sunsite.icm.edu.pl/pub/unix/mail/pine/ \
        ftp://mirrors.unam.mx/pub/pine/ \
        ftp://ftp.uni-magdeburg.de/pub/mirror/ftp.cac.washington.edu/pine/ \
        ftp://ftp.fu-berlin.de/unix/mail/pine/ \
        ftp://ftp.ut.ee/pub/unix/mail/pine/ \
        ftp://gd.tuwien.ac.at/infosys/mail/pine/
DISTNAME=   pine${PORTVERSION}

MAINTAINER= DougB@FreeBSD.org

# Define "WITH_LDAP" to include ldap support.
# If the ldap port is installed somewhere other than /usr/local, define
# LDAP_PREFIX as well.
#
.if defined(WITH_LDAP)
LDAP_PREFIX?=   ${LOCALBASE}
BUILD_DEPENDS+= ${LDAP_PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
.endif

.if defined(WITHOUT_SSL)
MAKE_ARGS+= SSLTYPE=none
.else
USE_OPENSSL=    yes
EXTRA_OPTS= SSLINCLUDE=${OPENSSLINC} SSLLIB=${OPENSSLLIB}
.if defined(WITH_SSL_AND_PLAINTEXT)
EXTRA_OPTS+=    SSLTYPE=unix
.else
EXTRA_OPTS+=    SSLTYPE=unix.nopwd
.endif
.endif

MAN1=       pine.1 pico.1 pilot.1 rpdump.1 rpload.1

pre-fetch:
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
    ${SH} pkg-install
.endif

post-patch:
.for file in doc/pine.1 pine/init.c pine/pine.hlp pine/mailcap.c \
    pine/osdep/os-bsf.h
    @${CP} ${WRKSRC}/${file} ${WRKSRC}/${file}.presed
    @${SED} -e "s:@@PREFIX@@:${PREFIX}:g" ${WRKSRC}/${file}.presed > \
        ${WRKSRC}/${file}
.endfor
    @for i in ${WRKSRC}/doc/tech-notes.txt \
        ${WRKSRC}/doc/tech-notes/*.html ; do \
        ${CP} $$i $$i.presed ; \
        ${SED} -e "s:/usr/local/lib/:${PREFIX}/etc/:g" \
            $$i.presed > $$i ; \
    done
.if defined(WITH_LDAP)
    ${MKDIR} ${WRKSRC}/ldap
    ${LN} -sf ${LDAP_PREFIX}/include ${WRKSRC}/ldap/include
    ${LN} -sf ${LDAP_PREFIX}/lib ${WRKSRC}/ldap/libraries
.endif

do-build:
    @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ./build bsf ${EXTRA_OPTS})

do-install:
.for program in ${MAN1}
    ${INSTALL_PROGRAM} ${WRKSRC}/bin/${program:R} ${PREFIX}/bin
.endfor
.for manpage in ${MAN1}
    ${INSTALL_MAN} ${WRKSRC}/doc/${manpage} ${PREFIX}/man/man1
.endfor
.if !defined(NOPORTDOCS)
    ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} ${DOCSDIR} \
        ${DOCSDIR}/tech-notes
    ${INSTALL_DATA} ${WRKSRC}/doc/brochure.txt ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/tech-notes.txt ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/tech-notes/*.html ${DOCSDIR}/tech-notes
.endif

post-install:
    ${PREFIX}/bin/pine -P ${PREFIX}/etc/pine.conf -conf >${WRKSRC}/pine.conf
    ${INSTALL_DATA} ${WRKSRC}/pine.conf ${PREFIX}/etc/pine.conf

    @${ECHO_MSG}
    @${ECHO_MSG} "***************************************************************************"
    @${ECHO_MSG} "*** To use pgp with Pine, take a look at the mail/pine-pgp-filters port ***"
    @${ECHO_MSG} "***************************************************************************"
    @${ECHO_MSG}

.include <bsd.port.mk>