diff options
author | mnag <mnag@FreeBSD.org> | 2006-01-13 00:23:08 +0800 |
---|---|---|
committer | mnag <mnag@FreeBSD.org> | 2006-01-13 00:23:08 +0800 |
commit | 2d78d685df923f2347fe437a7cc144322f973501 (patch) | |
tree | f7561604f0895b831e541ffb389904d81979e5ed /mail/postfix1 | |
parent | d631dbdb680ab3ac8c9026cec68e97b3edcf6ad1 (diff) | |
download | freebsd-ports-gnome-2d78d685df923f2347fe437a7cc144322f973501.tar.gz freebsd-ports-gnome-2d78d685df923f2347fe437a7cc144322f973501.tar.zst freebsd-ports-gnome-2d78d685df923f2347fe437a7cc144322f973501.zip |
Add rcNG script to start postfix
Remove scripts/configure. USE_REINPLACE do change !!PREFIX!!
Update pkg-message to reflect rcNG script
Bump PORTREVISION
Diffstat (limited to 'mail/postfix1')
-rw-r--r-- | mail/postfix1/Makefile | 35 | ||||
-rw-r--r-- | mail/postfix1/files/postfix.sh.in | 35 | ||||
-rw-r--r-- | mail/postfix1/pkg-message | 35 | ||||
-rw-r--r-- | mail/postfix1/scripts/configure | 8 | ||||
-rw-r--r-- | mail/postfix1/scripts/configure.postfix | 5 |
5 files changed, 68 insertions, 50 deletions
diff --git a/mail/postfix1/Makefile b/mail/postfix1/Makefile index bf5aa4c445d8..07606776cf66 100644 --- a/mail/postfix1/Makefile +++ b/mail/postfix1/Makefile @@ -13,6 +13,7 @@ PORTNAME= postfix PORTVERSION= 1.1.13 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \ @@ -29,10 +30,12 @@ MAINTAINER= mnag@FreeBSD.org COMMENT= An alternative to widely-used Sendmail CONFLICTS= courier-0.* postfix-2.* sendmail-8.* sendmail-*-8.* smail-3.* zmailer-2.* +LATEST_LINK= postfix1 USE_SUBMAKE= yes USE_REINPLACE= yes +USE_RC_SUBR= postfix.sh + PATCH_STRIP= -p1 -LATEST_LINK= postfix1 MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postqueue.1 \ @@ -65,6 +68,9 @@ SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ .include <bsd.port.pre.mk> +# Default requirement for postfix rcNG +_REQUIRE= DAEMON + pre-fetch: @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postfix @@ -72,10 +78,13 @@ pre-fetch: .include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif -post-patch: - (cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \ - CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \ - ${ECHO_CMD} "all: default" >> Makefile) +.if defined(NOPORTDOCS) +READMEDIR=no +.else +READMEDIR=${PREFIX}/share/doc/postfix +.endif + +SUB_LIST+= REQUIRE="${_REQUIRE}" pre-patch: .for file in ${MAN1} @@ -98,15 +107,19 @@ pre-patch: @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" ${WRKSRC}/conf/${file} .endfor +post-patch: +# All files modified with ${FILESDIR}/patch-* to use !!PREFIX!! need REINPLACE. Put below. + @${REINPLACE_CMD} -e "s,!!PREFIX!!,${PREFIX},g" \ + ${WRKSRC}/conf/main.cf ${WRKSRC}/src/global/mail_params.h + +do-configure: + (cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \ + CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \ + ${ECHO_CMD} "all: default" >> Makefile) + pre-install: @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL -.if defined(NOPORTDOCS) -READMEDIR=no -.else -READMEDIR=${PREFIX}/share/doc/postfix -.endif - do-install: cd ${WRKSRC}; sh postfix-install -non-interactive install_root=/ tempdir=/tmp \ config_directory=${PREFIX}/etc/postfix \ diff --git a/mail/postfix1/files/postfix.sh.in b/mail/postfix1/files/postfix.sh.in new file mode 100644 index 000000000000..8424abbe123b --- /dev/null +++ b/mail/postfix1/files/postfix.sh.in @@ -0,0 +1,35 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: postfix +# REQUIRE: %%REQUIRE%% +# KEYWORD: shutdown +# +# Define these postfix_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/postfix +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +postfix_enable="${postfix_enable-NO}" + +. %%RC_SUBR%% + +name="postfix" +rcvar=`set_rcvar` + +start_cmd=${name}_start +stop_cmd=${name}_stop + +postfix_start() { + %%PREFIX%%/sbin/postfix start +} + +postfix_stop() { + %%PREFIX%%/sbin/postfix stop +} + +load_rc_config ${name} +run_rc_command "$1" diff --git a/mail/postfix1/pkg-message b/mail/postfix1/pkg-message index d9e910d86ceb..7e16c6748239 100644 --- a/mail/postfix1/pkg-message +++ b/mail/postfix1/pkg-message @@ -1,47 +1,22 @@ -If you have postfix configured in your /etc/mail/mailer.conf (answered yes to -the previous question) and would like to enable postfix to start at boot time, -please set these variables in your /etc/rc.conf file: +To enable postfix rcNG startup script please add postfix_enable="YES" in +your rc.conf -sendmail_enable="YES" -sendmail_flags="-bd" -sendmail_pidfile="/var/spool/postfix/pid/master.pid" -sendmail_procname="/usr/local/libexec/postfix/master" -sendmail_outbound_enable="NO" -sendmail_submit_enable="NO" -sendmail_msp_queue_enable="NO" - -This will disable Sendmail completely, and allow you to use /etc/rc.d/sendmail -to start and stop postfix (FreeBSD 5.x and up). For FreeBSD 4.x, it will just -cause the system boot scripts to start sendmail for you. - -Alternatively to the above settings, you can enable postfix to start with -the other local services, for example, after your database server starts if -you need it to be running for postfix. To do this, set in your rc.conf file: +If you not need sendmail anymore, please add in your rc.conf: sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" -Then make the following symbolic link: - -cd /usr/local/etc/rc.d -ln -s /usr/local/sbin/postfix postfix.sh - - -With either startup configuration, you will want to disable some -Sendmail-specific daily maintenance routines in your /etc/periodic.conf file: +And you can disable some sendmail specific daily maintenance routines in your +/etc/periodic.conf file: daily_clean_hoststat_enable="NO" daily_status_mail_rejects_enable="NO" daily_status_include_submit_mailq="NO" daily_submit_queuerun="NO" - If you are using SASL, you need to make sure that postfix has access to read the sasldb file. This is accomplished by adding postfix to group mail and making the /usr/local/etc/sasldb* file(s) readable by group mail (this should be the default for new installs). - -If you are upgrading from postfix version prior to 2.0, please see the README -files for recommended changes to your configuration. diff --git a/mail/postfix1/scripts/configure b/mail/postfix1/scripts/configure deleted file mode 100644 index 93c5b95ec561..000000000000 --- a/mail/postfix1/scripts/configure +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -for f in `find ${WRKSRC} -type f | xargs grep -l '\!\!PREFIX\!\!' ` ; do \ - mv $f $f.orig && sed s+!!PREFIX!!+$PREFIX+g < $f.orig > $f && \ - rm $f.orig -done diff --git a/mail/postfix1/scripts/configure.postfix b/mail/postfix1/scripts/configure.postfix index e8ddb42aedf6..2acf13289114 100644 --- a/mail/postfix1/scripts/configure.postfix +++ b/mail/postfix1/scripts/configure.postfix @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/mail/postfix1/scripts/Attic/configure.postfix,v 1.42 2005-11-09 10:46:13 mnag Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/postfix1/scripts/Attic/configure.postfix,v 1.43 2006-01-12 16:23:08 mnag Exp $ if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then exit @@ -106,6 +106,7 @@ for i; do echo "POSTFIX_CCARGS+= -DHAS_MYSQL -I\${LOCALBASE}/include/mysql" echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/mysql/libmysqlclient.a -lm -lz" echo "MYSQL_SUFFIX= +mysql" + echo "_REQUIRE+= mysql" ;; PgSQL) echo "USE_PGSQL= yes" @@ -115,12 +116,14 @@ for i; do echo "PATCH_SITES+= http://mat.cc/postfix/" echo "PATCHFILES+= postfix-pg.postfix-1.1.8.patch" echo "PATCH_DIST_STRIP= -p1" + echo "_REQUIRE+= postgresql" ;; OpenLDAP) echo "BUILD_DEPENDS+= \${LOCALBASE}/lib/libldap.a:\${PORTSDIR}/net/openldap" echo "POSTFIX_CCARGS+= -DHAS_LDAP -I\${LOCALBASE}/include" echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/libldap.a \${PREFIX}/lib/liblber.a" echo "OPENLDAP_SUFFIX= +openldap" + echo "_REQUIRE+= slapd" ;; Test) echo "BIN1= smtp-sink smtp-source" |