From 3a5a3067bed1ae4522e78f687e3bc74fd7f38998 Mon Sep 17 00:00:00 2001 From: Danilo Egea Gondolfo Date: Thu, 24 Jul 2014 21:18:55 +0000 Subject: [PATCH] - Update from 1.1.b1 to 1.2 - Add stage support PR: ports/191518 Submitted by: netherby@hotmail.com --- mail/archivesmtp/Makefile | 28 +++++++++++---------------- mail/archivesmtp/distinfo | 4 ++-- mail/archivesmtp/files/archivesmtp.in | 8 ++++++-- mail/archivesmtp/pkg-descr | 2 +- mail/archivesmtp/pkg-plist | 8 ++++---- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/mail/archivesmtp/Makefile b/mail/archivesmtp/Makefile index 267058f97e3e..cd1ace86923b 100644 --- a/mail/archivesmtp/Makefile +++ b/mail/archivesmtp/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= archivesmtp -PORTVERSION= 1.1.b1 +PORTVERSION= 1.2 CATEGORIES= mail MASTER_SITES= http://www.dancingfortune.com/projects/archivesmtp/files/ @@ -12,24 +12,18 @@ COMMENT= SMTP mail archiver CFLAGS+= ${PTHREAD_CFLAGS} LIBS+= ${PTHREAD_LIBS}\ -lmilter -MAKE_ENV+= LDADD="${LIBS}"\ - BINDIR="${PREFIX}/sbin"\ - MANDIR="${MANPREFIX}/man/man"\ - NO_MANCOMPRESS="yes" +MAKE_ENV+= LDADD="${LIBS}" USE_RC_SUBR= archivesmtp SUB_FILES= pkg-message -SUB_LIST+= SOCKETBASE=${SOCKETBASE}\ - SOCKETDIR=${SOCKETDIR} +SUB_LIST+= SOCKETBASE="${SOCKETBASE}"\ + SOCKETDIR="${SOCKETDIR}" PLIST_SUB+= ${SUB_LIST} -MAN8= archivesmtp.8 - # Path for unix/local socket (by default also used for pid file) SOCKETBASE?= /var/run SOCKETDIR?= archivesmtp -NO_STAGE= yes .include # Sets up libmilter dependencies and options @@ -40,14 +34,14 @@ pre-build: ${CP} ${FILESDIR}/top-Makefile ${WRKSRC}/Makefile ${CP} ${FILESDIR}/src-Makefile ${WRKSRC}/src/Makefile +do-install: + ${INSTALL} -s ${WRKSRC}/src/archivesmtp ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_MAN} ${WRKSRC}/src/archivesmtp.8 ${STAGEDIR}${PREFIX}/man/man8 + post-install: # Install sample configuration file - ${INSTALL_DATA} ${WRKSRC}/src/archivesmtp.conf.sample ${PREFIX}/etc - # Create directory for unix/local socket - ${MKDIR} ${SOCKETBASE}/${SOCKETDIR} - ${CHOWN} nobody ${SOCKETBASE}/${SOCKETDIR} - ${CHMOD} 755 ${SOCKETBASE}/${SOCKETDIR} - # Print post install message - @${CAT} ${PKGMESSAGE} + ${INSTALL_DATA} ${WRKSRC}/src/archivesmtp.conf.sample ${STAGEDIR}${PREFIX}/etc + # Create socket directory + @${MKDIR} ${STAGEDIR}${SOCKETBASE}/${SOCKETDIR} .include diff --git a/mail/archivesmtp/distinfo b/mail/archivesmtp/distinfo index b7537eba7ff4..8e505a864d15 100644 --- a/mail/archivesmtp/distinfo +++ b/mail/archivesmtp/distinfo @@ -1,2 +1,2 @@ -SHA256 (archivesmtp-1.1.b1.tar.gz) = 0b4c8ddb15262721801c929fd104549c63d569af82ba9aaa5d26294ad88f72d8 -SIZE (archivesmtp-1.1.b1.tar.gz) = 101835 +SHA256 (archivesmtp-1.2.tar.gz) = b3ec9e21271dbfd130b2603a9c6f98d1091d9ff9d675094f74a21b2f3b099c54 +SIZE (archivesmtp-1.2.tar.gz) = 120810 diff --git a/mail/archivesmtp/files/archivesmtp.in b/mail/archivesmtp/files/archivesmtp.in index dddeffa828bf..ce14d0c415ee 100644 --- a/mail/archivesmtp/files/archivesmtp.in +++ b/mail/archivesmtp/files/archivesmtp.in @@ -1,12 +1,15 @@ #!/bin/sh +# $FreeBSD$ +# # PROVIDE: archivesmtp # BEFORE: mail +# KEYWORD: shutdown . /etc/rc.subr name="archivesmtp" -rcvar=archivesmtp_enable +rcvar=`set_rcvar` command="%%PREFIX%%/sbin/${name}" @@ -18,9 +21,10 @@ load_rc_config "$name" : ${archivesmtp_socket="unix:%%SOCKETBASE%%/%%SOCKETDIR%%/mta.sock"} : ${archivesmtp_config="%%PREFIX%%/etc/archivesmtp.conf"} : ${archivesmtp_pidfile="%%SOCKETBASE%%/%%SOCKETDIR%%/run.pid"} +# archivesmtp_flags= May be used to set optional behaviours. pidfile="${archivesmtp_pidfile}" -command_args="${archivesmtp_flags} -p ${archivesmtp_socket} -f ${archivesmtp_config} -u ${archivesmtp_chuser} -r ${archivesmtp_pidfile} &" +command_args="-p ${archivesmtp_socket} -f ${archivesmtp_config} -u ${archivesmtp_chuser} -r ${archivesmtp_pidfile} ${archivesmtp_flags} &" run_rc_command "$1" diff --git a/mail/archivesmtp/pkg-descr b/mail/archivesmtp/pkg-descr index 4a8239158b3e..1d4d8710c174 100644 --- a/mail/archivesmtp/pkg-descr +++ b/mail/archivesmtp/pkg-descr @@ -4,6 +4,6 @@ specific locations in mbox format. Adding headers and piping output to other programs is also supported. The libmilter interface is used and must be supported by the MTA for ArchiveSMTP to work. -Version: 1.1.b1 +Version: 1.2 WWW: http://www.dancingfortune.com/projects/archivesmtp/ diff --git a/mail/archivesmtp/pkg-plist b/mail/archivesmtp/pkg-plist index 5a76b633d86d..8b55d3f9fe29 100644 --- a/mail/archivesmtp/pkg-plist +++ b/mail/archivesmtp/pkg-plist @@ -1,7 +1,7 @@ sbin/archivesmtp etc/archivesmtp.conf.sample -@stopdaemon archivesmtp +man/man8/archivesmtp.8.gz +@owner nobody +@mode 755 @exec mkdir -p %%SOCKETBASE%%/%%SOCKETDIR%% -@exec chown nobody %%SOCKETBASE%%/%%SOCKETDIR%% -@cwd %%SOCKETBASE%% -@dirrm %%SOCKETDIR%% +@dirrmtry %%SOCKETBASE%%/%%SOCKETDIR%%