openbsd-ports/mail/postfix/Makefile.inc

127 lines
3.8 KiB
PHP
Raw Normal View History

# $OpenBSD: Makefile.inc,v 1.79 2011/03/09 10:45:27 sthen Exp $
COMMENT= fast, secure sendmail replacement
2010-11-11 05:57:40 -05:00
DISTNAME ?= postfix-${VERSION}
PKGNAME ?= postfix-${VERSION:S/-/./}
CATEGORIES= mail
MASTER_SITE_POSTFIX=\
ftp://ftp.porcupine.org/mirrors/postfix-release/ \
ftp://ftp.merit.edu/postfix/ \
ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
ftp://ftp.tau.ac.il/pub/unix/mail/postfix/ \
ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/
DIST_SUBDIR= postfix
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
HOMEPAGE= http://www.postfix.org/
MAINTAINER= Brad Smith <brad@comstyle.com>
PERMIT_PACKAGE_CDROM= cannot be sold, see section 4 of license
PERMIT_PACKAGE_FTP= yes
PERMIT_DISTFILES_CDROM= cannot be sold, see section 4 of license
PERMIT_DISTFILES_FTP= yes
LIB_DEPENDS += devel/pcre
2010-11-11 05:57:40 -05:00
MAKE_DEBUG ?=
MAKE_CCARGS += -I. -I../../include
2010-11-11 05:57:40 -05:00
MAKE_CCARGS += -DDEF_CONFIG_DIR=\"${SYSCONFDIR}/postfix\"
MAKE_CCARGS += -DDEF_DATA_DIR=\"/var/postfix\"
MAKE_CCARGS += -DUSE_TLS
MAKE_CCARGS += -DUSE_SASL_AUTH
2010-11-11 05:57:40 -05:00
MAKE_AUXLIBS += -lssl -lcrypto
2010-11-11 05:57:40 -05:00
WANTLIB= c crypto ssl pcre
ALL_TARGET= default
NO_REGRESS= Yes
2011-03-06 04:36:29 -05:00
FLAVORS += sasl2 ldap mysql pgsql db4 sqlite
2010-11-11 05:57:40 -05:00
FLAVOR ?=
.if ${FLAVOR:L:Msasl2}
2010-11-19 02:23:05 -05:00
LIB_DEPENDS += security/cyrus-sasl2
2010-11-11 05:57:40 -05:00
WANTLIB += sasl2
MAKE_CCARGS += -DUSE_CYRUS_SASL -I${LOCALBASE}/include -I${LOCALBASE}/include/sasl
2010-11-11 05:57:40 -05:00
MAKE_AUXLIBS += -L${LOCALBASE}/lib -lsasl2
.endif
.if ${FLAVOR:L:Mldap}
LIB_DEPENDS += databases/openldap>=2,<3
2010-11-19 02:23:05 -05:00
WANTLIB += ldap>=2 lber
MAKE_CCARGS += -DHAS_LDAP -I${LOCALBASE}/include
2010-11-11 05:57:40 -05:00
MAKE_AUXLIBS += -L${LOCALBASE}/lib -lldap -llber
.endif
.if ${FLAVOR:L:Mmysql}
2010-11-19 02:23:05 -05:00
LIB_DEPENDS += databases/mysql
WANTLIB += lib/mysql/mysqlclient>=10
MAKE_CCARGS += -DHAS_MYSQL -I${LOCALBASE}/include/mysql
2010-11-11 05:57:40 -05:00
MAKE_AUXLIBS += -L${LOCALBASE}/lib/mysql -lmysqlclient
.endif
.if ${FLAVOR:L:Mpgsql}
2010-11-19 02:23:05 -05:00
LIB_DEPENDS += databases/postgresql
WANTLIB += pq>=3
MAKE_CCARGS += -DHAS_PGSQL -I${LOCALBASE}/include/postgresql
2010-11-11 05:57:40 -05:00
MAKE_AUXLIBS += -L${LOCALBASE}/lib -lpq
.endif
.if ${FLAVOR:L:Mdb4}
LIB_DEPENDS += databases/db/v4>=4,<5
2010-11-19 02:23:05 -05:00
WANTLIB += lib/db4/db>=4
2010-11-11 05:57:40 -05:00
MAKE_CCARGS += -I${LOCALBASE}/include/db4
MAKE_AUXLIBS += -L${LOCALBASE}/lib/db4 -ldb
.endif
2010-08-31 02:03:32 -04:00
.if ${FLAVOR:L:Msqlite}
2010-11-19 02:23:05 -05:00
LIB_DEPENDS += databases/sqlite3
2010-11-11 05:57:40 -05:00
WANTLIB += pthread sqlite3
MAKE_CCARGS += -DHAS_SQLITE -I${LOCALBASE}/include
2010-11-11 05:57:40 -05:00
MAKE_AUXLIBS += -L${LOCALBASE}/lib -lsqlite3 -pthread
2010-08-31 02:03:32 -04:00
.endif
pre-configure:
@perl -pi -e 's,/cyrus/bin,${LOCALBASE}/libexec/cyrus-imapd,g' \
${WRKSRC}/conf/master.cf
do-configure:
@cd ${WRKSRC}; ${MAKE_PROGRAM} makefiles \
CC="${CC}" OPT="${CFLAGS}" DEBUG="${MAKE_DEBUG}" \
CCARGS='${MAKE_CCARGS}' AUXLIBS="${MAKE_AUXLIBS}"
do-install:
@(cd ${WRKSRC}; sh postfix-install \
-non-interactive \
mail_owner=_postfix \
setgid_group=_postdrop \
install_root=${WRKINST} \
2008-02-01 11:37:09 -05:00
data_directory=/var/postfix \
queue_directory=/var/spool/postfix \
daemon_directory=${TRUEPREFIX}/libexec/postfix \
command_directory=${TRUEPREFIX}/sbin \
sendmail_path=${TRUEPREFIX}/sbin/sendmail \
newaliases_path=${TRUEPREFIX}/sbin/newaliases \
mailq_path=${TRUEPREFIX}/sbin/mailq \
manpage_directory=${TRUEPREFIX}/man \
readme_directory=${TRUEPREFIX}/share/doc/postfix/readme \
html_directory=${TRUEPREFIX}/share/doc/postfix/html \
)
@${INSTALL_SCRIPT} ${FILESDIR}/postfix-enable ${PREFIX}/sbin
@${INSTALL_SCRIPT} ${FILESDIR}/postfix-disable ${PREFIX}/sbin
@${INSTALL_SCRIPT} ${FILESDIR}/postfix-install ${PREFIX}/sbin
@${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${PREFIX}/sbin/qshape
@${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${PREFIX}/man/man1
@${INSTALL_DATA_DIR} ${PREFIX}/share/examples/postfix
@mv ${WRKINST}${SYSCONFDIR}/postfix/* ${PREFIX}/share/examples/postfix
2008-02-01 11:37:09 -05:00
@rm -fr ${WRKINST}/var/postfix
@rm -fr ${WRKINST}/var/spool/postfix
@chown -h ${BINOWN}:${BINGRP} ${PREFIX}/{sbin,libexec/postfix}/*
@chown -R ${MANOWN}:${MANGRP} ${PREFIX}/man
@chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share