summaryrefslogtreecommitdiff
path: root/mail/sendmail812
diff options
context:
space:
mode:
authorwiz <wiz>2005-08-01 14:54:33 +0000
committerwiz <wiz>2005-08-01 14:54:33 +0000
commit52406ca57cda0fb5bfad2c592c11ca08e6776bd6 (patch)
treec6a580e65e08faf42c727c1cf1d5d51da462b0bd /mail/sendmail812
parent78025d614a1f7d68e6b72f12c94ea2d66b59c30c (diff)
downloadpkgsrc-52406ca57cda0fb5bfad2c592c11ca08e6776bd6.tar.gz
Convert to options framework.
Diffstat (limited to 'mail/sendmail812')
-rw-r--r--mail/sendmail812/Makefile53
-rw-r--r--mail/sendmail812/Makefile.common6
-rw-r--r--mail/sendmail812/options.mk70
3 files changed, 85 insertions, 44 deletions
diff --git a/mail/sendmail812/Makefile b/mail/sendmail812/Makefile
index b4444780012..4cd08b4af20 100644
--- a/mail/sendmail812/Makefile
+++ b/mail/sendmail812/Makefile
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.4 2005/03/30 21:54:19 adrianp Exp $
+# $NetBSD: Makefile,v 1.5 2005/08/01 14:54:33 wiz Exp $
+.include "options.mk"
.include "../../mail/sendmail812/Makefile.common"
PKGNAME= sendmail-${DIST_VERS}
@@ -11,55 +12,31 @@ CONFLICTS+= postfix-[0-9]* fastforward>=0.51nb2
MESSAGE_SRC= ${WRKDIR}/.MESSAGE_SRC
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
-.if ${OPSYS} == "SunOS"
-USE_DB2?= YES
-.else
-USE_DB2?= NO
-.endif
-.if defined(USE_DB4) && ${USE_DB4} == YES
-.include "../../databases/db4/buildlink3.mk"
-.elif ${USE_DB2} == YES
-.include "../../databases/db/buildlink3.mk"
-.endif
-
-.if defined(USE_OPENLDAP) && ${USE_OPENLDAP} == YES
-.include "../../databases/openldap/buildlink3.mk"
-.endif
-
-.if defined(USE_SASL2) && ${USE_SASL2} == YES
-.include "../../security/cyrus-sasl2/buildlink3.mk"
-.endif
-
-.if defined(USE_STARTTLS) && ${USE_STARTTLS} == YES
-.include "../../security/openssl/buildlink3.mk"
-.endif
-
-USE_TCPWRAPPERS?= YES
-.if ${USE_TCPWRAPPERS} == YES
-.include "../../security/tcp_wrappers/buildlink3.mk"
-.endif
+USE_PKGINSTALL= yes
+PKG_GROUPS= smmsp
+PKG_USERS= smmsp:smmsp::Sendmail\\ Message\\ Submission\\ Program
post-patch: make-sendmail-siteconfig
-.if ${USE_TCPWRAPPERS} == YES
+.if !empty(PKG_OPTIONS:Mtcpwrappers)
${CAT} ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG}
${ECHO} -n ' TCPWRAPPERS' >>${DESCR_SRC}
.endif
-.if defined(USE_OPENLDAP) && ${USE_OPENLDAP} == YES
+.if !empty(PKG_OPTIONS:Mldap)
${CAT} ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG}
${ECHO} -n ' LDAP' >>${DESCR_SRC}
.endif
-.if defined(USE_DB4) && ${USE_DB4} == YES
+.if !empty(PKG_OPTIONS:Mdb4)
${CAT} ${FILESDIR}/site.config.m4-db4 >>${SITECONFIG}
${ECHO} -n ' DB4' >>${DESCR_SRC}
-.elif ${USE_DB2} == YES
+.elif !empty(PKG_OPTIONS:Mdb2)
${CAT} ${FILESDIR}/site.config.m4-db2 >>${SITECONFIG}
${ECHO} -n ' DB2' >>${DESCR_SRC}
.endif
-.if defined(USE_STARTTLS) && ${USE_STARTTLS} == YES
+.if !empty(PKG_OPTIONS:Mtls)
${CAT} ${FILESDIR}/site.config.m4-starttls >>${SITECONFIG}
${ECHO} -n ' STARTTLS' >>${DESCR_SRC}
.endif
-.if defined(USE_SASL2) && ${USE_SASL2} == YES
+.if !empty(PKG_OPTIONS:Msasl)
${CAT} ${FILESDIR}/site.config.m4-sasl2 >>${SITECONFIG}
${ECHO} -n ' SASL2' >>${DESCR_SRC}
.endif
@@ -73,7 +50,7 @@ post-build:
<${FILESDIR}/mailer.conf >${WRKDIR}/mailer.conf.sendmail
${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
${CP} ${PKGDIR}/MESSAGE ${MESSAGE_SRC}
-.if ${USE_DB2} == YES
+.if !empty(PKG_OPTIONS:Mdb2)
${ECHO} "" >>${MESSAGE_SRC}
${ECHO} "If you are upgrading from \"sendmail\" 8.8.x don't forget to rebuild all" >>${MESSAGE_SRC}
${ECHO} "databases with \"${PREFIX}/bin/newaliases\" and \"${PREFIX}/sbin/makemap\"." >>${MESSAGE_SRC}
@@ -90,7 +67,7 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/mailer.conf.sendmail ${PREFIX}/share/examples/sendmail/mailer.conf
cd ${WRKSRC}/cf && ${PAX} -rw -pp -pm . ${PREFIX}/share/sendmail
${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/share/sendmail
-.if ${USE_DB2} == YES
+.if !empty(PKG_OPTIONS:Mdb2)
${MV} -f /usr/sbin/makemap /usr/sbin/makemap.8.8 || ${TRUE}
.endif
${INSTALL_DATA} ${WRKSRC}/obj.`uname -srm | ${TR} \ . | ${TR} \/ - | ${SED} s/sun4./sun4/`/libsm/libsm.a \
@@ -99,10 +76,6 @@ post-install:
${WRKSRC}/obj.`uname -srm | ${TR} \ . | ${TR} \/ - | ${SED} s/sun4./sun4/`/libsmutil/libsmutil.a \
${PREFIX}/lib
-USE_PKGINSTALL= yes
-PKG_GROUPS= smmsp
-PKG_USERS= smmsp:smmsp::Sendmail\\ Message\\ Submission\\ Program
-
.include "../../mk/bsd.pkg.mk"
# has to be below include for bsd.pkg.mk, else substition fails
diff --git a/mail/sendmail812/Makefile.common b/mail/sendmail812/Makefile.common
index 11d406bed68..583078a7771 100644
--- a/mail/sendmail812/Makefile.common
+++ b/mail/sendmail812/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.6 2005/05/22 20:08:12 jlam Exp $
+# $NetBSD: Makefile.common,v 1.7 2005/08/01 14:54:33 wiz Exp $
#
# Makefile fragment shared with libmilter
#
@@ -25,8 +25,6 @@ MAKE_ENV+= BSD_BINOWN="${BINOWN}" BSD_BINGRP="${BINGRP}" \
BUILDLINK_DIR="${BUILDLINK_DIR}"
SITECONFIG= ${WRKSRC}/devtools/Site/site.config.m4
-BUILD_DEFS+= USE_INET6 USE_TCPWRAPPERS USE_OPENLDAP USE_DB2 \
- USE_SASL2 USE_STARTTLS USE_DB4
DESCR_SRC= ${WRKDIR}/.DESCR_SRC
WRKSRC= ${WRKDIR}/sendmail-${DIST_VERS}
@@ -41,7 +39,7 @@ make-sendmail-siteconfig:
${CP} ${PKGDIR}/DESCR ${DESCR_SRC}
${ECHO} '---' >>${DESCR_SRC}
${ECHO} -n 'compiled features:' >>${DESCR_SRC}
-.if defined(USE_INET6) && ${USE_INET6} == YES
+.if !empty(PKG_OPTIONS:Minet6)
${CAT} ${FILESDIR}/site.config.m4-v6 >>${SITECONFIG}
.if ${OPSYS} != "SunOS" && ${OPSYS} != "BSDOS"
${CAT} ${FILESDIR}/site.config.m4-v6-not-solaris >>${SITECONFIG}
diff --git a/mail/sendmail812/options.mk b/mail/sendmail812/options.mk
new file mode 100644
index 00000000000..f7d4a55c1e1
--- /dev/null
+++ b/mail/sendmail812/options.mk
@@ -0,0 +1,70 @@
+# $NetBSD: options.mk,v 1.1 2005/08/01 14:54:33 wiz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.sendmail
+PKG_OPTIONS_OPTIONAL_GROUPS= database
+PKG_OPTIONS_GROUP.database= db2 db4
+PKG_SUPPORTED_OPTIONS= inet6 ldap sasl tls tcpwrappers socketmap
+PKG_SUGGESTED_OPTIONS= tcpwrappers
+
+PKG_OPTIONS_LEGACY_OPTS+= starttls:tls
+PKG_OPTIONS_LEGACY_VARS+= USE_STARTTLS:ssl
+PKG_OPTIONS_LEGACY_VARS+= USE_TCPWRAPPERS:tcpwrappers
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+PKG_SUGGEST_OPTIONS+= db2
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Berkeley DB version 2/4 format for on disk databases e.g. aliases
+###
+.if !empty(PKG_OPTIONS:Mdb2)
+. include "../../databases/db/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mdb4)
+. include "../../databases/db4/buildlink3.mk"
+.endif
+
+###
+### Use OpenLDAP for remote database access
+###
+.if !empty(PKG_OPTIONS:Mldap)
+. include "../../databases/openldap/buildlink3.mk"
+.endif
+
+###
+### Use SASL/v2 for SMTP AUTH
+###
+.if !empty(PKG_OPTIONS:Msasl)
+. include "../../security/cyrus-sasl2/buildlink3.mk"
+.endif
+
+###
+### Use OpenSSL libraries for SMTP STARTTLS support
+###
+.if !empty(PKG_OPTIONS:Mtls)
+. include "../../security/openssl/buildlink3.mk"
+.endif
+
+###
+### Use tcpwrappers for network access control to sendmail
+###
+.if !empty(PKG_OPTIONS:Mtcpwrappers)
+. include "../../security/tcp_wrappers/buildlink3.mk"
+.endif
+
+###
+### Enable Sendmail SOCKETMAP support
+###
+.if !empty(PKG_OPTIONS:Msocketmap)
+USE_TOOLS+= perl:run
+REPLACE_PERL= contrib/socketmapClient.pl contrib/socketmapServer.pl
+.endif
+
+###
+### IPv6 support.
+###
+.if !empty(PKG_OPTIONS:Minet6)
+.endif