summaryrefslogtreecommitdiff
path: root/mail/metamail/Makefile
blob: e5b2a595a3780910a0b269d575b4b3d4891a945b (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
# $NetBSD: Makefile,v 1.45 2008/05/10 11:52:14 obache Exp $

DISTNAME=	mm2.7
PKGNAME=	metamail-2.7
PKGREVISION=	9
CATEGORIES=	mail
MASTER_SITES=	http://ftp.funet.fi/pub/unix/mail/metamail/	\
		ftp://ftp.research.telcordia.com/pub/nsb/
EXTRACT_SUFX=	.tar.Z

MAINTAINER=	pkgsrc-users@NetBSD.org
COMMENT=	Implementation of MIME, the Multipurpose Internet Mail Extensions

CONFLICTS+=	elm>=2.5.5 mm-2.7

PKG_INSTALLATION_TYPES=	overwrite pkgviews
PKG_DESTDIR_SUPPORT=	user-destdir

WRKSRC=			${WRKDIR}/${DISTNAME}/src

CFLAGS.Linux+=	-DLINUX
CFLAGS.SunOS+=	-DSYSV
MAKE_ENV+=	PKG_SYSCONFDIR=${PKG_SYSCONFDIR} CHMOD=${CHMOD:Q} SED=${SED:Q}

EGDIR=		${PREFIX}/share/examples/metamail
CONF_FILES=	${EGDIR}/mailcap ${PKG_SYSCONFDIR}/mailcap
USE_TOOLS+=	bdftopcf csh:run

REPLACE_INTERPRETER+=	csh
REPLACE.csh.old=	/bin/csh
REPLACE.csh.new=	${CSH}
REPLACE_FILES.csh=	bin/audiocompose bin/audiosend bin/extcompose
REPLACE_FILES.csh+=	bin/getfilename bin/mailserver bin/mailto-hebrew
REPLACE_FILES.csh+=	bin/metasend bin/patch-metamail bin/showaudio
REPLACE_FILES.csh+=	bin/showexternal bin/shownonascii bin/showpartial
REPLACE_FILES.csh+=	bin/showpicture bin/sun-audio-file bin/sun-message.csh
REPLACE_FILES.csh+=	bin/sun-to-mime
REPLACE_FILES.csh+=	fonts/Xmailto-hebrew fonts/Xshownonascii

INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man4 ${EGDIR}

SUBST_CLASSES+=		awk sys
SUBST_STAGE.awk=	post-patch
SUBST_MESSAGE.awk=	Adjusting the path to awk
SUBST_FILES.awk=	bin/sun2mime
SUBST_SED.awk=		-e "s|/bin/nawk|${AWK}|"
SUBST_STAGE.sys=	post-patch
SUBST_MESSAGE.sys=	Adjusting the path for PKG_SYSCONFDIR.
SUBST_FILES.sys=	config.h
SUBST_SED.sys=		-e "s|PKG_SYSCONFDIR|\"${PKG_SYSCONFDIR}\"|g"

post-patch:
	${RM} -f ${WRKDIR}/mm2.7/src/bin/*.orig

pre-configure:
	set -e;								\
	if ${GREP} putenv /usr/include/stdlib.h >/dev/null;		\
	then								\
		cd ${WRKSRC}/metamail;					\
		${MV} Makefile Makefile.pre-sed;			\
		${SED} -e s/putenv.o//g Makefile.pre-sed >Makefile;	\
	fi

.include "../../mk/bsd.pkg.mk"