git: 19ffad2d7622 - main - mail/mail-expire: Add new port

From: Tilman Keskinoz <arved_at_FreeBSD.org>
Date: Mon, 23 May 2022 19:01:44 UTC
The branch main has been updated by arved:

URL: https://cgit.FreeBSD.org/ports/commit/?id=19ffad2d7622a313477fbe96f2d026a389d7a986

commit 19ffad2d7622a313477fbe96f2d026a389d7a986
Author:     Tilman Keskinoz <arved@FreeBSD.org>
AuthorDate: 2022-05-23 19:01:24 +0000
Commit:     Tilman Keskinoz <arved@FreeBSD.org>
CommitDate: 2022-05-23 19:01:24 +0000

    mail/mail-expire: Add new port
    
    This utility expires old mails from mbox and maildir files.
    
    Its functionality is similar to mail/archivemail which was removed in
    2020
---
 mail/Makefile              |  1 +
 mail/mail-expire/Makefile  | 26 ++++++++++++++++++++++++++
 mail/mail-expire/distinfo  |  3 +++
 mail/mail-expire/pkg-descr | 13 +++++++++++++
 4 files changed, 43 insertions(+)

diff --git a/mail/Makefile b/mail/Makefile
index 7b574900577b..3cbbde67242d 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -190,6 +190,7 @@
     SUBDIR += lmtp2nntp
     SUBDIR += lookout
     SUBDIR += lurker
+    SUBDIR += mail-expire
     SUBDIR += mail2sms
     SUBDIR += mailagent
     SUBDIR += maildrop
diff --git a/mail/mail-expire/Makefile b/mail/mail-expire/Makefile
new file mode 100644
index 000000000000..022ed0bc5083
--- /dev/null
+++ b/mail/mail-expire/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	mail-expire
+PORTVERSION=	0.9.1
+CATEGORIES=	mail
+MASTER_SITES=	DEBIAN
+DISTNAME=	${PORTNAME}_${PORTVERSION}
+
+MAINTAINER=	arved@FreeBSD.org
+COMMENT=	Expire old mails from mailboxes
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/COPYRIGHT
+
+RUN_DEPENDS=	p5-Mail-Mbox-MessageParser>=0:mail/p5-Mail-Mbox-MessageParser
+
+USES=		gmake perl5 shebangfix tar:xz
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
+NO_ARCH=	yes
+SHEBANG_FILES=	mail-expire
+PLIST_FILES=	bin/mail-expire ${MANPREFIX}/man/man1/mail-expire.1.gz
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/mail-expire ${STAGEDIR}${PREFIX}/bin/
+	${INSTALL_MAN} ${WRKSRC}/mail-expire.1 ${STAGEDIR}${MANPREFIX}/man/man1
+
+.include <bsd.port.mk>
diff --git a/mail/mail-expire/distinfo b/mail/mail-expire/distinfo
new file mode 100644
index 000000000000..9919cfc21b9d
--- /dev/null
+++ b/mail/mail-expire/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1653337952
+SHA256 (mail-expire_0.9.1.tar.xz) = 5adc6adbea455556cff1bb3128a973781d75200573f24c17a0110b61ceecac41
+SIZE (mail-expire_0.9.1.tar.xz) = 9828
diff --git a/mail/mail-expire/pkg-descr b/mail/mail-expire/pkg-descr
new file mode 100644
index 000000000000..a9666326c532
--- /dev/null
+++ b/mail/mail-expire/pkg-descr
@@ -0,0 +1,13 @@
+mail-expire is a small utility which only purpose is to help on keeping the
+size of multiple mail folders as small as needed (by removing outdated
+messages).
+
+Maildir and Mailbox formats are supported for input, both types are mentioned
+interchangeably in this manual page. Output goes to Mailbox files.
+
+The old messages are compressed with gzip or xz and stored in the file with
+the name following the pattern MBOXNAME.MONTH_YEAR.gz (or similar).  The
+reference time for the output filename is calculated from the current time
+minus number of days specified in the first parameter.
+
+WWW: https://salsa.debian.org/blade/mail-expire