freebsd-ports/mail/cclient/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

112 lines
3.6 KiB
Makefile

PORTNAME= cclient
PORTVERSION= 2007f
PORTREVISION= 5
PORTEPOCH= 1
CATEGORIES= mail devel
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/%SUBDIR%/ \
http://atreides.freenix.no/~anders/%SUBDIR%/ \
ftp://ftp.funet.fi/pub/mirrors/ftp.cac.washington.edu/imap/%SUBDIR%/ \
ftp://ftp.nuug.no/pub/anders/distfiles/%SUBDIR%/
MASTER_SITE_SUBDIR= . old
DISTNAME= imap-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= C-client mail access routines by Mark Crispin
WWW= http://www.washington.edu/imap/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
CONFLICTS_INSTALL= panda-cclient-20*
OPTIONS_DEFINE= SSL SSL_AND_PLAINTEXT IPV6 MBX_DEFAULT
OPTIONS_DEFAULT= SSL
SSL_AND_PLAINTEXT_DESC= Allow plain text passwords and SSL
MBX_DEFAULT_DESC= Use MBX as default mailbox format
ALL_TARGET= bsf
MAKE_JOBS_UNSAFE= yes
USE_LDCONFIG= yes
SSL_USES= ssl
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSSL}
PKGMESSAGE= pkg-message-ssl
.endif
.if ! ${PORT_OPTIONS:MSSL}
MAKE_ARGS+= SSLTYPE=none SSLDIR=${OPENSSLBASE}
.else
.if ${PORT_OPTIONS:MSSL_AND_PLAINTEXT}
MAKE_ARGS+= SSLTYPE=unix SSLDIR=${OPENSSLDIR}
.else
MAKE_ARGS+= SSLTYPE=unix.nopwd SSLDIR=${OPENSSLDIR}
.endif
.endif
WRKSRC= ${WRKDIR}/${DISTNAME}
MAKE_ARGS+= EXTRACFLAGS="${CFLAGS}"
SHLIBBASE= c-client4
SHLIBMAJ= 9
SHLIBNAME= lib${SHLIBBASE}.so.${SHLIBMAJ}
MAKE_ENV+= SHLIBNAME=${SHLIBNAME} SHLIBBASE=${SHLIBBASE}
PLIST_SUB+= SHLIBNAME=${SHLIBNAME} SHLIBBASE=${SHLIBBASE}
post-patch:
.for file in Makefile src/osdep/unix/Makefile src/osdep/unix/Makefile.gss
@${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" ${WRKSRC}/${file}
.endfor
@${REINPLACE_CMD} -e "s:/etc/ssl/certs:${PREFIX}/certs:g; \
s:/etc/ssl/private:${PREFIX}/certs:g" ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e "s:/etc/c-client.cf:${PREFIX}/etc/c-client.cf:" \
${WRKSRC}/src/osdep/unix/env_unix.h
.if ${PORT_OPTIONS:MSSL}
@${REINPLACE_CMD} -e " \
s:SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib:SSLINCLUDE=${OPENSSLINC} SSLLIB=${OPENSSLLIB}: \
" ${WRKSRC}/Makefile
.endif
.if ${PORT_OPTIONS:MIPV6}
@${REINPLACE_CMD} -e "s|^IP=4|IP=6|" ${WRKSRC}/Makefile \
${WRKSRC}/src/osdep/unix/Makefile
.endif
.if ${PORT_OPTIONS:MMBX_DEFAULT}
@${REINPLACE_CMD} -e "s|^CREATEPROTO=unixproto|CREATEPROTO=mbxproto|" \
${WRKSRC}/src/osdep/unix/Makefile
.endif
post-configure:
@${ECHO_MSG} ">> The c-client shared library will be named ${SHLIBNAME}"
HEADERS= c-client.h dummy.h env.h env_unix.h fdstring.h flockcyg.h \
flocksim.h flstring.h fs.h ftl.h imap4r1.h linkage.c linkage.h \
mail.h misc.h netmsg.h newsrc.h nl.h nntp.h osdep.h pseudo.h \
rfc822.h smtp.h sslio.h tcp.h tcp_unix.h unix.h utf8.h \
utf8aux.h
PORTREV_H= ${WRKDIR}/portrevision.h
post-build:
@${ECHO_CMD} "#define CCLIENT_PORTVERSION \"${PORTVERSION}\"" >${PORTREV_H}
.if ${PORT_OPTIONS:MSSL}
@${ECHO_CMD} "#define CCLIENT_SSLENABLED \"yes\"" >>${PORTREV_H}
.else
@${ECHO_CMD} "#define CCLIENT_SSLENABLED \"no\"" >>${PORTREV_H}
.endif
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/c-client
.for f in ${HEADERS}
${INSTALL_DATA} ${WRKSRC}/c-client/${f} ${STAGEDIR}${PREFIX}/include/c-client
.endfor
${INSTALL_LIB} ${WRKSRC}/c-client/${SHLIBNAME} ${STAGEDIR}${PREFIX}/lib
${LN} -sf ${SHLIBNAME} ${STAGEDIR}${PREFIX}/lib/lib${SHLIBBASE}.so
${INSTALL_DATA} ${WRKSRC}/c-client/c-client.a \
${STAGEDIR}${PREFIX}/lib/lib${SHLIBBASE}.a
${INSTALL_DATA} ${WRKSRC}/c-client/CFLAGS ${STAGEDIR}${PREFIX}/include/c-client
${INSTALL_DATA} ${WRKSRC}/c-client/LDFLAGS ${STAGEDIR}${PREFIX}/include/c-client
${INSTALL_DATA} ${WRKSRC}/c-client/OSCFLAGS ${STAGEDIR}${PREFIX}/include/c-client
${INSTALL_DATA} ${PORTREV_H} ${STAGEDIR}${PREFIX}/include/c-client
.include <bsd.port.mk>