summaryrefslogtreecommitdiff
path: root/mail/dma
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2016-02-14 14:55:10 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2016-02-14 14:55:10 +0000
commit46270cda838cf13a4ce5611aadd5b104b700fe6d (patch)
tree2bb04c8648d9f90a6e8a210fa1c812f4c70aa750 /mail/dma
parent- Fix formating (diff)
- Update to 0.11
- Update GITHUB usage - Use software own install target - Removed support for unsupported FreeBSD releases
Notes
Notes: svn path=/head/; revision=408860
Diffstat (limited to 'mail/dma')
-rw-r--r--mail/dma/Makefile32
-rw-r--r--mail/dma/distinfo4
-rw-r--r--mail/dma/files/patch-BSDMakefile31
-rw-r--r--mail/dma/files/patch-Makefile6
-rw-r--r--mail/dma/files/patch-alias_scan.l15
-rw-r--r--mail/dma/files/patch-bsd_dma-mbox-create_Makefile15
-rw-r--r--mail/dma/files/patch-bsd_dma_Makefile25
-rw-r--r--mail/dma/files/patch-conf.c10
-rw-r--r--mail/dma/files/patch-dma-Makefile18
-rw-r--r--mail/dma/files/patch-dma-mbox-create-Makefile10
-rw-r--r--mail/dma/files/patch-dma.c20
-rw-r--r--mail/dma/files/patch-dma.conf11
-rw-r--r--mail/dma/files/patch-get-version.sh11
-rw-r--r--mail/dma/files/patch-mail.c12
-rw-r--r--mail/dma/files/patch-spool.c6
-rw-r--r--mail/dma/pkg-plist4
16 files changed, 87 insertions, 143 deletions
diff --git a/mail/dma/Makefile b/mail/dma/Makefile
index eda24798fe46..c2197b766be2 100644
--- a/mail/dma/Makefile
+++ b/mail/dma/Makefile
@@ -2,11 +2,10 @@
# $FreeBSD$
PORTNAME= dma
-PORTVERSION= v0.9
-PORTREVISION= 1
+PORTVERSION= 0.11
+DISTVERSIONPREFIX= v
PORTEPOCH= 1
CATEGORIES= mail ipv6
-EXTRACT_SUFX=
MAINTAINER= ports@FreeBSD.org
COMMENT= DragonFly Mail Agent, a small MTA for local/outbound mail
@@ -17,15 +16,17 @@ USE_OPENSSL= yes
USE_GITHUB= yes
GH_ACCOUNT= corecode
-GH_TAGNAME= 2bb8bcb
+BUILD_WRKSRC= ${WRKSRC}/bsd
+INSTALL_WRKSRC= ${WRKSRC}/bsd
CFLAGS+= -I${OPENSSLINC} \
-DCONF_PATH='\"${PREFIX}/etc/dma\"' \
-DDMA_ROOT_USER='\"mailnull\"' \
-DDMA_GROUP='\"mail\"'
LDFLAGS+= -L${OPENSSLLIB}
-MAKE_ENV= __MAKE_CONF=/dev/null SRCCONF=/dev/null NO_WERROR=defined
+MAKE_ENV= __MAKE_CONF=/dev/null SRCCONF=/dev/null NO_WERROR=defined \
+ MANDIR=${MANDIRS}/man
USE_RC_SUBR= dma_flushq
SUB_FILES= pkg-message
@@ -42,28 +43,21 @@ PLIST_SUB+= VARDIR=""
PLIST_SUB+= VARDIR="@comment "
.endif
-pre-patch:
- @${MKDIR} ${WRKSRC}/dma ${WRKSRC}/dma-mbox-create
- @${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.dist
-
post-patch:
@${REINPLACE_CMD} -e 's,/etc/dma,${PREFIX}/etc/dma,g' \
${WRKSRC}/dma.8
@${REINPLACE_CMD} -e 's, /etc/dma, ${PREFIX}/etc/dma,g' \
${WRKSRC}/dma.conf
+ @${REINPLACE_CMD} -e '/^MK_MAN/d' -e 's/^NOMAN/NO_MAN/' \
+ ${WRKSRC}/bsd/dma-mbox-create/Makefile
.if ${OSVERSION} < 1000013
- @${REINPLACE_CMD} -e 's,^YFLAGS.*,,' ${WRKSRC}/dma/Makefile
+ @${REINPLACE_CMD} -e 's,^YFLAGS.*,,' ${WRKSRC}/bsd/dma/Makefile
.endif
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/dma/dma ${STAGEDIR}/${PREFIX}/libexec
- ${INSTALL_PROGRAM} \
- ${WRKSRC}/dma-mbox-create/dma-mbox-create ${STAGEDIR}/${PREFIX}/libexec
- ${INSTALL_MAN} ${WRKSRC}/dma.8 ${STAGEDIR}/${PREFIX}/man/man8/
- ${MKDIR} ${STAGEDIR}/${PREFIX}/etc/dma
-.for i in ${CONFFILES}
- ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}/${PREFIX}/etc/dma/${i}.sample
-.endfor
+post-install:
+ ${MKDIR} ${STAGEDIR}${ETCDIR}
${MKDIR} ${STAGEDIR}/var/spool/dma
+ ${INSTALL_DATA} ${WRKSRC}/dma.conf ${STAGEDIR}${ETCDIR}/dma.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/auth.conf ${STAGEDIR}${ETCDIR}/auth.conf.sample
.include <bsd.port.post.mk>
diff --git a/mail/dma/distinfo b/mail/dma/distinfo
index b5a65c54a203..64ec5df33fa9 100644
--- a/mail/dma/distinfo
+++ b/mail/dma/distinfo
@@ -1,2 +1,2 @@
-SHA256 (corecode-dma-v0.9-2bb8bcb_GH0) = 4c829de90cfb77ea5471108b724281b87a657e6a92f954436b49e6c25aa9eb12
-SIZE (corecode-dma-v0.9-2bb8bcb_GH0) = 45609
+SHA256 (corecode-dma-v0.11_GH0.tar.gz) = 288bd57f17aba696b6423b1fa0cd0f7d9b7228d32811f1cd7b821d5f020051b8
+SIZE (corecode-dma-v0.11_GH0.tar.gz) = 34529
diff --git a/mail/dma/files/patch-BSDMakefile b/mail/dma/files/patch-BSDMakefile
deleted file mode 100644
index 5c31d0bb6011..000000000000
--- a/mail/dma/files/patch-BSDMakefile
+++ /dev/null
@@ -1,31 +0,0 @@
---- BSDmakefile.orig 2013-06-03 14:03:15.000000000 +0000
-+++ BSDmakefile 2013-08-22 10:35:28.000000000 +0000
-@@ -1,21 +1,13 @@
- # $DragonFly: src/libexec/dma/Makefile,v 1.5 2008/09/19 00:36:57 corecode Exp $
- #
-
--version!= sh get-version.sh
-+version!= (cd .. && sh get-version.sh)
-
--CFLAGS+= -I${.CURDIR}
-+CFLAGS+= -I${.CURDIR} -I${.CURDIR}/..
- CFLAGS+= -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME
- CFLAGS+= -DLIBEXEC_PATH='"${LIBEXEC}"' -DDMA_VERSION='"${version}"'
- CFLAGS+= -DCONF_PATH='"${CONFDIR}"'
-
--DPADD= ${LIBSSL} ${LIBCRYPTO}
--LDADD= -lssl -lcrypto
--
--PROG= dma
--SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c
--SRCS+= dma.c dns.c local.c mail.c net.c spool.c util.c
--MAN= dma.8
--
- PREFIX?= /usr/local
- LIBEXEC?= ${PREFIX}/libexec
- CONFDIR?= ${PREFIX}/etc/dma
-@@ -25,4 +17,3 @@ BINGRP= mail
- BINMODE=2555
- WARNS?= 6
-
--.include <bsd.prog.mk>
diff --git a/mail/dma/files/patch-Makefile b/mail/dma/files/patch-Makefile
deleted file mode 100644
index 5e22504879b2..000000000000
--- a/mail/dma/files/patch-Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
---- Makefile.orig 2012-01-28 20:35:32.000000000 +0000
-+++ Makefile 2012-01-28 20:31:56.000000000 +0000
-@@ -0,0 +1,3 @@
-+SUBDIR= dma dma-mbox-create
-+
-+.include <bsd.subdir.mk>
diff --git a/mail/dma/files/patch-alias_scan.l b/mail/dma/files/patch-alias_scan.l
deleted file mode 100644
index 748bd034e771..000000000000
--- a/mail/dma/files/patch-alias_scan.l
+++ /dev/null
@@ -1,15 +0,0 @@
-!
-! Work around bug in FreeBSD 8.1 due to missing fix for:
-! bin/139319: [patch] flex(1): fix prototypes, esp. when YY_NO_INPUT is defined
-!
---- aliases_scan.l.orig 2012-01-03 13:54:05.000000000 +0000
-+++ aliases_scan.l 2012-04-13 18:23:41.000000000 +0000
-@@ -3,8 +3,6 @@
- #include <string.h>
- #include "aliases_parse.h"
-
--#define YY_NO_INPUT
--
- int yylex(void);
- %}
-
diff --git a/mail/dma/files/patch-bsd_dma-mbox-create_Makefile b/mail/dma/files/patch-bsd_dma-mbox-create_Makefile
new file mode 100644
index 000000000000..0e90b3c8d734
--- /dev/null
+++ b/mail/dma/files/patch-bsd_dma-mbox-create_Makefile
@@ -0,0 +1,15 @@
+--- bsd/dma-mbox-create/Makefile.orig 2016-02-07 12:41:49 UTC
++++ bsd/dma-mbox-create/Makefile
+@@ -17,8 +17,9 @@ PREFIX?= /usr/local
+ LIBEXEC?= ${PREFIX}/libexec
+ CONFDIR?= ${PREFIX}/etc/dma
+
+-BINOWN= root
+-BINGRP= mail
+-BINMODE=4554
++BINDIR= ${LIBEXEC}
++#BINOWN= root
++#BINGRP= mail
++#BINMODE=4554
+
+ .include <bsd.prog.mk>
diff --git a/mail/dma/files/patch-bsd_dma_Makefile b/mail/dma/files/patch-bsd_dma_Makefile
new file mode 100644
index 000000000000..82c72f394bfd
--- /dev/null
+++ b/mail/dma/files/patch-bsd_dma_Makefile
@@ -0,0 +1,25 @@
+--- bsd/dma/Makefile.orig 2016-02-07 12:41:49 UTC
++++ bsd/dma/Makefile
+@@ -11,6 +11,8 @@ CFLAGS+= -DCONF_PATH='"${CONFDIR}"'
+ DPADD= ${LIBSSL} ${LIBCRYPTO}
+ LDADD= -lssl -lcrypto
+
++YFLAGS+= -i
++
+ PROG= dma
+ .PATH: ${.CURDIR}/../..
+ SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c
+@@ -21,9 +23,10 @@ PREFIX?= /usr/local
+ LIBEXEC?= ${PREFIX}/libexec
+ CONFDIR?= ${PREFIX}/etc/dma
+
+-BINOWN= root
+-BINGRP= mail
+-BINMODE=2555
++BINDIR= ${LIBEXEC}
++#BINOWN= root
++#BINGRP= mail
++#BINMODE=2555
+ WARNS?= 5
+
+ .include <bsd.prog.mk>
diff --git a/mail/dma/files/patch-conf.c b/mail/dma/files/patch-conf.c
index dd138781c82a..d2e94ff06292 100644
--- a/mail/dma/files/patch-conf.c
+++ b/mail/dma/files/patch-conf.c
@@ -1,11 +1,11 @@
---- ./conf.c.orig 2012-01-03 13:54:05.000000000 +0000
-+++ ./conf.c 2012-01-24 22:57:41.000000000 +0000
-@@ -121,7 +121,7 @@
+--- conf.c.orig 2016-02-07 12:41:49 UTC
++++ conf.c
+@@ -121,7 +121,7 @@ parse_authfile(const char *path)
au = calloc(1, sizeof(*au));
if (au == NULL)
-- errlog(1, NULL);
-+ errlog(1, "calloc failed");
+- errlog(EX_OSERR, NULL);
++ errlog(EX_OSERR, "calloc failed");
data = strdup(line);
au->login = strsep(&data, "|");
diff --git a/mail/dma/files/patch-dma-Makefile b/mail/dma/files/patch-dma-Makefile
deleted file mode 100644
index eb5156192890..000000000000
--- a/mail/dma/files/patch-dma-Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
---- dma/Makefile.orig 2013-08-22 10:56:28.000000000 +0000
-+++ dma/Makefile 2013-08-22 11:18:05.000000000 +0000
-@@ -0,0 +1,15 @@
-+.PATH: ${.CURDIR} ${.CURDIR}/../
-+
-+PROG= dma
-+SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c
-+SRCS+= dma.c dns.c local.c mail.c net.c spool.c util.c
-+MAN= dma.8
-+
-+CFLAGS+= -DYY_NO_INPUT
-+DPADD= ${LIBSSL} ${LIBCRYPTO}
-+LDADD= -lssl -lcrypto
-+
-+YFLAGS+= -i
-+
-+.include "../BSDmakefile"
-+.include <bsd.prog.mk>
diff --git a/mail/dma/files/patch-dma-mbox-create-Makefile b/mail/dma/files/patch-dma-mbox-create-Makefile
deleted file mode 100644
index 61d1fade06c0..000000000000
--- a/mail/dma/files/patch-dma-mbox-create-Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
---- dma-mbox-create/Makefile.orig 2012-01-28 20:34:03.000000000 +0000
-+++ dma-mbox-create/Makefile 2012-01-28 20:33:27.000000000 +0000
-@@ -0,0 +1,7 @@
-+.PATH: ${.CURDIR} ${.CURDIR}/../
-+
-+PROG= dma-mbox-create
-+NO_MAN=
-+
-+.include "../BSDmakefile"
-+.include <bsd.prog.mk>
diff --git a/mail/dma/files/patch-dma.c b/mail/dma/files/patch-dma.c
index 4c2362e72792..aac9b3ae6426 100644
--- a/mail/dma/files/patch-dma.c
+++ b/mail/dma/files/patch-dma.c
@@ -1,7 +1,7 @@
---- dma.c.orig 2013-08-22 10:56:28.000000000 +0000
-+++ dma.c 2013-08-22 11:03:59.000000000 +0000
-@@ -343,7 +343,7 @@ retry:
- exit(1);
+--- dma.c.orig 2016-02-07 12:41:49 UTC
++++ dma.c
+@@ -340,7 +340,7 @@ retry:
+ exit(EX_SOFTWARE);
}
if (gettimeofday(&now, NULL) == 0 &&
- (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) {
@@ -9,7 +9,7 @@
snprintf(errmsg, sizeof(errmsg),
"Could not deliver for the last %d seconds. Giving up.",
MAX_TIMEOUT);
-@@ -560,7 +560,7 @@ main(int argc, char **argv)
+@@ -564,7 +564,7 @@ main(int argc, char **argv)
skipopts:
if (logident_base == NULL)
logident_base = "dma";
@@ -18,12 +18,12 @@
act.sa_handler = sighup_handler;
act.sa_flags = 0;
-@@ -598,7 +598,7 @@ skipopts:
- errlog(1, "can not read aliases file `%s'", config.aliases);
+@@ -596,7 +596,7 @@ skipopts:
+ errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases);
if ((sender = set_from(&queue, sender)) == NULL)
-- errlog(1, NULL);
-+ errlog(1, "set_from failed");
+- errlog(EX_SOFTWARE, NULL);
++ errlog(EX_SOFTWARE, "set_from failed");
if (newspoolf(&queue) != 0)
- errlog(1, "can not create temp file in `%s'", config.spooldir);
+ errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir);
diff --git a/mail/dma/files/patch-dma.conf b/mail/dma/files/patch-dma.conf
deleted file mode 100644
index d7130bda7747..000000000000
--- a/mail/dma/files/patch-dma.conf
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./dma.conf.orig 2012-01-24 22:57:52.000000000 +0000
-+++ ./dma.conf 2012-01-24 22:58:08.000000000 +0000
-@@ -2,8 +2,6 @@
- #
- # Your smarthost (also called relayhost). Leave blank if you don't want
- # smarthost support.
--# NOTE: on Debian systems this is handled via debconf!
--# Please use dpkg-reconfigure dma to change this value.
- #SMARTHOST
-
- # Use this SMTP port. Most users will be fine with the default (25)
diff --git a/mail/dma/files/patch-get-version.sh b/mail/dma/files/patch-get-version.sh
index 858b013be099..afbd645689f5 100644
--- a/mail/dma/files/patch-get-version.sh
+++ b/mail/dma/files/patch-get-version.sh
@@ -1,10 +1,11 @@
---- get-version.sh.orig 2012-03-08 17:37:54.000000000 +0000
-+++ get-version.sh 2012-03-08 17:38:41.000000000 +0000
-@@ -1,9 +1,7 @@
- #!/bin/sh
+--- get-version.sh.orig 2016-02-07 12:41:49 UTC
++++ get-version.sh
+@@ -2,10 +2,8 @@
+ tmp=$1
+ file=${tmp:=VERSION}
-gitver=$(git describe 2>/dev/null | tr - .)
- filever=$(cat VERSION)
+ filever=$(cat ${file} 2>/dev/null)
-version=${gitver}
: ${version:=$filever}
diff --git a/mail/dma/files/patch-mail.c b/mail/dma/files/patch-mail.c
index e479d6d4352b..1507e1666cce 100644
--- a/mail/dma/files/patch-mail.c
+++ b/mail/dma/files/patch-mail.c
@@ -1,11 +1,11 @@
---- ./mail.c.orig 2012-01-03 13:54:05.000000000 +0000
-+++ ./mail.c 2012-01-24 22:57:41.000000000 +0000
-@@ -332,7 +332,7 @@
+--- mail.c.orig 2016-02-07 12:41:49 UTC
++++ mail.c
+@@ -333,7 +333,7 @@ newaddr:
ps->pos = 0;
addr = strdup(ps->addr);
if (addr == NULL)
-- errlog(1, NULL);
-+ errlog(1, "strdup failed");
+- errlog(EX_SOFTWARE, NULL);
++ errlog(EX_SOFTWARE, "strdup failed");
if (add_recp(queue, addr, EXPAND_WILDCARD) != 0)
- errlogx(1, "invalid recipient `%s'", addr);
+ errlogx(EX_DATAERR, "invalid recipient `%s'", addr);
diff --git a/mail/dma/files/patch-spool.c b/mail/dma/files/patch-spool.c
index 0ebbfa10fca2..e73c3865af9e 100644
--- a/mail/dma/files/patch-spool.c
+++ b/mail/dma/files/patch-spool.c
@@ -1,6 +1,6 @@
---- spool.c.orig 2013-06-03 14:03:15.000000000 +0000
-+++ spool.c 2013-08-22 11:07:47.000000000 +0000
-@@ -415,7 +415,7 @@ flushqueue_since(unsigned int period)
+--- spool.c.orig 2016-02-07 12:41:49 UTC
++++ spool.c
+@@ -416,7 +416,7 @@ flushqueue_since(unsigned int period)
return (0);
/* Did the flush file get touched within the last period seconds? */
diff --git a/mail/dma/pkg-plist b/mail/dma/pkg-plist
index 90e3d42800c5..03f49fa284a9 100644
--- a/mail/dma/pkg-plist
+++ b/mail/dma/pkg-plist
@@ -1,5 +1,5 @@
-@(,mail,2555) libexec/dma
-@(root,mail,4555) libexec/dma-mbox-create
+@(root,mail,2555) libexec/dma
+@(root,mail,4554) libexec/dma-mbox-create
@sample(root,mail,0644) etc/dma/dma.conf.sample
@sample(root,mail,0640) etc/dma/auth.conf.sample
man/man8/dma.8.gz