DESCR

Fetchmail is a full-featured IMAP/POP2/POP3/APOP/KPOP client with easy
configuration, daemon mode, forwarding via SMTP or local MDA, superior
reply handling. Not a mail user agent, rather a pipe-fitting that
seamlessly forwards fetched mail to your local delivery system. Your
one-stop solution for intermittent email connections. This is the
lineal descendant of and replacement for the old popclient program.

MESSAGE

===========================================================================
$NetBSD: MESSAGE,v 1.1 2010/05/08 15:34:59 tez Exp $

If the upgrade you did encompassed an upgrade to OpenSSL 1.0.0 or newer,
you may need to run c_rehash on your certificate directories, particularly
if you are using local certs directories (f. i. through fetchmail's
--sslcertpath option).

Reason: OpenSSL 1.0.0, relative to earlier versions, uses a different hash
for the symbolic links (symlinks) in its certs/ directory, so you need to
recreate the symlinks by running c_rehash /etc/ssl/certs (adjust this to
where your installation keeps its certificates), and you cannot easily
share this certs directory with applications linked against older OpenSSL
versions.

See the fetchmail FAQ for more information:
http://fetchmail.berlios.de/fetchmail-FAQ.html#R14

===========================================================================

Makefile

# $NetBSD: Makefile,v 1.173 2010/05/09 11:45:28 tron Exp $

# Note to updaters: mail/fetchmailconf reaches over here, make sure it builds.
DISTNAME= fetchmail-6.3.17
PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://download.berlios.de/fetchmail/
EXTRACT_SUFX= .tar.bz2

MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://fetchmail.berlios.de/
COMMENT= Batch mail retrieval/forwarding utility for pop2, pop3, apop, imap

PKG_DESTDIR_SUPPORT= user-destdir
PKG_INSTALLATION_TYPES= overwrite pkgviews

.include "../../mk/bsd.prefs.mk"

USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --without-hesiod
CONFIGURE_ENV+= PYTHON=:
LDFLAGS+= ${CFLAGS}
USE_TOOLS+= msgfmt tbl

.if ${OPSYS} == "Darwin"
LDFLAGS+= -lresolv
CFLAGS.Darwin+= -DBIND_8_COMPAT -DHAVE_RESOLV_H
.endif

.include "options.mk"

DOCDIR= ${PREFIX}/share/doc/fetchmail
RCD_SCRIPTS= fetchmail

.include "../../devel/gettext-lib/buildlink3.mk"

post-extract:
@${RM} -f ${WRKSRC}/intl/libintl.h
.if ${OPSYS} == "NetBSD"
@${RM} -f ${WRKSRC}/md5.h
.endif

.if defined(REPLACE_KERBEROS_LIBS)
pre-configure:
cd ${WRKSRC} && \
for F in configure.in configure; do \
${SED} -e "s/-lkrb -ldes/-lkrb -ldes -lcom_err -lroken/" \
$$F > $$F.mod; \
${MV} -f $$F.mod $$F; \
done
${CHMOD} a+x ${WRKSRC}/configure
.endif

post-build:
for file in ${WRKSRC}/fetchmail.man; do \
${MV} -f $$file $$file.tbl; \
${TBL} $$file.tbl > $$file; \
done

