pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/imap-uw * Split the MESSAGE file into two parts, ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b7be9dab98e5
branches:  trunk
changeset: 516734:b7be9dab98e5
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jul 26 20:00:27 2006 +0000

description:
* Split the MESSAGE file into two parts, one of which only shows up
  if "ssl" is a package option.

* Stop the abuse of BUILD_TARGET and use MAKE_FLAGS instead.  Also,
  use OPSYSVARS to simplify the specification of the correct BUILD_TARGET
  for each platform.

* Make use of the EXTRASPECIALS variable used by imap makefiles to pass
  special MAKE_FLAGS settings through to all recursive make processes.
  This gets rid of some MAKE_ENV statements.

* Split off the special alpha-codegen hack into a hacks.mk file.

* Do man page fixups at post-build time, not post-extract time.  This
  leaves the files pristine for possible patching.

* Add back the special handling if IMAP_UW_MAILSPOOLHOME is defined.
  It was accidentally removed in patch-am when the whoson modifications
  were added.  Move the modifications to the configure phase instead
  of post-patch so that the modifications aren't accidentally picked
  up by mkpatches.

* Instead of listing each Makefile that needs the sed modification
  s/c-client.a/libc-client.la/ and modifying them at post-extract
  time, simply create patches for them.

* Instead of listing each header file to be installed, just derive
  the list from the PLIST.

* Make the libtoolification a bit more transparent by patching libtool
  references directly into the imap makefiles.

* Drop the -limapuw -> -lc-client buildlink transform that was only
  needed for much older versions of the imap-uw package, and stop
  installing libimapuw.*.  All dependents of imap-uw already correctly
  use -lc-client.

* Fix the handling of the kerberos package option so that we can use
  the pkgsrc Kerberos 5 packages instead of only using the native
  ones.

* Properly document the options.mk file.

Bump the PKGREVISION for the libimapuw.* changes and for the
IMAP_UW_MAILSPOOLHOME fixes.  The rest of the changes are all
pkgsrc-related and don't really affect the binary package.

diffstat:

 mail/imap-uw/MESSAGE          |   21 +---
 mail/imap-uw/MESSAGE.ssl      |   23 ++++
 mail/imap-uw/Makefile         |  213 +++++++++++++++++------------------------
 mail/imap-uw/PLIST            |    6 +-
 mail/imap-uw/buildlink3.mk    |    7 +-
 mail/imap-uw/distinfo         |   23 ++-
 mail/imap-uw/hacks.mk         |   13 ++
 mail/imap-uw/options.mk       |   80 ++++++++++----
 mail/imap-uw/patches/patch-aa |   28 ++--
 mail/imap-uw/patches/patch-ab |   73 ++++++--------
 mail/imap-uw/patches/patch-ac |   15 ++-
 mail/imap-uw/patches/patch-ad |   15 ++-
 mail/imap-uw/patches/patch-ae |   15 ++-
 mail/imap-uw/patches/patch-af |   11 +-
 mail/imap-uw/patches/patch-aj |   34 ++----
 mail/imap-uw/patches/patch-al |   12 +-
 mail/imap-uw/patches/patch-am |   14 ++-
 mail/imap-uw/patches/patch-be |   22 ++++
 mail/imap-uw/patches/patch-bf |   26 +++++
 mail/imap-uw/patches/patch-bg |   22 ++++
 20 files changed, 382 insertions(+), 291 deletions(-)

diffs (truncated from 976 to 300 lines):

diff -r ecb12d86b6b9 -r b7be9dab98e5 mail/imap-uw/MESSAGE
--- a/mail/imap-uw/MESSAGE      Wed Jul 26 19:29:14 2006 +0000
+++ b/mail/imap-uw/MESSAGE      Wed Jul 26 20:00:27 2006 +0000
@@ -1,33 +1,18 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.3 2005/03/06 17:03:06 thorpej Exp $
+$NetBSD: MESSAGE,v 1.4 2006/07/26 20:00:27 jlam Exp $
 
 Add the following to /etc/services (if not already there):
 
  imap          143/tcp         # Internet Message Access Protocol
  imap          143/udp
- imaps         993/tcp         # imap4 protocol over TLS/SSL
- imaps         993/udp         # imap4 protocol over TLS/SSL
- pop3s         995/tcp         # pop3 protocol over TLS/SSL (was spop3)
- pop3s         995/udp         # pop3 protocol over TLS/SSL (was spop3)
 
 Add the following to /etc/inetd.conf:
 
  imap   stream  tcp     nowait  root    ${PREFIX}/libexec/imapd    imapd
