25e4103cb1
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.
137 lines
4.6 KiB
Makefile
137 lines
4.6 KiB
Makefile
# $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
|
|
# upgrade this package you *must* test it on a system with Kerberos libraries
|
|
# but not running Kerberos before committing the changes.
|
|
|
|
DISTNAME= imap-2004g
|
|
PKGNAME= ${DISTNAME:S/-/-uw-/}
|
|
PKGREVISION= 1
|
|
CATEGORIES= mail
|
|
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/
|
|
EXTRACT_SUFX= .tar.Z
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
|
HOMEPAGE= http://www.washington.edu/imap/
|
|
COMMENT= University of Washington's IMAP, POP2, and POP3 servers
|
|
|
|
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"
|
|
|
|
# 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.IRIX= sg6
|
|
. else
|
|
BUILD_TARGET.IRIX= sgi
|
|
. endif
|
|
.endif
|
|
BUILD_TARGET.OSF1= osf
|
|
BUILD_TARGET.OpenBSD= bso
|
|
BUILD_TARGET.*= neb
|
|
|
|
MESSAGE_SRC= ${PKGDIR}/MESSAGE
|
|
|
|
.include "options.mk"
|
|
|
|
# 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
|
|
|
|
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
|
|
|
|
MAKE_FLAGS+= EXTRALDFLAGS=${LDFLAGS:Q}
|
|
MAKE_FLAGS+= EXTRACFLAGS=${CFLAGS:Q}
|
|
MAKE_FLAGS+= EXTRASPECIALS=${EXTRASPECIALS:Q}
|
|
|
|
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
|
|
|
|
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"
|
|
|
|
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-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
|
|
${LTINSTALL_PROGRAM} ${WRKSRC}/mailutil/mailutil ${PREFIX}/bin
|
|
${INSTALL_MAN} ${WRKSRC}/src/mailutil/mailutil.1 ${PREFIX}/${PKGMANDIR}/man1
|
|
${LTINSTALL_PROGRAM} ${WRKSRC}/dmail/dmail ${PREFIX}/bin
|
|
${INSTALL_MAN} ${WRKSRC}/src/dmail/dmail.1 ${PREFIX}/${PKGMANDIR}/man1
|
|
${LTINSTALL_PROGRAM} ${WRKSRC}/mlock/mlock ${PREFIX}/bin
|
|
${LTINSTALL_PROGRAM} ${WRKSRC}/tmail/tmail ${PREFIX}/bin
|
|
${INSTALL_MAN} ${WRKSRC}/src/tmail/tmail.1 ${PREFIX}/${PKGMANDIR}/man1
|
|
|
|
.PHONY: install-headers install-lib install-doc
|
|
install-headers:
|
|
${INSTALL_DATA_DIR} ${PREFIX}/include/c-client
|
|
${CAT} ${PKGDIR}/PLIST | \
|
|
while read entry; do \
|
|
case "$$entry" in \
|
|
include/c-client/*) \
|
|
src="${WRKSRC}/c-client/`${BASENAME} $$entry`"; \
|
|
dest="${PREFIX}/$$entry"; \
|
|
${INSTALL_DATA} $$src $$dest; \
|
|
esac; \
|
|
done
|
|
|
|
install-lib:
|
|
${LTINSTALL_LIB} ${WRKSRC}/c-client/${CCLIENT_LIB} ${PREFIX}/lib
|
|
${INSTALL_LIB} ${WRKSRC}/c-client/.libs/${CCLIENT_PICLIB} ${PREFIX}/lib
|
|
${RANLIB} ${PREFIX}/lib/${CCLIENT_PICLIB}
|
|
|
|
DOCDIR= ${PREFIX}/share/doc/${PKGBASE}
|
|
install-doc:
|
|
${INSTALL_DATA_DIR} ${DOCDIR}
|
|
${CP} -R ${WRKSRC}/docs/* ${DOCDIR}
|
|
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCDIR}
|
|
${FIND} ${DOCDIR} -type d -print | ${XARGS} ${CHMOD} ${PKGDIRMODE}
|
|
${FIND} ${DOCDIR} -type f -print | ${XARGS} ${CHMOD} ${SHAREMODE}
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|