summaryrefslogtreecommitdiff
path: root/mail/ssmtp/Makefile
blob: 0703c6ad243317bcf41fb8582e26dda696086dc7 (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
# $NetBSD: Makefile,v 1.32 2016/03/09 03:24:19 tnn Exp $
#
# TLS functionality needs testing. Please let me know the result,
# and preferably info about your system.
#
# Toru TAKAMIZU

DISTNAME=	ssmtp_2.64.orig
EXTRACT_SUFX=	.tar.bz2
PKGNAME=	ssmtp-2.64
PKGREVISION=	3
CATEGORIES=	mail
MASTER_SITES=	${MASTER_SITE_DEBIAN:=pool/main/s/ssmtp/}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://packages.debian.org/stable/mail/ssmtp
COMMENT=	Extremely simple MTA to forward mail to a mail hub
LICENSE=	gnu-gpl-v2

WRKSRC=			${WRKDIR}/${PKGNAME_NOREV:S/.orig$//}
USE_TOOLS+=		gmake
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFBASE:Q}

.include "options.mk"

PKG_SYSCONFSUBDIR=	${PKGBASE}
EGDIR=			${PREFIX}/share/examples/${PKGBASE}
CONF_FILES=	${EGDIR}/ssmtp.conf ${PKG_SYSCONFDIR}/ssmtp.conf
CONF_FILES+=	${EGDIR}/revaliases ${PKG_SYSCONFDIR}/revaliases

MAKE_DIRS+=		${PKG_SYSCONFDIR}

SUBST_CLASSES+=		paths
SUBST_FILES.paths=	${WRKDIR}/mailer.conf ssmtp.c ssmtp.conf ssmtp.8
SUBST_SED.paths+=	-e 's,@PREFIX@,${PREFIX},g'
SUBST_SED.paths+=	-e 's,/etc/ssl/certs,${PKG_SYSCONFDIR},g'
SUBST_SED.paths+=	-e 's,/etc/ssmtp,${PKG_SYSCONFDIR},g'
SUBST_STAGE.paths=	pre-configure

INSTALLATION_DIRS+=	${EGDIR}

MAKE_FLAGS+=		prefix=${DESTDIR}${PREFIX}
MAKE_FLAGS+=		mandir=${DESTDIR}${PREFIX}/${PKGMANDIR}/man8

post-extract:
	@${RM} -rf ${WRKSRC}/RCS
	${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf

post-install:
	${INSTALL_DATA} ${WRKSRC}/ssmtp.conf ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/revaliases ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKDIR}/mailer.conf ${DESTDIR}${EGDIR}

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