- imaps  stream  tcp     nowait  root    ${PREFIX}/libexec/imapd    imapd
  pop2   stream  tcp     nowait  root    ${PREFIX}/libexec/ipop2d   ipop2d
  pop3   stream  tcp     nowait  root    ${PREFIX}/libexec/ipop3d   ipop3d
- pop3s  stream  tcp     nowait  root    ${PREFIX}/libexec/ipop3d   ipop3d
 
-In order to use SSL, you will need to configure a certificate and store it
-in the ${SSLCERTS} directory, using the imapd.pem name.  Place the key for
-the certificate in the ${SSLKEYS} directory, also using the imapd.pem name.
-If you want to use an existing certificate, say from Apache, just copy the
-certificate and key files to the appropriate locations.
-
-To put the changes into effect, make inetd reload its configuration:
-On NetBSD 1.5 or later:
-       /etc/rc.d/inetd reload
-on earlier NetBSD releases:
-       kill -HUP `cat /var/run/inetd.pid`
+You will need to make inetd reload its configuration for the changes to
+take effect.
 
 ===========================================================================
diff -r ecb12d86b6b9 -r b7be9dab98e5 mail/imap-uw/MESSAGE.ssl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/imap-uw/MESSAGE.ssl  Wed Jul 26 20:00:27 2006 +0000
@@ -0,0 +1,23 @@
+===========================================================================
+$NetBSD: MESSAGE.ssl,v 1.1 2006/07/26 20:00:27 jlam Exp $
+
+Add the following to /etc/services (if not already there):
+
+ imaps         993/tcp         # imap4 protocol over TLS/SSL
+ imaps         993/udp         # imap4 protocol over TLS/SSL
+ pop3s         995/tcp         # pop3 protocol over TLS/SSL (was spop3)
+ pop3s         995/udp         # pop3 protocol over TLS/SSL (was spop3)
+
+Add the following to /etc/inetd.conf:
+
+ imaps  stream  tcp     nowait  root    ${PREFIX}/libexec/imapd    imapd
+ pop3s  stream  tcp     nowait  root    ${PREFIX}/libexec/ipop3d   ipop3d
+
+The imapd daemon looks for the following files to use SSL:
+
+    ${SSLCERTS}/imapd.pem (certificate)
+    ${SSLKEYS}/imapd.pem (private key)
+
+and similarly for the ipopd daemon.
+
+===========================================================================
diff -r ecb12d86b6b9 -r b7be9dab98e5 mail/imap-uw/Makefile
--- a/mail/imap-uw/Makefile     Wed Jul 26 19:29:14 2006 +0000
+++ b/mail/imap-uw/Makefile     Wed Jul 26 20:00:27 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.110 2006/03/04 21:30:00 jlam Exp $
+# $NetBSD: Makefile,v 1.111 2006/07/26 20:00:27 jlam Exp $
 #
 # ATTENTION:
 # The Kerberos support in this software is known to be problematic. If you
@@ -7,6 +7,7 @@
 
 DISTNAME=       imap-2004g
 PKGNAME=        ${DISTNAME:S/-/-uw-/}
+PKGREVISION=   1
 CATEGORIES=     mail
 MASTER_SITES=  ftp://ftp.cac.washington.edu/imap/
 EXTRACT_SUFX=  .tar.Z
@@ -15,162 +16,122 @@
 HOMEPAGE=      http://www.washington.edu/imap/
 COMMENT=       University of Washington's IMAP, POP2, and POP3 servers
 
-USE_LIBTOOL=   yes
-
-INST_PROG=     ${LIBTOOL} --mode=install ${INSTALL_PROGRAM}
-INST_LIB=      ${LIBTOOL} --mode=install ${INSTALL_LIB}
-INC_DIR=       ${PREFIX}/include/c-client
-LIB_DIR=       ${PREFIX}/lib
-DOC_DIR=       ${PREFIX}/share/doc/imap-uw
+USE_LIBTOOL=           yes
+MAKE_ENV+=             LIBTOOL=libtool
+MAKE_ENV+=             LTCOMPILE="libtool --mode=compile"
+MAKE_ENV+=             LTLINK="libtool --mode=link"
+LTINSTALL_PROGRAM=     ${LIBTOOL} --mode=install ${INSTALL_PROGRAM}
+LTINSTALL_LIB=         ${LIBTOOL} --mode=install ${INSTALL_LIB}
 
 .include "../../mk/bsd.prefs.mk"
 
