Staging, general overhaul.

Thanks to tijl@ for clarifying how to handle non-PREFIX directory
creation/removal in plist.
This commit is contained in:
Christian Weisgerber 2013-11-03 12:32:32 +00:00
parent 9b2238e0af
commit f8f89779ae
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=332607
6 changed files with 56 additions and 42 deletions

View file

@ -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}:'
-e 's:%%CC%%:${CC}:' \
-e 's:%%CFLAGS%%:${CFLAGS}:' \
-e 's:%%PERL%%:${PERL}:' \
-e 's:%%PREFIX%%:${PREFIX}:' \
-e 's:%%LOCALBASE%%:${LOCALBASE}:'
post-install:
${MKDIR} ${PREFIX}/share/doc/bsmtp
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/bsmtp/
privbin= ${STAGEDIR}${PREFIX}/libexec/bsmtp
pubbin= ${STAGEDIR}${PREFIX}/bin
mailerdir= ${STAGEDIR}${PREFIX}/share/sendmail
.include <bsd.port.post.mk>
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.mk>

View file

@ -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,

View file

@ -1,14 +0,0 @@
$FreeBSD$
--- Makefile.in.orig Thu Sep 5 15:38:26 2002
+++ Makefile.in Thu Sep 5 15:38:51 2002
@@ -103,7 +103,7 @@
mkdir -p $(mailerdir) || mkdir $(mailerdir) || exit 0 ; \
chown $(binusr) $(mailerdir) ; \
chgrp $(bingrp) $(mailerdir) ; \
- chmod 644 $(mailerdir) ; \
+ chmod 755 $(mailerdir) ; \
fi
$(install) -c -o $(binusr) -g $(bingrp) -m 555 $(batcher) \
$(privbin)/batcher || ( cp $(batcher) /tmp/batcher && \

View file

@ -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';

View file

@ -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);
}

View file

@ -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