Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

13
mail/postfix/DESCR Normal file
View File

@@ -0,0 +1,13 @@
Postfix aims to be an alternative to the widely-used sendmail
program. Sendmail is responsible for 70% of all e-mail delivered
on the Internet. With an estimated 100 million users, that's an
estimated 10 billion (10^10) messages daily. A stunning number.
Although IBM supported the Postfix development, it abstains from
control over its evolution. The goal is to have Postfix installed
on as many systems as possible. To this end, the software is given
away with no strings attached to it, so that it can evolve with
input from and under control by its users.
In other words, IBM releases Postfix only once. I will be around
to guide its development for a limited time.

17
mail/postfix/MESSAGE Normal file
View File

@@ -0,0 +1,17 @@
===========================================================================
$NetBSD: MESSAGE,v 1.8 2004/07/19 22:03:13 jlam Exp $
Please run the following command to update main.cf and master.cf with
the latest Postfix services and configuration directives:
${PREFIX}/sbin/postfix upgrade-configuration
If you are upgrading from a previous Postfix installation, you may want
to back up any existing configuration files before running the above
command.
Postfix may be activated by executing:
${PREFIX}/sbin/postfix start
===========================================================================

View File

@@ -0,0 +1,20 @@
===========================================================================
$NetBSD: MESSAGE.NetBSD,v 1.5 2010/03/02 08:07:36 martti Exp $
The existing /etc/rc.d/postfix can be forced to start ${PREFIX}/sbin/postfix
instead of /usr/sbin/postfix, by adding the following lines to
/etc/rc.conf.d/postfix:
postfix_command='${PREFIX}/sbin/postfix'
required_files='${PKG_SYSCONFDIR}/main.cf'
start_cmd='${PREFIX}/sbin/postfix start'
stop_cmd='${PREFIX}/sbin/postfix stop'
reload_cmd='${PREFIX}/sbin/postfix reload'
postconf='${PREFIX}/sbin/postconf'
Please note that /etc/rc.conf.d/postfix does not exist by default so
you need to create that file if you need to override the default settings.
Remember to modify /etc/mailer.conf to use ${PREFIX}/sbin/sendmail instead
of /usr/libexec/postfix/sendmail.
===========================================================================

34
mail/postfix/MESSAGE.sasl Normal file
View File

@@ -0,0 +1,34 @@
===========================================================================
$NetBSD: MESSAGE.sasl,v 1.8 2005/03/28 08:53:07 jlam Exp $
To enable SASL authentication in the SMTP server, you may want to edit
${SASLLIBDIR}/smtpd.conf
and change the method used to check plaintext passwords. To use
security/cyrus-saslauthd, you should change the contents of smtpd.conf
to:
pwcheck_method: saslauthd
You may also want to edit
${PKG_SYSCONFDIR}/main.cf
and set the smtpd_sasl_* variables to appropriate values.
To enable SASL authentication in the SMTP client, you may want to edit
${PKG_SYSCONFDIR}/main.cf
and set the smtp_sasl_* variables to appropriate values.
The corresponding SASL authentication plugins will also need to be
installed. Please consult:
${DOCDIR}/SASL_README
and the SASL documentation for more information on setting up SASL
authentication.
===========================================================================

180
mail/postfix/Makefile Normal file
View File

