aboutsummaryrefslogtreecommitdiff
path: root/mail/elm+ME/Makefile
blob: 959800614be550939a874ba3474c8dd43c05d5f4 (plain) (blame)
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
# New ports collection makefile for:    elm ME+ (unofficial Elm)
# Date created:         26 June 1995
# Whom:                 ache
#
# $FreeBSD$
#

PORTNAME=	elm+ME
PORTVERSION=	2.4.88
PORTEPOCH=	1
CATEGORIES=	mail
DISTNAME=	${PORTNAME:S/+ME//}-${PORTVERSION:R}ME+${PORTVERSION:E}

# here are the main repositories.
MASTER_SITES=	ftp://ftp.ozone.fmi.fi/KEH/ \
		http://www.ozone.fmi.fi/KEH/

# the following repositories conform to the main repository.
MASTER_SITES+=	ftp://ftp.tu-darmstadt.de/pub/networking/mail/elm+ME/ \
		ftp://ftp.cs.tu-berlin.de/pub/net/mail/elm-me-plus/ \
		ftp://ftp.ntua.gr/pub/net/mail/elm-me/ \
		ftp://ftp.eos.hokudai.ac.jp/pub/network/mail/elm-2.4ME+/ \
		ftp://ftp.win.ne.jp/pub/network/mail/elm-2.4ME+/

# the following repositories maybe conform to the main repository.
MASTER_SITES+=	ftp://ftp.unina.it/pub/Unix/pkgs/network/mail/elm-me+/ \
		ftp://ftp.rge.com/pub/mail/elm/elm-2.4ME+/ \
		ftp://ftp.uni-trier.de/pub/unix/network/mail/elm-me+/

# fetch doesn't work w/ ftp.lip6.fr and ftp doesn't work w/ the http protocol.
# MASTER_SITES+=	ftp://ftp.lip6.fr/pub/unix/mail/elm-me/
# FETCH_CMD=	/usr/bin/ftp

MAINTAINER=	clefevre@citeweb.net

# not needed since config.sh is generated by scripts/pre-configure.
# BUILD_DEPENDS=	ispell:${PORTSDIR}/textproc/ispell
# BUILD_DEPENDS=	metamail:${PORTSDIR}/mail/metamail
# BUILD_DEPENDS=	pgp:${PORTSDIR}/security/pgp
# BUILD_DEPENDS=	gpg:${PORTSDIR}/security/gnupg

WRKSRC=		${WRKDIR}/${DISTNAME:S/-//:S/ME+/.ME+./}

#
# Global variables
#

HAS_CONFIGURE=	yes

CONFIGURE_SCRIPT=	Configure
SCRIPTS_ENV=		CFLAGS="${CFLAGS}" PREFIX="${PREFIX}"
CONFIGURE_ARGS=		-S -d -P${PREFIX}

MAN1=		answer.1 checkalias.1 elm.1 elmalias.1 elmcharset.1 \
		elmterminal.1 fastmail.1 frm.1 listalias.1 messages.1 \
		newalias.1 newmail.1 printmail.1 readmsg.1
MLINKS=		frm.1 nfrm.1	newmail.1 wnewmail.1

#
# Local variables
#

DESTLIBDIR=	${PREFIX}/lib/${PORTNAME:S/+ME//}
MIMETYPES=	elm.mimetypes

#
# Post-patch
#

# d_savegrpmboxid is currently broken using setgid(2) instead of setegid(2).
# will probably be fixed in the next release, for instance, fake a patch.
# the alternative would be to disable this option in pre-configure script.
post-patch:
	@${PERL} -pi.bsd -e 's,setgid,setegid,' ${WRKSRC}/lib/localmbx.c

#
# Post-configure
#

post-configure:
	@${PERL} -pi.bsd -e 's,/usr/local,${PREFIX},' ${WRKSRC}/nls/LANGS

#
# Post-install
#

post-install: install-nls install-mime-types \
	      remove-catman-files remove-catman-links

install-nls:
	@cd ${WRKSRC}/nls; ${MAKE} install

install-mime-types:
	@${INSTALL_DATA} \
		${FILESDIR}/${MIMETYPES} ${DESTLIBDIR}/${MIMETYPES}-dist
	@if [ ! -f ${DESTLIBDIR}/${MIMETYPES} ]; then \
		${INSTALL_DATA} ${FILESDIR}/${MIMETYPES} ${DESTLIBDIR}; \
	fi

remove-catman-files:
.for sect in 1
.for page in ${MAN${sect}}
	@${RM} -f ${MAN${sect}PREFIX}/man/cat${sect}/${page}
.endfor
.endfor

remove-catman-links:
.for sect in 1
.for page in ${MLINKS}
.if ${MAN${sect}:M${page}} == ""
	@${RM} -f ${MAN${sect}PREFIX}/man/cat${sect}/${page}
.endif
.endfor
.endfor

.include <bsd.port.mk>