-.if ${OPSYS} == "SunOS"
-BUILD_TARGET=  gso
-.elif ${OPSYS} == "Linux"
-BUILD_TARGET=  slx
-.elif ${OPSYS} == "Darwin"
-BUILD_TARGET=  osx
-.elif ${OPSYS} == "IRIX"
+# Each platform has its own special target in the imap Makefiles.
+OPSYSVARS+=            BUILD_TARGET
+BUILD_TARGET.SunOS=    gso
+BUILD_TARGET.Linux=    slx
+BUILD_TARGET.Darwin=   osx
+.if ${OPSYS} == "IRIX"
 .  if ${OS_VERSION} >= 6.5
-BUILD_TARGET=  sg6
+BUILD_TARGET.IRIX=     sg6
 .  else
-BUILD_TARGET=  sgi
+BUILD_TARGET.IRIX=     sgi
 .  endif
-.elif ${OPSYS} == "OSF1"
-BUILD_TARGET=  osf
-.elif ${OPSYS} == "OpenBSD"
-BUILD_TARGET=   bso
-.else
-BUILD_TARGET=  neb
 .endif
+BUILD_TARGET.OSF1=     osf
+BUILD_TARGET.OpenBSD=  bso
+BUILD_TARGET.*=                neb
+
+MESSAGE_SRC=           ${PKGDIR}/MESSAGE
 
 .include "options.mk"
 
-BUILD_DEFS+=   IMAP_UW_CCLIENT_MBOX_FMT IMAP_UW_MAILSPOOLHOME
-CCLIENT_INCS=  c-client.h env.h env_unix.h flocksim.h flstring.h       \
-               fs.h ftl.h imap4r1.h linkage.c linkage.h mail.h misc.h  \
-               netmsg.h newsrc.h nl.h nntp.h osdep.h rfc822.h          \
-               smtp.h tcp.h utf8.h
-CCLIENT_LIB=   libc-client.la
-CCLIENT_PICLIB=        libc-client_pic.a
-CCLIENT_MAJOR= 4
-CCLIENT_MINOR= 3
-CCLIENT_MFILES=        src/imapd/Makefile                                      \
-               src/ipopd/Makefile                                      \
-               src/mtest/Makefile                                      \
-               src/osdep/unix/Makefile
+# The defaults for these values are set in pkgsrc/mk/defaults/mk.conf.
+#IMAP_US_CCLIENT_MBOX_FMT?=    unix
+#IMAP_US_MAILSPOOLHOME?=       .Mailbox
+BUILD_DEFS+=                   IMAP_UW_CCLIENT_MBOX_FMT IMAP_UW_MAILSPOOLHOME
 
-MESSAGE_SUBST+=        SSLCERTS=${SSLCERTS:Q}
-MESSAGE_SUBST+=        SSLKEYS=${SSLKEYS:Q}
-PLIST_SUBST+=  CCLIENT_MAJOR=${CCLIENT_MAJOR:Q}
-PLIST_SUBST+=  CCLIENT_MINOR=${CCLIENT_MINOR:Q}
+CCLIENT_LIB=           libc-client.la
+CCLIENT_PICLIB=                libc-client_pic.a
+CCLIENT_MAJOR=         4
+CCLIENT_MINOR=         3
+MAKE_ENV+=             CCLIENT_MAJOR=${CCLIENT_MAJOR:Q}
+MAKE_ENV+=             CCLIENT_MINOR=${CCLIENT_MINOR:Q}
+
+EXTRASPECIALS+=                CREATEPROTO=${IMAP_UW_CCLIENT_MBOX_FMT:Q}proto
 
-MANFILES=      src/imapd/imapd.8 src/ipopd/ipopd.8
-
-MAKE_ENV+=     SSLDIR=${SSLBASE:Q}
-MAKE_ENV+=     SSLCERTS=${SSLCERTS:Q}
-MAKE_ENV+=     SSLKEYS=${SSLKEYS:Q}
-MAKE_ENV+=     CCLIENT_MAJOR=${CCLIENT_MAJOR:Q}
-MAKE_ENV+=     CCLIENT_MINOR=${CCLIENT_MINOR:Q}
-MAKE_ENV+=     CREATEPROTO=${IMAP_UW_CCLIENT_MBOX_FMT:Q}proto
+MAKE_FLAGS+=           EXTRALDFLAGS=${LDFLAGS:Q}
+MAKE_FLAGS+=           EXTRACFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+=           EXTRASPECIALS=${EXTRASPECIALS:Q}
 
