Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Nov 2013 12:32:33 +0000 (UTC)
From:      Christian Weisgerber <naddy@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r332607 - in head/mail/bsmtp: . files
Message-ID:  <201311031232.rA3CWXI9063072@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: naddy
Date: Sun Nov  3 12:32:32 2013
New Revision: 332607
URL: http://svnweb.freebsd.org/changeset/ports/332607

Log:
  Staging, general overhaul.
  Thanks to tijl@ for clarifying how to handle non-PREFIX directory
  creation/removal in plist.

Deleted:
  head/mail/bsmtp/files/patch-Makefile.in
Modified:
  head/mail/bsmtp/Makefile
  head/mail/bsmtp/files/config.sed
  head/mail/bsmtp/files/patch-configure
  head/mail/bsmtp/files/patch-rsmtp.in
  head/mail/bsmtp/pkg-plist

Modified: head/mail/bsmtp/Makefile
==============================================================================
--- head/mail/bsmtp/Makefile	Sun Nov  3 11:37:03 2013	(r332606)
+++ head/mail/bsmtp/Makefile	Sun Nov  3 12:32:32 2013	(r332607)
@@ -10,6 +10,8 @@ MASTER_SITE_SUBDIR=	naddy
 MAINTAINER=	naddy@FreeBSD.org
 COMMENT=	Batch SMTP support for sendmail, incoming and outgoing
 
+RUN_DEPENDS=	${LOCALBASE}/bin/uux:${PORTSDIR}/net/freebsd-uucp
+
 CONFLICTS=	smail-3.*
 
 USES=		shebangfix perl5
@@ -18,12 +20,6 @@ HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--redo
 SHEBANG_FILES=	configure
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
-
-RUN_DEPENDS=	${LOCALBASE}/bin/uux:${PORTSDIR}/net/freebsd-uucp
-UUPREFIX=	${LOCALBASE}
-
 post-patch:
 	@${CP} ${WRKSRC}/bsmtp.m4.8.9.in ${WRKSRC}/bsmtp.m4.8.10.in
 	@${CP} ${FILESDIR}/bsmtp.m4.8.11.in ${WRKSRC}/
@@ -33,13 +29,38 @@ post-patch:
 
 pre-configure:
 	@${SED} <${FILESDIR}/config.sed >${WRKSRC}/config.sed \
