blob: 710adda0483a6aeefa6a12a29eb748f5d3e8a77c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
# $NetBSD: Makefile,v 1.134 2011/01/30 01:33:44 markd 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.
#
# NOTE ALSO:
# The most common reason to install this package is as a prerequisite for pine.
# If you upgrade this package, you *must* test mail/pine with the new version.
DISTNAME= imap-2007e
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
PKG_DESTDIR_SUPPORT= user-destdir
USE_LIBTOOL= yes
MAKE_ENV+= LIBTOOL=libtool
MAKE_ENV+= LTCOMPILE="libtool --tag=CC --mode=compile"
MAKE_ENV+= LTLINK="libtool --tag=CC --mode=link"
LTINSTALL_PROGRAM= ${SETENV} ${MAKE_ENV} ${LIBTOOL} --tag=CC --mode=install ${INSTALL_PROGRAM}
LTINSTALL_LIB= ${SETENV} ${MAKE_ENV} ${LIBTOOL} --tag=CC --mode=install ${INSTALL_LIB}
WRKSRC= ${WRKDIR}/${DISTNAME:S/2$//}
MAKE_JOBS_SAFE= no
.include "../../mk/bsd.prefs.mk"
# Each platform has its own special target in the imap Makefiles.
OPSYSVARS+= BUILD_TARGET
.include "../../mk/compiler.mk"
. if empty(CC_VERSION:Mgcc-)
BUILD_TARGET.SunOS= soc
. else
BUILD_TARGET.SunOS= gso
. endif
.if ${OPSYS} == Linux && exists(/usr/include/security/pam_appl.h)
BUILD_TARGET.Linux= lnp
.else
BUILD_TARGET.Linux= slx
.endif
.if ${OPSYS} == Darwin
LDFLAGS+= -flat_namespace
. if exists(/usr/include/pam/pam_appl.h)
BUILD_TARGET.Darwin= oxp
. else
BUILD_TARGET.Darwin= osx
. endif
.endif
.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_UW_CCLIENT_MBOX_FMT?= unix
#IMAP_UW_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= 5
CCLIENT_MINOR= 0
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 ${DESTDIR}${PREFIX}/libexec
${LTINSTALL_PROGRAM} ${WRKSRC}/ipopd/ipop2d ${DESTDIR}${PREFIX}/libexec
${LTINSTALL_PROGRAM} ${WRKSRC}/ipopd/ipop3d ${DESTDIR}${PREFIX}/libexec
${LTINSTALL_PROGRAM} ${WRKSRC}/mtest/mtest ${DESTDIR}${PREFIX}/sbin
${LN} -sf ../libexec/imapd ${DESTDIR}${PREFIX}/sbin/rimapd
${INSTALL_MAN} ${WRKSRC}/src/imapd/imapd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
${INSTALL_MAN} ${WRKSRC}/src/ipopd/ipopd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
${LN} -sf ipopd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ipop2d.8
${LN} -sf ipopd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ipop3d.8
${LTINSTALL_PROGRAM} ${WRKSRC}/mailutil/mailutil ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/src/mailutil/mailutil.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${LTINSTALL_PROGRAM} ${WRKSRC}/dmail/dmail ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/src/dmail/dmail.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${LTINSTALL_PROGRAM} ${WRKSRC}/mlock/mlock ${DESTDIR}${PREFIX}/bin
${LTINSTALL_PROGRAM} ${WRKSRC}/tmail/tmail ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/src/tmail/tmail.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.PHONY: install-headers install-lib install-doc
install-headers:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/c-client
${CAT} ${PKGDIR}/PLIST | \
while read entry; do \
case "$$entry" in \
include/c-client/*) \
src="${WRKSRC}/c-client/`${BASENAME} $$entry`"; \
dest="${DESTDIR}${PREFIX}/$$entry"; \
${INSTALL_DATA} $$src $$dest; \
esac; \
done
install-lib:
${LTINSTALL_LIB} ${WRKSRC}/c-client/${CCLIENT_LIB} ${DESTDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKSRC}/c-client/.libs/${CCLIENT_PICLIB} ${DESTDIR}${PREFIX}/lib
${RANLIB} ${DESTDIR}${PREFIX}/lib/${CCLIENT_PICLIB}
DOCDIR= ${DESTDIR}${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 "../../devel/sysexits/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|