pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail Convert to options framework.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b1fe94177ab8
branches:  trunk
changeset: 497645:b1fe94177ab8
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Aug 01 14:54:33 2005 +0000

description:
Convert to options framework.

diffstat:

 mail/libmilter812/Makefile       |   3 +-
 mail/libmilter812/options.mk     |  13 +++++++
 mail/sendmail812/Makefile        |  53 +++++++----------------------
 mail/sendmail812/Makefile.common |   6 +--
 mail/sendmail812/options.mk      |  70 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 100 insertions(+), 45 deletions(-)

diffs (234 lines):

diff -r 3caa7a9935b7 -r b1fe94177ab8 mail/libmilter812/Makefile
--- a/mail/libmilter812/Makefile        Mon Aug 01 14:31:46 2005 +0000
+++ b/mail/libmilter812/Makefile        Mon Aug 01 14:54:33 2005 +0000
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.1.1.1 2004/08/30 20:53:20 adrianp Exp $
+# $NetBSD: Makefile,v 1.2 2005/08/01 14:54:33 wiz Exp $
 
+.include "options.mk"
 .include "../../mail/sendmail812/Makefile.common"
 
 PKGNAME=       libmilter-${DIST_VERS}
diff -r 3caa7a9935b7 -r b1fe94177ab8 mail/libmilter812/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/libmilter812/options.mk      Mon Aug 01 14:54:33 2005 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.1 2005/08/01 14:54:33 wiz Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.libmilter812
+# just needed for Makefile.common to work
+PKG_SUPPORTED_OPTIONS= inet6
+
+.include "../../mk/bsd.options.mk"
+
+###
+### IPv6 support.
+###
+.if !empty(PKG_OPTIONS:Minet6)
+.endif
diff -r 3caa7a9935b7 -r b1fe94177ab8 mail/sendmail812/Makefile
--- a/mail/sendmail812/Makefile Mon Aug 01 14:31:46 2005 +0000
+++ b/mail/sendmail812/Makefile Mon Aug 01 14:54:33 2005 +0000
@@ -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 @@
 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 @@
          <${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 @@
        ${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 @@
                ${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 -r 3caa7a9935b7 -r b1fe94177ab8 mail/sendmail812/Makefile.common
--- a/mail/sendmail812/Makefile.common  Mon Aug 01 14:31:46 2005 +0000
+++ b/mail/sendmail812/Makefile.common  Mon Aug 01 14:54:33 2005 +0000
@@ -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 @@
                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 @@
        ${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 -r 3caa7a9935b7 -r b1fe94177ab8 mail/sendmail812/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sendmail812/options.mk       Mon Aug 01 14:54:33 2005 +0000
@@ -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



Home | Main Index | Thread Index | Old Index