pkgsrc/security/smtpd/Makefile
jlam daad0f3d6c Modify the pkginstall framework so that it manages all aspects of
INSTALL/DEINSTALL script creation within pkgsrc.

If an INSTALL or DEINSTALL script is found in the package directory,
it is automatically used as a template for the pkginstall-generated
scripts.  If instead, they should be used simply as the full scripts,
then the package Makefile should set INSTALL_SRC or DEINSTALL_SRC
explicitly, e.g.:

	INSTALL_SRC=	${PKGDIR}/INSTALL
	DEINSTALL_SRC=	# emtpy

As part of the restructuring of the pkginstall framework internals,
we now *always* generate temporary INSTALL or DEINSTALL scripts.  By
comparing these temporary scripts with minimal INSTALL/DEINSTALL
scripts formed from only the base templates, we determine whether or
not the INSTALL/DEINSTALL scripts are actually needed by the package
(see the generate-install-scripts target in bsd.pkginstall.mk).

In addition, more variables in the framework have been made private.
The *_EXTRA_TMPL variables have been renamed to *_TEMPLATE, which are
more sensible names given the very few exported variables in this
framework.  The only public variables relating to the templates are:

	INSTALL_SRC		INSTALL_TEMPLATE
	DEINSTALL_SRC		DEINSTALL_TEMPLATE
				HEADER_TEMPLATE

The packages in pkgsrc have been modified to reflect the changes in
the pkginstall framework.
2006-03-14 01:14:26 +00:00

49 lines
1.6 KiB
Makefile

# $NetBSD: Makefile,v 1.17 2006/03/14 01:14:33 jlam Exp $
#
DISTNAME= smtpd-2.0
PKGREVISION= 2
CATEGORIES= mail security
MASTER_SITES= ftp://ftp.obtuse.com/pub/smtpd/
PATCHFILES= patch-smtpd-2.0-RBL.gz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.obtuse.com/smtpd.html
COMMENT= Store and forward SMTP proxy
SPOOL= /var/spool/smtpd
RCD_SCRIPTS= smtpfwdd
FILES_SUBST+= SPOOL=${SPOOL:Q}
# taken directly from the Makefile.
CFLAGS.NetBSD+= -DUSE_FLOCK -DUSE_MKSTEMP
CFLAGS.DragonFly+= -DUSE_FLOCK -DUSE_MKSTEMP
CFLAGS.SunOS+= -DUSE_LOCKF -DNEEDS_FCNTL_H -DNEEDS_STRINGS_H -DBROKEN_SUN_INCLUDES
CFLAGS.IRIX+= -DGETOPT_EOF -DUSE_FLOCK -DNEEDS_FCNTL_H -DNEEDS_BSTRING_H -DIRIX_BROKEN_INCLUDES
CFLAGS.AIX+= -DGETOPT_EOF -DUSE_LOCKF -DNEEDS_FCNTL_H -DNEEDS_LOCKF_H -DNEEDS_STRINGS_H -DNEEDS_SELECT_H
OPSYSVARS+= LD_LIBS
LD_LIBS.SunOS+= -lnsl -lsocket -lresolv
MAKE_ENV+= LD_LIBS=${LD_LIBS:Q}
DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
INSTALL_SRC= # empty
.include "../../mk/bsd.prefs.mk"
INSTALLATION_DIRS= sbin
do-install:
${INSTALL_DATA_DIR} ${SPOOL}/etc
${INSTALL} -m 500 ${WRKSRC}/smtpd ${PREFIX}/sbin/smtpd
${INSTALL} -m 500 ${WRKSRC}/smtpfwdd ${PREFIX}/sbin/smtpfwdd
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/smtpd
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/smtpd
${INSTALL_DATA} ${WRKSRC}/INSTALL ${PREFIX}/share/doc/smtpd
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/smtpd
.for f in antirelay_check_rules_example antispam_check_rules.example \
smtpd_check_rules.example
${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/examples/smtpd
.endfor
.include "../../mk/bsd.pkg.mk"