1 |
# New ports collection makefile for: alpine |
2 |
# Date created: December 21, 2007 |
3 |
# Whom: Lucas Holt <luke@midnightbsd.org> |
4 |
# |
5 |
# $MidnightBSD: mports/mail/alpine/Makefile,v 1.7 2009/06/22 18:04:15 laffer1 Exp $ |
6 |
# |
7 |
|
8 |
PORTNAME?= alpine |
9 |
PORTVERSION= 2.00 |
10 |
PORTREVISION?= 1 |
11 |
CATEGORIES?= mail news ipv6 |
12 |
MASTER_SITES= ftp://ftp.cac.washington.edu/alpine/ \ |
13 |
http://dougbarton.us/Downloads/alpine-${PORTVERSION}/ |
14 |
DIST_SUBDIR= alpine-${PORTVERSION} |
15 |
|
16 |
MAINTAINER= ports@MidnightBSD.org |
17 |
COMMENT= Mail and news client descended from Pine |
18 |
LICENSE= apache2 |
19 |
|
20 |
OPTIONS+= THREADS "Compile with thread support" on \ |
21 |
MOUSE "Enable mouse support for xterm" on \ |
22 |
NLS "National Language Support" off \ |
23 |
ISPELL "Use ispell instead of aspell as default speller" off \ |
24 |
NOSPELL "Use no default speller (overrides both)" off |
25 |
.if !defined(PICO_ALPINE_SLAVE) |
26 |
OPTIONS+= PICO "Build and install pico, the default editor" on \ |
27 |
IPV6 "Add support for IPv6" on \ |
28 |
LDAP "Add support for LDAP" off \ |
29 |
PASSFILE "Support for a stored password file (DANGEROUS)" off \ |
30 |
CONS25 "Add a patch to support color for default console" off \ |
31 |
QUOTA "Add a patch for disk quota checking on IMAP" off \ |
32 |
MAILDIR "Add a patch for maildir support" off |
33 |
.endif |
34 |
|
35 |
USE_BZIP2= yes |
36 |
|
37 |
MAKE_JOBS_UNSAFE= yes |
38 |
|
39 |
GNU_CONFIGURE= yes |
40 |
|
41 |
.if !defined(PICO_ALPINE_SLAVE) |
42 |
CONFIGURE_ARGS+=--with-system-pinerc=${PREFIX}/etc/alpine.conf \ |
43 |
--with-system-fixed-pinerc=${PREFIX}/etc/alpine.conf.fixed \ |
44 |
--with-password-prog=/usr/bin/passwd \ |
45 |
--with-system-mail-directory=/var/mail \ |
46 |
--enable-background-post --without-krb5 --without-tcl |
47 |
.endif |
48 |
CONFIGURE_ARGS+=--with-debug-level=2 |
49 |
|
50 |
USE_OPENSSL= yes |
51 |
|
52 |
.include <bsd.port.pre.mk> |
53 |
|
54 |
.if !defined(WITHOUT_THREADS) |
55 |
CONFIGURE_ARGS+= --with-pthread |
56 |
.else |
57 |
CONFIGURE_ARGS+= --without-pthread |
58 |
.endif |
59 |
|
60 |
.if !defined(WITHOUT_MOUSE) |
61 |
CONFIGURE_ARGS+= --enable-mouse |
62 |
.else |
63 |
CONFIGURE_ARGS+= --disable-mouse |
64 |
.endif |
65 |
|
66 |
.if defined(WITH_NLS) |
67 |
CONFIGURE_ARGS+= --enable-nls |
68 |
.else |
69 |
CONFIGURE_ARGS+= --disable-nls |
70 |
.endif |
71 |
|
72 |
.if !defined(WITH_NOSPELL) |
73 |
.if !defined(WITH_ISPELL) |
74 |
CONFIGURE_ARGS+=--with-interactive-spellcheck=${LOCALBASE}/bin/aspell |
75 |
BUILD_DEPENDS+= aspell:${PORTSDIR}/textproc/aspell |
76 |
RUN_DEPENDS+= aspell:${PORTSDIR}/textproc/aspell |
77 |
.else |
78 |
CONFIGURE_ARGS+= --with-interactive-spellcheck=${LOCALBASE}/bin/ispell |
79 |
BUILD_DEPENDS+= ispell:${PORTSDIR}/textproc/ispell |
80 |
RUN_DEPENDS+= ispell:${PORTSDIR}/textproc/ispell |
81 |
.endif |
82 |
.else |
83 |
CONFIGURE_ARGS+=--without-simple-spellcheck --without-interactive-spellcheck |
84 |
.endif |
85 |
|
86 |
.if !defined(PICO_ALPINE_SLAVE) |
87 |
.if !defined(WITHOUT_PICO) |
88 |
RUN_DEPENDS+= pico:${PORTSDIR}/editors/pico-alpine |
89 |
.endif |
90 |
|
91 |
.if !defined(WITHOUT_IPV6) |
92 |
CONFIGURE_ARGS+= --with-ipv6 |
93 |
.else |
94 |
CONFIGURE_ARGS+= --without-ipv6 |
95 |
.endif |
96 |
|
97 |
.if defined(WITH_LDAP) |
98 |
USE_OPENLDAP= yes |
99 |
CONFIGURE_ARGS+= --with-ldap --with-ldap-dir=${LOCALBASE} |
100 |
.else |
101 |
CONFIGURE_ARGS+= --without-ldap |
102 |
.endif |
103 |
|
104 |
.if defined(WITH_PASSFILE) |
105 |
ALPINE_PASSFILE?= .alpine.pwd |
106 |
CONFIGURE_ARGS+= --with-passfile=.alpine.pwd |
107 |
.endif |
108 |
|
109 |
.if defined(WITH_CONS25) |
110 |
EXTRA_PATCHES= ${FILESDIR}/cons25-alpine_keymenu.c |
111 |
.endif |
112 |
|
113 |
.if defined(WITH_QUOTA) || defined(WITH_MAILDIR) |
114 |
PATCH_SITES= http://staff.washington.edu/chappa/alpine/patches/alpine-${PORTVERSION}/ \ |
115 |
http://dougbarton.us/Downloads/alpine-${PORTVERSION}/ \ |
116 |
${MASTER_SITE_FREEBSD_LOCAL} |
117 |
PATCH_SITE_SUBDIR= dougb/alpine-${PORTVERSION}/ |
118 |
PATCH_DIST_ARGS+= -E --quiet -d ${PATCH_WRKSRC} -p1 |
119 |
.endif |
120 |
|
121 |
.if defined(WITH_QUOTA) |
122 |
PATCHFILES+= quota.patch.gz |
123 |
.endif |
124 |
|
125 |
.if defined(WITH_MAILDIR) |
126 |
PATCHFILES+= maildir.patch.gz |
127 |
.endif |
128 |
|
129 |
.if !defined(WITHOUT_SSL) |
130 |
MAKE_ARGS+= SSLINCLUDE=${OPENSSLINC} SSLLIB=${OPENSSLLIB} |
131 |
CONFIGURE_ARGS+= --with-ssl-dir=${OPENSSLDIR} \ |
132 |
--with-ssl-certs-dir=${OPENSSLDIR}/certs |
133 |
.else |
134 |
CONFIGURE_ARGS+= --without-ssl |
135 |
.endif |
136 |
|
137 |
MAN1= alpine.1 rpdump.1 rpload.1 |
138 |
|
139 |
pre-patch: |
140 |
@${CHMOD} -R u+w ${WRKSRC} |
141 |
|
142 |
post-patch: |
143 |
@${CP} ${WRKSRC}/imap/Makefile ${WRKSRC}/imap/Makefile.presed |
144 |
@${SED} -e "s#^\(all:.*\) bundled\$$#\1#" \ |
145 |
${WRKSRC}/imap/Makefile.presed > ${WRKSRC}/imap/Makefile |
146 |
@${CP} ${WRKSRC}/pico/Makefile.in ${WRKSRC}/pico/Makefile.in.presed |
147 |
@${SED} -e "s#^bin_PROGRAMS = pico.*#bin_PROGRAMS =#" \ |
148 |
-e "s#\$$(pico_SOURCES) \$$(pilot_SOURCES)##" \ |
149 |
${WRKSRC}/pico/Makefile.in.presed > ${WRKSRC}/pico/Makefile.in |
150 |
@${CP} ${WRKSRC}/Makefile.in ${WRKSRC}/Makefile.in.presed |
151 |
@${SED} -e "s#doc/pico.1 doc/pilot.1 ##" \ |
152 |
${WRKSRC}/Makefile.in.presed > ${WRKSRC}/Makefile.in |
153 |
@${CP} ${WRKSRC}/imap/src/osdep/unix/Makefile \ |
154 |
${WRKSRC}/imap/src/osdep/unix/Makefile.presed |
155 |
@${SED} -e "s#^LOCKPGM=.*#LOCKPGM= ${PREFIX}/libexec/mlock#" \ |
156 |
${WRKSRC}/imap/src/osdep/unix/Makefile.presed \ |
157 |
> ${WRKSRC}/imap/src/osdep/unix/Makefile |
158 |
@for i in ${WRKSRC}/README ${WRKSRC}/doc/alpine.1 \ |
159 |
${WRKSRC}/doc/tech-notes.txt ${WRKSRC}/doc/tech-notes/*.html \ |
160 |
${WRKSRC}/pith/pine.hlp ; do \ |
161 |
${CP} $$i $$i.presed ; \ |
162 |
${SED} -e "s:/usr/local/etc/:${PREFIX}/etc/:g" \ |
163 |
-e "s:/usr/local/lib/:${PREFIX}/etc/:g" \ |
164 |
-e "s:@@PREFIX@@:${PREFIX}:g" \ |
165 |
-e "s:/usr/local/pine.conf:${PREFIX}/etc/alpine.conf:g" \ |
166 |
$$i.presed > $$i ; \ |
167 |
done |
168 |
|
169 |
post-install: |
170 |
.if !defined(NOPORTDOCS) |
171 |
${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} ${DOCSDIR} \ |
172 |
${DOCSDIR}/tech-notes |
173 |
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR} |
174 |
${INSTALL_DATA} ${WRKSRC}/NOTICE ${DOCSDIR} |
175 |
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} |
176 |
${INSTALL_DATA} ${WRKSRC}/doc/brochure.txt ${DOCSDIR} |
177 |
${INSTALL_DATA} ${WRKSRC}/doc/tech-notes.txt ${DOCSDIR} |
178 |
${INSTALL_DATA} ${WRKSRC}/doc/tech-notes/*.html ${DOCSDIR}/tech-notes |
179 |
.endif |
180 |
${PREFIX}/bin/alpine -P ${PREFIX}/etc/alpine.conf -conf >${WRKSRC}/alpine.conf |
181 |
${INSTALL_DATA} ${WRKSRC}/alpine.conf ${PREFIX}/etc/alpine.conf |
182 |
|
183 |
.endif # !defined(PICO_ALPINE_SLAVE) |
184 |
|
185 |
.include <bsd.port.post.mk> |