summaryrefslogtreecommitdiff
path: root/mail/mutt-devel/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mutt-devel/Makefile')
-rw-r--r--mail/mutt-devel/Makefile93
1 files changed, 93 insertions, 0 deletions
diff --git a/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile
new file mode 100644
index 00000000000..e560e5fbee7
--- /dev/null
+++ b/mail/mutt-devel/Makefile
@@ -0,0 +1,93 @@
+# $NetBSD: Makefile,v 1.26 2004/07/21 22:37:10 jlam Exp $
+
+DISTNAME= mutt-1.5.6i
+PKGNAME= ${DISTNAME:C/i$//}
+CATEGORIES= mail
+MUTT_SITES= ftp://ftp.mutt.org/mutt/ \
+ ftp://ftp.stealth.net/pub/mirrors/ftp.mutt.org/pub/mutt/ \
+ ftp://gd.tuwien.ac.at/infosys/mail/mutt/ \
+ ftp://ftp.fu-berlin.de/unix/mail/mutt/
+MASTER_SITES= ${MUTT_SITES:=devel/}
+
+MAINTAINER= jlam@NetBSD.org
+HOMEPAGE= http://www.mutt.org/
+COMMENT= Text-based MIME mail client with PGP & S/MIME support
+
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
+.include "../../mk/bsd.prefs.mk"
+
+WRKSRC= ${WRKDIR}/${DISTNAME:C/i$$//}
+BUILD_DEFS+= MUTT_OPTIONS
+BUILD_USES_MSGFMT= yes
+USE_BUILDLINK3= yes
+USE_PKGLOCALEDIR= yes
+USE_PERL5= yes
+REPLACE_PERL= smime_keys */*.pl
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} \
+ --with-docdir=${PREFIX}/share/doc/mutt \
+ --without-included-gettext \
+ --enable-pop \
+ --enable-imap
+
+.if (${OPSYS} == "SunOS")
+CONFIGURE_ARGS+= --without-wc-funcs
+.endif
+
+# There is a problem using /bin/sh on old NetBSD releases, so use /bin/ksh
+# there.
+#
+.if !empty(MACHINE_PLATFORM:MNetBSD-1.[0-5]*-*)
+CONFIGURE_ARGS+= --with-exec-shell=/bin/ksh
+.endif
+
+.include "Makefile.options"
+
+LDFLAGS+= ${_STRIPFLAG_CC}
+
+USE_PKGINSTALL= yes
+DEINSTALL_EXTRA_TMPL= ${.CURDIR}/INSTALL
+INSTALL_EXTRA_TMPL= ${.CURDIR}/INSTALL
+DOCDIR= ${PREFIX}/share/doc/mutt
+EGDIR= ${PREFIX}/share/examples/mutt
+CONF_FILES= ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
+SUPPORT_FILES= ${EGDIR}/mime.types ${PKG_SYSCONFDIR}/mime.types
+FILES_SUBST+= DOCDIR=${DOCDIR}
+
+.if exists(${WRKSRC}/mutt_dotlock)
+PLIST_SUBST+= MUTT_DOTLOCK=
+.else
+PLIST_SUBST+= MUTT_DOTLOCK="@comment "
+.endif
+INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} sysconfdir=${EGDIR}
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+
+# Fix some absolute paths in installed files.
+post-build:
+ for file in ${WRKSRC}/contrib/gpg.rc; do \
+ ${MV} -f $$file $$file.save; \
+ ${SED} -e "s,/usr/bin/gpg,gpg,g" \
+ $$file.save > $$file; \
+ done
+ for file in ${WRKSRC}/doc/mutt.man; do \
+ ${MV} -f $$file $$file.save; \
+ ${SED} -e "s,/etc/,${PKG_SYSCONFDIR}/,g" \
+ -e "s,/usr/local/doc/mutt/,${DOCDIR}/,g" \
+ -e "s,/usr/local/,${PREFIX}/,g" \
+ $$file.save > $$file; \
+ done
+
+# Pre-create some directories and symlinks used during the installation
+# process.
+#
+pre-install:
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_DATA_DIR} ${DOCDIR}
+ ${RM} -f ${DOCDIR}/samples
+ ${LN} -sf ${EGDIR} ${DOCDIR}/samples
+
+.include "../../mk/bsd.pkg.mk"