@@ -0,0 +1,180 @@
# $NetBSD: Makefile,v 1.265 2013/06/07 16:30:25 jperkin Exp $
DISTNAME= postfix-2.9.6
PKGREVISION= 4
CATEGORIES= mail
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/
MASTER_SITES+= http://postfix.it-austria.net/releases/official/
MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/
MASTER_SITES+= http://mirror.postfix.jp/postfix-release/official/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.postfix.org/
COMMENT= Postfix SMTP server and tools
# The postfix license has only very minor diffs from cpl-1.0.
LICENSE= cpl-1.0
#LICENSE= postfix-license
CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]*
CONFLICTS+= esmtp>=1.2 nullmailer-[0-9]*
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_TOOLS+= perl
CHECK_HEADERS_SKIP+= src/global/mail_params.h
.include "../../mk/bsd.prefs.mk"
SPECIAL_PERMS+= sbin/postdrop postfix maildrop 2555
SPECIAL_PERMS+= sbin/postqueue postfix maildrop 2555
# POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is
# merely a default, and may be changed by setting "queue_directory" in
# ${PKG_SYSCONFDIR}/main.cf.
#
POSTFIX_DATA_DIR?= ${VARBASE}/db/postfix
POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix
BUILD_DEFS+= VARBASE POSTFIX_DATA_DIR POSTFIX_QUEUE_DIR
# CCARGS is a list of options to pass to the preprocessor/compiler.
# AUXLIBS is a list of options to pass to the linker.
#
CCARGS= -DUSE_SASL_AUTH
AUXLIBS= ${LDFLAGS}
# Set some default paths to override ${WRKSRC}/src/global/mail_params.h.
CCARGS+= -DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\"
CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\"
CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/${PKGMANDIR}\"
CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\"
CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\"
REPLACE_PERL+= auxiliary/qshape/qshape.pl
# Override those same default paths in the installed example main.cf.
SUBST_CLASSES+= postfix
SUBST_STAGE.postfix= post-configure
SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h
SUBST_SED.postfix= \
-e 's|^\(data_directory\) =.*|\1 = ${POSTFIX_DATA_DIR}|'
SUBST_SED.postfix+= \
-e 's|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|'
SUBST_SED.postfix+= \
-e 's|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|'
SUBST_SED.postfix+= \
-e 's|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|'
SUBST_SED.postfix+= \
-e 's|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|'
SUBST_SED.postfix+= \
-e 's|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|'
SUBST_SED.postfix+= \
-e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|'
SUBST_SED.postfix+= \
-e 's|^\(setgid_group\) =.*|\1 = maildrop|'
SUBST_SED.postfix+= \
-e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|'
SUBST_SED.postfix+= \
-e 's|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|'
SUBST_SED.postfix+= \
-e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|'
SUBST_SED.postfix+= \
-e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g'
# options.mk appends to CCARGS and AUXLIBS the options needed to build
# Postfix with support for various add-on modules.
#
.include "options.mk"
PKG_SYSCONFSUBDIR= postfix
LIBEXECDIR= ${PREFIX}/libexec/postfix
DOCDIR= ${PREFIX}/share/doc/postfix
EXAMPLEDIR= ${PREFIX}/share/examples/postfix
FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
MESSAGE_SUBST+= DOCDIR=${DOCDIR}
MESSAGE_SRC+= ${PKGDIR}/MESSAGE
.if exists(${PKGDIR}/MESSAGE.${OPSYS})
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
.endif
PLIST_SRC+= ${PKGDIR}/PLIST
BUILD_TARGET= # empty
MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:Q}
MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q}
RCD_SCRIPTS= postfix
OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc
OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} postfix postfix 0700
MAKE_DIRS+= ${PKG_SYSCONFDIR}
PKG_GROUPS?= postfix maildrop
PKG_USERS?= postfix:postfix
PKG_GECOS.postfix= Postfix User
PKG_HOME.postfix= ${POSTFIX_QUEUE_DIR}
CONF_FILES= # empty
.for i in main.cf master.cf
CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i}
.endfor
CONF_FILES_PERMS= # empty
MAKE_ENV+= DEBUG= # empty
SUBST_CLASSES+= paths
SUBST_FILES.paths= ${WRKDIR}/mailer.conf
SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
SUBST_STAGE.paths= post-patch
.if ${OPSYS} == "SunOS" && !exists(/usr/include/rpcsvc/nis_cache.h)
SUBST_CLASSES+= nis
SUBST_FILES.nis= src/util/sys_defs.h
SUBST_MESSAGE.nis= Working around dropped support for NIS+ on SunOS
SUBST_STAGE.nis= post-patch
SUBST_SED.nis= -e 's,\#define HAS_NISPLUS,\#undef HAS_NISPLUS,g'
.endif
CFLAGS.SunOS+= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
.if !empty(USE_DESTDIR:M[Yy][Ee][Ss])
DESTDIR_INSTALLOPTIONS=-package install_root="${DESTDIR}"
.endif
INSTALLATION_DIRS+= ${LIBEXECDIR} ${EXAMPLEDIR} ${DOCDIR}
post-extract:
cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix
do-configure:
cd ${WRKSRC} && \
env ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \
'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}'
post-build:
.if !empty(PKG_OPTIONS:Msasl)
${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf
.endif
do-install:
rm -f ${WRKSRC}/conf/*.orig
.if !empty(PKG_OPTIONS:Msasl)
${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${DESTDIR}${EXAMPLEDIR}
.endif
cd ${WRKSRC} && sh ./postfix-install -non-interactive \
${DESTDIR_INSTALLOPTIONS} config_directory="${EXAMPLEDIR}"
${INSTALL_DATA} ${WRKDIR}/mailer.conf \
${DESTDIR}${EXAMPLEDIR}/mailer.conf
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl \
${DESTDIR}${PREFIX}/sbin/qshape
${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.include "../../mk/bsd.pkg.mk"

191
mail/postfix/PLIST Normal file
View File

@@ -0,0 +1,191 @@
@comment $NetBSD: PLIST,v 1.26 2013/02/13 14:31:31 taca Exp $
bin/mailq
bin/newaliases
libexec/postfix/anvil
libexec/postfix/bounce
libexec/postfix/cleanup
libexec/postfix/discard
libexec/postfix/dnsblog
libexec/postfix/error
libexec/postfix/flush
libexec/postfix/lmtp
libexec/postfix/local
libexec/postfix/main.cf
libexec/postfix/master
libexec/postfix/master.cf
libexec/postfix/nqmgr
libexec/postfix/oqmgr
libexec/postfix/pickup
libexec/postfix/pipe
libexec/postfix/post-install
libexec/postfix/postfix-files
libexec/postfix/postfix-script
libexec/postfix/postfix-wrapper
libexec/postfix/postmulti-script
libexec/postfix/postscreen
libexec/postfix/proxymap
libexec/postfix/qmgr
libexec/postfix/qmqpd
libexec/postfix/scache
libexec/postfix/showq
libexec/postfix/smtp
libexec/postfix/smtpd
libexec/postfix/spawn
libexec/postfix/tlsmgr
libexec/postfix/tlsproxy
libexec/postfix/trivial-rewrite
libexec/postfix/verify
libexec/postfix/virtual
man/man1/mailq.1
man/man1/newaliases.1
man/man1/postalias.1
man/man1/postcat.1
man/man1/postconf.1
man/man1/postdrop.1
man/man1/postfix.1
man/man1/postkick.1
man/man1/postlock.1
man/man1/postlog.1
man/man1/postmap.1
man/man1/postmulti.1
man/man1/postqueue.1
man/man1/postsuper.1
man/man1/qshape.1
man/man1/sendmail.1
man/man5/access.5
man/man5/aliases.5
man/man5/body_checks.5
man/man5/bounce.5
man/man5/canonical.5
man/man5/cidr_table.5
man/man5/generic.5
man/man5/header_checks.5
man/man5/ldap_table.5
man/man5/master.5
man/man5/memcache_table.5
man/man5/mysql_table.5
man/man5/nisplus_table.5
man/man5/pcre_table.5
man/man5/pgsql_table.5
man/man5/postconf.5
man/man5/postfix-wrapper.5
man/man5/regexp_table.5
man/man5/relocated.5
man/man5/sqlite_table.5
man/man5/tcp_table.5
man/man5/transport.5
man/man5/virtual.5
man/man8/anvil.8
man/man8/bounce.8
man/man8/cleanup.8
man/man8/defer.8
man/man8/discard.8
man/man8/dnsblog.8
man/man8/error.8
man/man8/flush.8
man/man8/lmtp.8
man/man8/local.8
man/man8/master.8
man/man8/oqmgr.8
man/man8/pickup.8
man/man8/pipe.8
man/man8/postscreen.8
man/man8/proxymap.8
man/man8/qmgr.8
man/man8/qmqpd.8
man/man8/scache.8
man/man8/showq.8
man/man8/smtp.8
man/man8/smtpd.8
man/man8/spawn.8
man/man8/tlsmgr.8
man/man8/tlsproxy.8
man/man8/trace.8
man/man8/trivial-rewrite.8
man/man8/verify.8
man/man8/virtual.8
sbin/postalias
sbin/postcat
sbin/postconf
sbin/postdrop
sbin/postfix
sbin/postkick
sbin/postlock
sbin/postlog
sbin/postmap
sbin/postmulti
sbin/postqueue
sbin/postsuper
sbin/qshape
sbin/sendmail
share/doc/postfix/AAAREADME
share/doc/postfix/ADDRESS_CLASS_README
share/doc/postfix/ADDRESS_REWRITING_README
share/doc/postfix/ADDRESS_VERIFICATION_README
share/doc/postfix/BACKSCATTER_README
share/doc/postfix/BASIC_CONFIGURATION_README
share/doc/postfix/BUILTIN_FILTER_README
share/doc/postfix/CDB_README
share/doc/postfix/CONNECTION_CACHE_README
share/doc/postfix/CONTENT_INSPECTION_README
share/doc/postfix/DATABASE_README
share/doc/postfix/DB_README
share/doc/postfix/DEBUG_README
share/doc/postfix/DSN_README
share/doc/postfix/ETRN_README
share/doc/postfix/FILTER_README
share/doc/postfix/INSTALL
share/doc/postfix/IPV6_README
share/doc/postfix/LDAP_README
share/doc/postfix/LINUX_README
share/doc/postfix/LOCAL_RECIPIENT_README
share/doc/postfix/MAILDROP_README
share/doc/postfix/MEMCACHE_README
share/doc/postfix/MILTER_README
share/doc/postfix/MULTI_INSTANCE_README
share/doc/postfix/MYSQL_README
share/doc/postfix/NFS_README
share/doc/postfix/OVERVIEW
share/doc/postfix/PACKAGE_README
share/doc/postfix/PCRE_README
share/doc/postfix/PGSQL_README
share/doc/postfix/POSTSCREEN_README
share/doc/postfix/QSHAPE_README
share/doc/postfix/RELEASE_NOTES
share/doc/postfix/RESTRICTION_CLASS_README
share/doc/postfix/SASL_README
share/doc/postfix/SCHEDULER_README
share/doc/postfix/SMTPD_ACCESS_README
share/doc/postfix/SMTPD_POLICY_README
share/doc/postfix/SMTPD_PROXY_README
share/doc/postfix/SOHO_README
share/doc/postfix/SQLITE_README
share/doc/postfix/STANDARD_CONFIGURATION_README
share/doc/postfix/STRESS_README
share/doc/postfix/TLS_LEGACY_README
share/doc/postfix/TLS_README
share/doc/postfix/TUNING_README
share/doc/postfix/ULTRIX_README
share/doc/postfix/UUCP_README
share/doc/postfix/VERP_README
share/doc/postfix/VIRTUAL_README
share/doc/postfix/XCLIENT_README
share/doc/postfix/XFORWARD_README
share/examples/postfix/LICENSE
share/examples/postfix/TLS_LICENSE
share/examples/postfix/access
share/examples/postfix/aliases
share/examples/postfix/bounce.cf.default
share/examples/postfix/canonical
share/examples/postfix/generic
share/examples/postfix/header_checks
share/examples/postfix/mailer.conf
share/examples/postfix/main.cf
share/examples/postfix/main.cf.default
share/examples/postfix/makedefs.out
share/examples/postfix/master.cf
share/examples/postfix/relocated
${PLIST.csasl}share/examples/postfix/smtpd.conf
share/examples/postfix/transport
share/examples/postfix/virtual
share/examples/rc.d/postfix

9
mail/postfix/distinfo Normal file
View File

@@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.149 2013/02/26 19:56:18 garbled Exp $
SHA1 (postfix-2.9.6.tar.gz) = 9d7af8670fd13fd5e5290ff2e3f00d724178f0fb
RMD160 (postfix-2.9.6.tar.gz) = e3148a42f246c4f54c82cf387b7467805edcd2cd
Size (postfix-2.9.6.tar.gz) = 3767309 bytes
SHA1 (patch-aa) = 2115fd7af5776a14fdbfc88a5ad3bc668a6762db
SHA1 (patch-ag) = 60d752b6c8db971d92ca0017c63329ad446209c5
SHA1 (patch-ai) = 1bd3682b74de11e5d420e453f3df088d965452d6
SHA1 (patch-src_dns_dns__lookup.c) = 70147b43a683aa6fd99317d7bae36dfe9beb2d8d

View File

@@ -0,0 +1,10 @@
# $NetBSD: mailer.conf,v 1.6 2004/07/18 19:16:31 jlam Exp $
#
# Use "postfix" as replacement for "sendmail".
#
sendmail @PREFIX@/sbin/sendmail
send-mail @PREFIX@/sbin/sendmail
mailq @PREFIX@/sbin/sendmail
newaliases @PREFIX@/sbin/sendmail
hoststat @PREFIX@/sbin/sendmail
purgestat @PREFIX@/sbin/sendmail

View File

@@ -0,0 +1,71 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: postfix.sh,v 1.5 2005/12/30 06:29:41 martti Exp $
#
# PROVIDE: mail
# REQUIRE: LOGIN
# we make mail start late, so that things like .forward's are not
# processed until the system is fully operational
. /etc/rc.subr
name="postfix"
rcvar=$name
postfix_command="@PREFIX@/sbin/${name}"
: ${required_files=`@PREFIX@/sbin/postconf -h config_directory`/main.cf}
start_precmd="postfix_precmd"
start_cmd="postfix_op"
stop_cmd="postfix_op"
reload_cmd="postfix_op"
extra_commands="reload"
: ${spooletcdir=`@PREFIX@/sbin/postconf -h queue_directory`/etc}
required_dirs=$spooletcdir
postfix_precmd()
{
# As this is called after the is_running and required_dir checks
# are made in run_rc_command(), we can safely assume ${spooletcdir}
# exists and postfix isn't running at this point (unless forcestart
# is used).
#
[ ! -d ${spooletcdir} ] && mkdir -p ${spooletcdir}
for f in localtime resolv.conf services; do
if [ -f /etc/$f ]; then
cmp -s /etc/$f ${spooletcdir}/$f || \
cp -p /etc/$f ${spooletcdir}/$f
fi
done
}
postfix_op()
{
case ${rc_arg} in
start)
for _f in $required_dirs; do
if [ ! -d "${_f}/." ]; then
warn "${_f} is not a directory."
if [ -z $rc_force ]; then
return 1
fi
fi
done
for _f in $required_files; do
if [ ! -r "${_f}" ]; then
warn "${_f} is not readable."
if [ -z $rc_force ]; then
return 1
fi
fi
done
${postfix_command} ${rc_arg}
;;
*)
${postfix_command} ${rc_arg}
;;
esac
}
load_rc_config $name
run_rc_command "$1"

123
mail/postfix/options.mk Normal file
View File

@@ -0,0 +1,123 @@
# $NetBSD: options.mk,v 1.36 2011/05/10 13:38:23 taca Exp $
# Global and legacy options
PKG_OPTIONS_VAR= PKG_OPTIONS.postfix
PKG_SUPPORTED_OPTIONS= bdb ldap mysql pcre pgsql sasl sqlite tls cdb
PKG_SUGGESTED_OPTIONS= tls
.include "../../mk/bsd.options.mk"
###
### Support "hash" (Berkeley DB) map type.
###
.if empty(PKG_OPTIONS:Mbdb)
PKG_OPTIONS+= bdb # "hash" map type is mandatory
.endif
.if !empty(PKG_OPTIONS:Mbdb)
. include "../../mk/bdb.buildlink3.mk"
CCARGS+= -DHAS_DB
AUXLIBS+= ${BDB_LIBS}
.endif
###
### STARTTLS support
###
.if !empty(PKG_OPTIONS:Mtls)
. include "../../security/openssl/buildlink3.mk"
CCARGS+= -DUSE_TLS
AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
-lssl -lcrypto
.endif
###
### Support "pcre" map type for regular expressions.
###
.if !empty(PKG_OPTIONS:Mpcre)
. include "../../devel/pcre/buildlink3.mk"
CCARGS+= -DHAS_PCRE
AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \
-lpcre
.else
CCARGS+= -DNO_PCRE
.endif
###
### Support LDAP directories for table lookups.
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap-client/buildlink3.mk"
CCARGS+= -DHAS_LDAP
AUXLIBS+= -L${BUILDLINK_PREFIX.openldap-client}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap-client}/lib \
-lldap -llber
.endif
###
### Support using a MySQL database server for table lookups.
###
.if !empty(PKG_OPTIONS:Mmysql)
. include "../../mk/mysql.buildlink3.mk"
CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
-lmysqlclient -lz -lm
.endif
###
### Support using a PostgreSQL database server for table lookups.
###
.if !empty(PKG_OPTIONS:Mpgsql)
. include "../../mk/pgsql.buildlink3.mk"
. include "../../security/openssl/buildlink3.mk"
CCARGS+= -DHAS_PGSQL -I${PGSQL_PREFIX}/include/pgsql
AUXLIBS+= -L${PGSQL_PREFIX}/lib -lpq \
-L${BUILDLINK_PREFIX.openssl}/lib -lcrypt -lssl -lcrypto
.endif
###
### Support using a SQLite database for table lookups.
### See http://www.treibsand.com/postfix-sqlite/
###
.if !empty(PKG_OPTIONS:Msqlite)
. include "../../databases/sqlite3/buildlink3.mk"
CCARGS+= -DHAS_SQLITE -I${SQLITE3_PREFIX}/include/sqlite3
AUXLIBS+= -L${SQLITE3_PREFIX}/lib -lsqlite3
.endif
###
### Cyrus SASL support for SMTP authentication.
### (Dovecot SASL support is built in by default.)
###
PLIST_VARS+= csasl
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl/buildlink3.mk"
BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
SASLLIBDIR= ${PREFIX}/lib/sasl2
PWCHECK_METHOD= auxprop
CCARGS+= -DUSE_CYRUS_SASL
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl2
PLIST.csasl= yes
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
MESSAGE_SUBST+= SASLLIBDIR=${SASLLIBDIR}
MAKE_DIRS+= ${SASLLIBDIR}
CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
.else
CCARGS+= -DDEF_SERVER_SASL_TYPE=\"dovecot\"
.endif
###
### Support CDB (Constant Database) map type.
###
.if !empty(PKG_OPTIONS:Mcdb)
. include "../../databases/tinycdb/buildlink3.mk"
CCARGS+= -DHAS_CDB
AUXLIBS+= -L${BUILDLINK_PREFIX.tinycdb}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinycdb}/lib \
-lcdb
.endif

View File

@@ -0,0 +1,44 @@
$NetBSD: patch-aa,v 1.22 2013/02/13 14:31:31 taca Exp $
Make this pkgsrc friendly.
--- postfix-install.orig 2011-11-19 23:09:16.000000000 +0000
+++ postfix-install
@@ -365,26 +365,6 @@ HTML files. Specify \"no\" if you do not
: ${tempdir=`pwd`}
: ${config_directory=`bin/postconf -c conf -h -d config_directory`}
-# Find out the location of installed configuration files.
-
-test -z "$non_interactive" && for name in install_root tempdir config_directory
-do
- while :
- do
- echo
- eval echo Please specify \$${name}_prompt | ${FMT}
- eval echo \$n "$name: [\$$name]\ \$c"
- read ans
- case $ans in
- "") break;;
- *) case $ans in
- /*) eval $name=$ans; break;;
- *) echo; echo $0: Error: $name should be an absolute path name. 1>&2;;
- esac;;
- esac
- done
-done
-
# In case some systems special-case pathnames beginning with //.
case $install_root in
@@ -739,10 +719,3 @@ bin/postconf -c $CONFIG_DIRECTORY -e \
"sample_directory = $sample_directory" \
"readme_directory = $readme_directory" \
|| exit 1
-
-# If Postfix is being installed locally from source code, do the
-# post-install processing now.
-
-test -n "$install_root" || {
- bin/postfix post-install $post_install_options || exit 1
-}

View File

@@ -0,0 +1,68 @@
$NetBSD: patch-ag,v 1.33 2012/02/27 03:01:30 taca Exp $
Only define HAS_DB if it hasn't been defined.
Add support for NetBSD 5.x, NetBSD 6.x and DragonFly BSD.
Handle closefrom() on FreeBSD.
--- src/util/sys_defs.h.orig 2011-11-02 23:46:22.000000000 +0000
+++ src/util/sys_defs.h
@@ -30,8 +30,8 @@
|| defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
|| defined(OPENBSD5) \
|| defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \
- || defined(NETBSD4) \
- || defined(EKKOBSD1)
+ || defined(NETBSD4) || defined(NETBSD5) || defined(NETBSD6) \
+ || defined(EKKOBSD1) || defined(DRAGONFLY)
#define SUPPORTED
#include <sys/types.h>
#include <sys/param.h>
@@ -44,7 +44,9 @@
#define DEF_MAILBOX_LOCK "flock, dotlock"
#define HAS_SUN_LEN
#define HAS_FSYNC
+#ifndef HAS_DB
#define HAS_DB
+#endif
#define HAS_SA_LEN
#define DEF_DB_TYPE "hash"
#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
@@ -165,9 +167,19 @@
#define HAS_FUTIMES
#endif
+#if defined(__DragonFly__)
+#define HAS_DEV_URANDOM
+#define HAS_ISSETUGID
+#define HAS_FUTIMES
+#define SOCKADDR_SIZE socklen_t
+#define SOCKOPT_SIZE socklen_t
+#define HAS_DUPLEX_PIPE
+#endif
+
#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105000000) \
|| (defined(__FreeBSD__) && __FreeBSD__ >= 4) \
|| (defined(OpenBSD) && OpenBSD >= 200003) \
+ || defined(__DragonFly__) \
|| defined(USAGI_LIBINET6)
#ifndef NO_IPV6
# define HAS_IPV6
@@ -176,14 +188,16 @@
#if (defined(__FreeBSD_version) && __FreeBSD_version >= 300000) \
|| (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 103000000) \
- || (defined(OpenBSD) && OpenBSD >= 199700) /* OpenBSD 2.0?? */
+ || (defined(OpenBSD) && OpenBSD >= 199700) /* OpenBSD 2.0?? */ \
+ || defined(__DragonFly__)
# define USE_SYSV_POLL
#endif
#ifndef NO_KQUEUE
# if (defined(__FreeBSD_version) && __FreeBSD_version >= 410000) \
|| (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200000000) \
- || (defined(OpenBSD) && OpenBSD >= 200105) /* OpenBSD 2.9 */
+ || (defined(OpenBSD) && OpenBSD >= 200105) /* OpenBSD 2.9 */ \
+ || defined(__DragonFly__)
# define EVENTS_STYLE EVENTS_STYLE_KQUEUE
# endif
#endif

View File

@@ -0,0 +1,101 @@
$NetBSD: patch-ai,v 1.28 2012/12/13 16:23:14 taca Exp $
Make this pkgsrc friendly.
Add support for NetBSD 5.x, NetBSD 6.x and DragonFly BSD.
--- makedefs.orig 2012-12-12 22:49:32.000000000 +0000
+++ makedefs
@@ -148,6 +148,8 @@ case "$SYSTEM.$RELEASE" in
;;
FreeBSD.9*) SYSTYPE=FREEBSD9
;;
+ DragonFly.*) SYSTYPE=DRAGONFLY
+ ;;
OpenBSD.2*) SYSTYPE=OPENBSD2
;;
OpenBSD.3*) SYSTYPE=OPENBSD3
@@ -166,6 +168,10 @@ case "$SYSTEM.$RELEASE" in
;;
NetBSD.4*) SYSTYPE=NETBSD4
;;
+ NetBSD.5*) SYSTYPE=NETBSD5
+ ;;
+ NetBSD.6*) SYSTYPE=NETBSD6
+ ;;
BSD/OS.2*) SYSTYPE=BSDI2
;;
BSD/OS.3*) SYSTYPE=BSDI3
@@ -218,13 +224,6 @@ case "$SYSTEM.$RELEASE" in
esac
;;
ULTRIX.4*) SYSTYPE=ULTRIX4
- if [ -f /usr/local/lib/libdb.a ]; then
- SYSLIBS="$SYSLIBS -ldb"
- CCARGS="$CCARGS -DHAS_DB"
- if [ -d /usr/local/include/db ]; then
- CCARGS="$CCARGS -I/usr/local/include/db"
- fi
- fi
for l in syslog resolv; do
if [ -f /usr/local/lib/lib$l.a ]; then
SYSLIBS="$SYSLIBS -l$l"
@@ -262,25 +261,8 @@ case "$SYSTEM.$RELEASE" in
esac;;
# Tested with RedHat 3.03 on 20020729.
Linux.1*) SYSTYPE=LINUX1
- SYSLIBS="-ldb"
;;
Linux.2*) SYSTYPE=LINUX2
- # Postfix no longer needs DB 1.85 compatibility
- if [ -f /usr/include/db.h ]
- then
- : we are all set
- elif [ -f /usr/include/db/db.h ]
- then
- CCARGS="$CCARGS -I/usr/include/db"
- else
- # No, we're not going to try db1 db2 db3 etc.
- # On a properly installed system, Postfix builds
- # by including <db.h> and by linking with -ldb
- echo "No <db.h> include file found." 1>&2
- echo "Install the appropriate db*-devel package first." 1>&2
- echo "See the RELEASE_NOTES file for more information." 1>&2
- exit 1
- fi
# GDBM locks the DBM .pag file after open. This breaks postmap.
# if [ -f /usr/include/gdbm-ndbm.h ]
# then
@@ -291,7 +273,6 @@ case "$SYSTEM.$RELEASE" in
# CCARGS="$CCARGS -DHAS_DBM -DPATH_NDBM_H='<gdbm/ndbm.h>'"
# GDBM_LIBS=gdbm
# fi
- SYSLIBS="-ldb"
for name in nsl resolv $GDBM_LIBS
do
for lib in /usr/lib64 /lib64 /usr/lib /lib
@@ -420,25 +401,13 @@ EOF
HP-UX.A.09.*) SYSTYPE=HPUX9
SYSLIBS=-ldbm
CCARGS="$CCARGS -DMISSING_USLEEP"
- if [ -f /usr/lib/libdb.a ]; then
- CCARGS="$CCARGS -DHAS_DB"
- SYSLIBS="$SYSLIBS -ldb"
- fi
;;
HP-UX.B.10.*) SYSTYPE=HPUX10
CCARGS="$CCARGS `nm /usr/lib/libc.a 2>/dev/null |
(grep usleep >/dev/null || echo '-DMISSING_USLEEP')`"
- if [ -f /usr/lib/libdb.a ]; then
- CCARGS="$CCARGS -DHAS_DB"
- SYSLIBS=-ldb
- fi
;;
HP-UX.B.11.*) SYSTYPE=HPUX11
SYSLIBS=-lnsl
- if [ -f /usr/lib/libdb.a ]; then
- CCARGS="$CCARGS -DHAS_DB"
- SYSLIBS="$SYSLIBS -ldb"
- fi
;;
ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix543
RANLIB=echo

View File

@@ -0,0 +1,47 @@
$NetBSD: patch-src_dns_dns__lookup.c,v 1.1 2013/02/26 19:56:18 garbled Exp $
--- src/dns/dns_lookup.c.orig 2013-02-26 19:34:50.000000000 +0000
+++ src/dns/dns_lookup.c
@@ -153,6 +153,8 @@
/* Local stuff. */
+struct __res_state rstate;
+
/*
* Structure to keep track of things while decoding a name server reply.
*/
@@ -192,7 +194,7 @@ static int dns_query(const char *name, i
/*
* Initialize the name service.
*/
- if ((_res.options & RES_INIT) == 0 && res_init() < 0) {
+ if ((rstate.options & RES_INIT) == 0 && res_ninit(&rstate) < 0) {
if (why)
vstring_strcpy(why, "Name service initialization failure");
return (DNS_FAIL);
@@ -206,18 +208,18 @@ static int dns_query(const char *name, i
if ((flags & USER_FLAGS) != flags)
msg_panic("dns_query: bad flags: %d", flags);
- saved_options = (_res.options & USER_FLAGS);
+ saved_options = (rstate.options & USER_FLAGS);
/*
* Perform the lookup. Claim that the information cannot be found if and
* only if the name server told us so.
*/
for (;;) {
- _res.options &= ~saved_options;
- _res.options |= flags;
- len = res_search((char *) name, C_IN, type, reply->buf, reply->buf_len);
- _res.options &= ~flags;
- _res.options |= saved_options;
+ rstate.options &= ~saved_options;
+ rstate.options |= flags;
+ len = res_nsearch(&rstate, (char *) name, C_IN, type, reply->buf, reply->buf_len);
+ rstate.options &= ~flags;
+ rstate.options |= saved_options;
if (len < 0) {
if (why)
vstring_sprintf(why, "Host or domain name not found. "