pkgsrc/mail/ssmtp/Makefile
tron 0e6c5293e8 Add support for user destination directory installation.
Patch provided by Aleksey Cheusov in PR pkg/38526.
2008-11-16 13:54:12 +00:00

54 lines
1.6 KiB
Makefile

# $NetBSD: Makefile,v 1.21 2008/11/16 13:54:12 tron Exp $
#
# TLS functionality needs testing. Please let me know the result,
# and preferably info about your system.
#
# pkg@pop.707.to
# Toru TAKAMIZU
DISTNAME= ssmtp_2.61.orig
PKGNAME= ssmtp-2.61
PKGREVISION= 2
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/s/ssmtp/}
MAINTAINER= pkg@pop.707.to
HOMEPAGE= http://packages.debian.org/testing/mail/ssmtp.html
COMMENT= Extremely simple MTA to forward mail to a mail hub
PKG_DESTDIR_SUPPORT= user-destdir
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
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= post-patch
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"