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