-BUILD_TARGET+= CC="${LIBTOOL} ${CC}"
-BUILD_TARGET+= EXTRALDFLAGS="${LDFLAGS}"
-BUILD_TARGET+= EXTRACFLAGS="${CFLAGS}"
-
-# reduce optimization level on alpha to avoid compiler bugs
-.if ${OPSYS} == "NetBSD"
-.  if ${MACHINE_ARCH} == "alpha"
-CPPFLAGS:=      ${CPPFLAGS:C/-O[0-9]*/-O/g}
-CFLAGS:=        ${CFLAGS:C/-O[0-9]*/-O/g}
-CONFIGURE_ENV+= CPPFLAGS=${CPPFLAGS:M*:Q}
-CONFIGURE_ENV+= CFLAGS=${CFLAGS:M*:Q}
-.  endif
+SUBST_CLASSES+=                mbox
+SUBST_STAGE.mbox=      do-configure
+SUBST_FILES.mbox=      src/osdep/unix/env_unix.c
+.if defined(IMAP_USE_MAILSPOOLHOME)
+SUBST_SED.mbox=                -e 's|@SPOOLDIR@|myhomedir ()|'                 \
+                       -e 's|@MAILBOX@|"${IMAP_UW_MAILSPOOLHOME}"|'
+.else
+SUBST_SED.mbox=                -e 's|@SPOOLDIR@|MAILSPOOL|'                    \
+                       -e 's|@MAILBOX@|myusername ()|'
 .endif
 
-INSTALLATION_DIRS+=    bin libexec sbin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8
-
-post-extract:
-       #
-       # Change references to the built library to ${CCLIENT_LIB}.
-       #
-       cd ${WRKSRC}; for file in ${CCLIENT_MFILES}; do                 \
-               ${MV} -f $${file} $${file}.orig;                        \
-               ${SED}  -e "s|c-client.a|${CCLIENT_LIB}|g"              \
-                       $${file}.orig > $${file};                       \
-               ${RM} -f $${file}.orig;                                 \
-       done
-       #
-       # Correct hardcoded paths in man pages.
-       #
-       cd ${WRKSRC}; for FILE in ${MANFILES}; do                       \
-               ${CP} $${FILE} $${FILE}.broken;                         \
-               ${SED}  -e "s|/usr/etc/imapd|${PREFIX}/libexec/imapd|g" \
+SUBST_CLASSES+=                man
+SUBST_STAGE.man=       post-build
+SUBST_FILES.man=       src/imapd/imapd.8 src/ipopd/ipopd.8
+SUBST_SED.man=         -e "s|/usr/etc/imapd|${PREFIX}/libexec/imapd|g" \
                        -e "s|/etc/rimapd|${PREFIX}/sbin/rimapd|g"      \
                        -e "s|/usr/etc/ipop2d|${PREFIX}/libexec/ipop2d|g" \
-                       -e "s|/usr/etc/ipop3d|${PREFIX}/libexec/ipop3d|g" \
-                       $${FILE}.broken > $${FILE};                     \
-       done
+                       -e "s|/usr/etc/ipop3d|${PREFIX}/libexec/ipop3d|g"
 
-post-patch:
-.if defined(IMAP_UW_MAILSPOOLHOME)
-       cd ${WRKSRC}/src/osdep/unix &&                                  \
-       ${SED}  -e 's|@SPOOLDIR@|myhomedir ()|'                         \
-               -e 's|@MAILBOX@|"${IMAP_UW_MAILSPOOLHOME}"|'            \
-               env_unix.c > env_unix.c.new &&                          \
-       ${MV} -f env_unix.c.new env_unix.c
-.else
-       cd ${WRKSRC}/src/osdep/unix &&                                  \
-       ${SED}  -e 's|@SPOOLDIR@|MAILSPOOL|'                            \
-               -e 's|@MAILBOX@|myusername ()|'                         \
-               env_unix.c > env_unix.c.new &&                          \
-       ${MV} -f env_unix.c.new env_unix.c
-.endif
+INSTALLATION_DIRS+=    bin lib libexec sbin                            \
+                       ${PKGMANDIR}/man1 ${PKGMANDIR}/man8
 
 # Generate _pic.a library from shared objects.