-		-e 's:%%CC%%:${CC}:' \
-		-e 's:%%CFLAGS%%:${CFLAGS}:' \
-		-e 's:%%PREFIX%%:${PREFIX}:' \
-		-e 's:%%UUPREFIX%%:${UUPREFIX}:'
-
-post-install:
-	${MKDIR} ${PREFIX}/share/doc/bsmtp
-	${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/bsmtp/
+	    -e 's:%%CC%%:${CC}:' \
+	    -e 's:%%CFLAGS%%:${CFLAGS}:' \
+	    -e 's:%%PERL%%:${PERL}:' \
+	    -e 's:%%PREFIX%%:${PREFIX}:' \
+	    -e 's:%%LOCALBASE%%:${LOCALBASE}:'
+
+privbin=	${STAGEDIR}${PREFIX}/libexec/bsmtp
+pubbin= 	${STAGEDIR}${PREFIX}/bin
+mailerdir=	${STAGEDIR}${PREFIX}/share/sendmail
+
+do-install:
+	${MKDIR} ${privbin}
+	${MKDIR} ${mailerdir}
+	${INSTALL_PROGRAM} ${WRKSRC}/batcher.new ${privbin}/batcher
+	${INSTALL_PROGRAM} ${WRKSRC}/bsmtp ${privbin}
+	${INSTALL_DATA} ${WRKSRC}/bsmtp.m4.8.14 ${mailerdir}/bsmtp.m4
+	${INSTALL_SCRIPT} ${WRKSRC}/rcsmtp ${pubbin}
+.for i in cbsmtp crsmtp rgsmtp
+	${LN} -s rcsmtp ${pubbin}/$i
+.endfor
+	${INSTALL_PROGRAM} ${WRKSRC}/rsmtp.wrapper ${pubbin}/rsmtp
+	${INSTALL_SCRIPT} ${WRKSRC}/rsmtp ${privbin}
+.for i in bsmtp
+	${LN} -s rsmtp ${pubbin}/$i
+.endfor
+.for i in c-cbsmtp c-rcsmtp g-rcsmtp g-rgsmtp n-rsmtp
+	${INSTALL_SCRIPT} ${WRKSRC}/transmitter.$i ${privbin}
+.endfor
+	${INSTALL_PROGRAM} ${WRKSRC}/_bqueue ${pubbin}
+	${INSTALL_SCRIPT} ${WRKSRC}/bqueue ${pubbin}
+# post-install:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/mail/bsmtp/files/config.sed
==============================================================================
--- head/mail/bsmtp/files/config.sed	Sun Nov  3 11:37:03 2013	(r332606)
+++ head/mail/bsmtp/files/config.sed	Sun Nov  3 12:32:32 2013	(r332607)
@@ -3,9 +3,9 @@ s,@CC@,%%CC%%,
 s,@INSTALL@,/usr/bin/install,
 s,@SH@,/bin/sh,
 s,@GZIP@,/usr/bin/gzip,
-s,@PERL@,/usr/bin/perl,
+s,@PERL@,%%PERL%%,
 s,@COMPRESS@,/usr/bin/compress,
-s,@UUX@,%%UUPREFIX%%/bin/uux,
+s,@UUX@,%%LOCALBASE%%/bin/uux,
 s,@SENDMAIL@,/usr/sbin/sendmail,
 s,@CFLAGS@,%%CFLAGS%%,
 s,@PRIVBINDIR@,%%PREFIX%%/libexec/bsmtp,
@@ -20,9 +20,9 @@ s,@DAEMONUID@,66,
 s,@INPROTO@,BSMTP,
 s,@LOCALHOSTNAME@,`hostname`,
 s,@DOMAINSUFFIX@,none,
-s,@SENDMAILVERS@,8.13,
+s,@SENDMAILVERS@,8.14,
 s,@INSTALLMAILER@,true,
-s,@MAILERVERSION@,8.13,
+s,@MAILERVERSION@,8.14,
 s,@FLOCK@,true,
 s,@LOCKDEFINE@,-DUSE_FLOCK,
 s,@BATCHER@,batcher.new,

Modified: head/mail/bsmtp/files/patch-configure
==============================================================================
--- head/mail/bsmtp/files/patch-configure	Sun Nov  3 11:37:03 2013	(r332606)
+++ head/mail/bsmtp/files/patch-configure	Sun Nov  3 12:32:32 2013	(r332607)
@@ -1,9 +1,9 @@
 
 $FreeBSD$
 
---- configure.orig
-+++ configure
-@@ -41,6 +41,11 @@
+--- configure.orig	2013-11-01 19:55:42.000000000 +0100
++++ configure	2013-11-01 19:55:42.000000000 +0100
+@@ -41,6 +41,11 @@ if ($#ARGV == 0) {
    "batcher",
    "batcher.c",
    "bsmtp.c",
@@ -15,7 +15,7 @@ $FreeBSD$
    "bsmtp.m4.8.9",
    "bsmtp.m4.8.8",
    "bsmtp.m4.8.7",
-@@ -198,6 +203,16 @@
+@@ -198,6 +203,16 @@ if (! $redo) {
  	    $default[$i] = '8.8';
  	  } elsif ($value{'@SENDMAILVERS@'} =~ /^\s*8\.9(\..*)?\s*$/) {
  	    $default[$i] = '8.9';

Modified: head/mail/bsmtp/files/patch-rsmtp.in
==============================================================================
--- head/mail/bsmtp/files/patch-rsmtp.in	Sun Nov  3 11:37:03 2013	(r332606)
+++ head/mail/bsmtp/files/patch-rsmtp.in	Sun Nov  3 12:32:32 2013	(r332607)
@@ -1,9 +1,9 @@
 
 $FreeBSD$
 
---- rsmtp.in.orig
-+++ rsmtp.in
-@@ -72,7 +72,7 @@
+--- rsmtp.in.orig	1999-05-16 11:24:09.000000000 +0200
++++ rsmtp.in	2013-11-01 19:55:42.000000000 +0100
+@@ -72,7 +72,7 @@ while (<>) {
      print STDERR "Recipient: $r\n" if ($debug);
      push (@recipients, $r);
    }

Modified: head/mail/bsmtp/pkg-plist
==============================================================================
--- head/mail/bsmtp/pkg-plist	Sun Nov  3 11:37:03 2013	(r332606)
+++ head/mail/bsmtp/pkg-plist	Sun Nov  3 12:32:32 2013	(r332607)
@@ -1,5 +1,9 @@
 @comment $FreeBSD$
+@owner uucp
+@mode 4555
 bin/_bqueue
+@mode
+@owner
 bin/bqueue
 bin/bsmtp
 bin/cbsmtp
@@ -8,17 +12,20 @@ bin/rcsmtp
 bin/rgsmtp
 bin/rsmtp
 libexec/bsmtp/batcher
+@mode 4555
 libexec/bsmtp/bsmtp
+@mode
 libexec/bsmtp/rsmtp
 libexec/bsmtp/transmitter.c-cbsmtp
 libexec/bsmtp/transmitter.c-rcsmtp
 libexec/bsmtp/transmitter.g-rcsmtp
 libexec/bsmtp/transmitter.g-rgsmtp
 libexec/bsmtp/transmitter.n-rsmtp
-share/doc/bsmtp/README
+%%DOCSDIR%%/README
 share/sendmail/bsmtp.m4
 @dirrm libexec/bsmtp
 @dirrm share/doc/bsmtp
 @dirrm share/sendmail
-@exec mkdir -pm 770 /var/spool/bsmtp; chown uucp:uucp /var/spool/bsmtp
-@unexec rmdir /var/spool/bsmtp || true
+@exec install -d -o uucp -g uucp -m 0770 /var/spool/bsmtp
+@comment Do not use rmdir to avoid inappropriate pkg tools magic
+@unexec rm -d /var/spool/bsmtp 2>/dev/null || true



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311031232.rA3CWXI9063072>