post-install:
${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
cd ${WRKSRC}; for file in \
FAQ NOTES FEATURES README COPYING \
fetchmail-FAQ.html fetchmail-features.html \
design-notes.html; \
do \
${INSTALL_DATA} $$file ${DESTDIR}${DOCDIR}; \
done

.include "../../mk/bsd.pkg.mk"

PLIST

@comment $NetBSD: PLIST,v 1.13 2009/08/10 08:46:30 tron Exp $
bin/fetchmail
man/man1/fetchmail.1
share/doc/fetchmail/COPYING
share/doc/fetchmail/FAQ
share/doc/fetchmail/FEATURES
share/doc/fetchmail/NOTES
share/doc/fetchmail/README
share/doc/fetchmail/design-notes.html
share/doc/fetchmail/fetchmail-FAQ.html
share/doc/fetchmail/fetchmail-features.html
share/examples/rc.d/fetchmail
share/locale/ca/LC_MESSAGES/fetchmail.mo
share/locale/cs/LC_MESSAGES/fetchmail.mo
share/locale/da/LC_MESSAGES/fetchmail.mo
share/locale/de/LC_MESSAGES/fetchmail.mo
share/locale/el/LC_MESSAGES/fetchmail.mo
share/locale/en_GB/LC_MESSAGES/fetchmail.mo
share/locale/es/LC_MESSAGES/fetchmail.mo
share/locale/fi/LC_MESSAGES/fetchmail.mo
share/locale/fr/LC_MESSAGES/fetchmail.mo
share/locale/gl/LC_MESSAGES/fetchmail.mo
share/locale/id/LC_MESSAGES/fetchmail.mo
share/locale/it/LC_MESSAGES/fetchmail.mo
share/locale/ja/LC_MESSAGES/fetchmail.mo
share/locale/nl/LC_MESSAGES/fetchmail.mo
share/locale/pl/LC_MESSAGES/fetchmail.mo
share/locale/pt_BR/LC_MESSAGES/fetchmail.mo
share/locale/ru/LC_MESSAGES/fetchmail.mo
share/locale/sk/LC_MESSAGES/fetchmail.mo
share/locale/sq/LC_MESSAGES/fetchmail.mo
share/locale/tr/LC_MESSAGES/fetchmail.mo
share/locale/vi/LC_MESSAGES/fetchmail.mo
share/locale/zh_CN/LC_MESSAGES/fetchmail.mo

distinfo

$NetBSD: distinfo,v 1.43 2010/05/09 11:45:28 tron Exp $

SHA1 (fetchmail-6.3.17.tar.bz2) = d9ffc9a43f08f9ee9394a959834606eb41141d47
RMD160 (fetchmail-6.3.17.tar.bz2) = a908da76b9d729dee7c6457b89a342be677bd690
Size (fetchmail-6.3.17.tar.bz2) = 1642598 bytes
SHA1 (patch-aa) = 9885a4f063b428d68c7bff06c1402571f0e21c82

options.mk

# $NetBSD: options.mk,v 1.15 2007/11/07 08:57:10 tron Exp $

PKG_OPTIONS_VAR= PKG_OPTIONS.fetchmail
PKG_SUPPORTED_OPTIONS= kerberos4 kerberos gssapi ssl
PKG_OPTIONS_OPTIONAL_GROUPS= socks
PKG_OPTIONS_GROUP.socks= socks4 socks5

PKG_SUGGESTED_OPTIONS= ssl

.include "../../mk/bsd.options.mk"

###
### Authentication via GSSAPI (currently only over Kerberos V) support.
###
.if !empty(PKG_OPTIONS:Mgssapi)
CONFIGURE_ARGS+= --with-gssapi=${KRB5BASE:Q}
.else
CONFIGURE_ARGS+= --with-gssapi=no
.endif

###
### KPOP (POP3 + Kerberos IV) support.
###
.if !empty(PKG_OPTIONS:Mkerberos4)
PKG_USE_KERBEROS= yes
CONFIGURE_ARGS+= --with-kerberos=yes
. if empty(MACHINE_PLATFORM:MNetBSD-1.[0-4]*-i386)
REPLACE_KERBEROS_LIBS= yes
. endif
.else
CONFIGURE_ARGS+= --with-kerberos=no
.endif

###
### Kerberos V support.
###
.if !empty(PKG_OPTIONS:Mkerberos) || !empty(PKG_OPTIONS:Mgssapi)
. include "../../mk/krb5.buildlink3.mk"
PKG_USE_KERBEROS= yes
CONFIGURE_ARGS+= --with-kerberos5=${KRB5BASE:Q}
.else
CONFIGURE_ARGS+= --with-kerberos5=no
.endif

###
### Support POP3 and IMAP over SSL.
###
.if !empty(PKG_OPTIONS:Mssl)
. include "../../security/openssl/buildlink3.mk"
CONFIGURE_ARGS+= --with-ssl=${SSLBASE:Q}
.else
CONFIGURE_ARGS+= --without-ssl
.endif

###
### Include SOCKS firewall support
###
.if !empty(PKG_OPTIONS:Msocks4)
.include "../../net/socks4/buildlink3.mk"
CONFIGURE_ARGS+= --with-socks=${BUILDLINK_PREFIX.socks4}
.endif
.if !empty(PKG_OPTIONS:Msocks5)
.include "../../net/socks5/buildlink3.mk"
CONFIGURE_ARGS+= --with-socks5=${BUILDLINK_PREFIX.socks5}
.endif