-#
 post-build:
        cd ${WRKSRC}/c-client;                                          \
        ${LIBTOOL} --mode=link ${CC} -o ${CCLIENT_PICLIB:.a=.la} *.lo
 
-do-install:
-       ${INSTALL_DATA_DIR} ${INC_DIR}
-       cd ${WRKSRC}/c-client; ${INSTALL_DATA} ${CCLIENT_INCS} ${INC_DIR}
-       ${INSTALL_LIB_DIR} ${LIB_DIR}
-       ${INST_LIB} ${WRKSRC}/c-client/${CCLIENT_LIB} ${LIB_DIR}
-       ${INSTALL_LIB} ${WRKSRC}/c-client/.libs/${CCLIENT_PICLIB} ${LIB_DIR}
-       ${RANLIB} ${LIB_DIR}/${CCLIENT_PICLIB}
-       cd ${LIB_DIR}; for file in libc-client.*; do                    \
-               case $$file in                                          \
-               *.la)   ;;                                              \
-               *)                                                      \
-                       f=`${ECHO} $${file} | ${SED} "s|libc-client|libimapuw|g"`; \
-                       ${TEST} -f $${file} && ${LN} -f $${file} $${f}; \
-                       ;;                                              \
-               esac;                                                   \
-       done
-       ${INST_PROG} ${WRKSRC}/imapd/imapd ${PREFIX}/libexec
-       ${INST_PROG} ${WRKSRC}/ipopd/ipop2d ${PREFIX}/libexec
-       ${INST_PROG} ${WRKSRC}/ipopd/ipop3d ${PREFIX}/libexec
-       ${INST_PROG} ${WRKSRC}/mtest/mtest ${PREFIX}/sbin
+do-install: install-headers install-lib install-doc
+       ${LTINSTALL_PROGRAM} ${WRKSRC}/imapd/imapd ${PREFIX}/libexec
+       ${LTINSTALL_PROGRAM} ${WRKSRC}/ipopd/ipop2d ${PREFIX}/libexec
+       ${LTINSTALL_PROGRAM} ${WRKSRC}/ipopd/ipop3d ${PREFIX}/libexec
+       ${LTINSTALL_PROGRAM} ${WRKSRC}/mtest/mtest ${PREFIX}/sbin
        ${LN} -sf ../libexec/imapd ${PREFIX}/sbin/rimapd
        ${INSTALL_MAN} ${WRKSRC}/src/imapd/imapd.8 ${PREFIX}/${PKGMANDIR}/man8
        ${INSTALL_MAN} ${WRKSRC}/src/ipopd/ipopd.8 ${PREFIX}/${PKGMANDIR}/man8
        ${LN} -sf ipopd.8 ${PREFIX}/${PKGMANDIR}/man8/ipop2d.8
        ${LN} -sf ipopd.8 ${PREFIX}/${PKGMANDIR}/man8/ipop3d.8
-       ${INSTALL_DATA_DIR} ${DOC_DIR}
-       ${CP} -R ${WRKSRC}/docs/* ${DOC_DIR}
-       ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOC_DIR}
-       ${FIND} ${DOC_DIR} -type d -print | ${XARGS} ${CHMOD} ${PKGDIRMODE}
-       ${FIND} ${DOC_DIR} -type f -print | ${XARGS} ${CHMOD} ${SHAREMODE}
-
-       ${INST_PROG} ${WRKSRC}/mailutil/mailutil ${PREFIX}/bin
+       ${LTINSTALL_PROGRAM} ${WRKSRC}/mailutil/mailutil ${PREFIX}/bin
        ${INSTALL_MAN} ${WRKSRC}/src/mailutil/mailutil.1 ${PREFIX}/${PKGMANDIR}/man1
-       ${INST_PROG} ${WRKSRC}/dmail/dmail ${PREFIX}/bin
+       ${LTINSTALL_PROGRAM} ${WRKSRC}/dmail/dmail ${PREFIX}/bin
        ${INSTALL_MAN} ${WRKSRC}/src/dmail/dmail.1 ${PREFIX}/${PKGMANDIR}/man1
-       ${INST_PROG} ${WRKSRC}/mlock/mlock ${PREFIX}/bin



Home | Main Index | Thread Index | Old Index