From 9f1cce221f1021d4a0cb14d00079f27b5ecea58a Mon Sep 17 00:00:00 2001 From: Fukang Chen Date: Wed, 31 May 2017 07:15:20 +0000 Subject: [PATCH] [NEW PORT] mail/py-pymailq: Postfix queue control python tool The pymailq module makes it easy to view and control Postfix mails queue. It provide several classes to store, view and interact with mail queue using Postfix command line tools. This module is provided for automation and monitoring developments. WWW: https://github.com/outini/pymailq Reviewed_by: koobs, mat Approved by: koobs (ports) Differential_Revision: D10976 --- mail/Makefile | 1 + mail/py-pymailq/Makefile | 39 ++++++++++++++++++++++++++++ mail/py-pymailq/distinfo | 3 +++ mail/py-pymailq/files/patch-setup.py | 11 ++++++++ mail/py-pymailq/pkg-descr | 6 +++++ 5 files changed, 60 insertions(+) create mode 100644 mail/py-pymailq/Makefile create mode 100644 mail/py-pymailq/distinfo create mode 100644 mail/py-pymailq/files/patch-setup.py create mode 100644 mail/py-pymailq/pkg-descr diff --git a/mail/Makefile b/mail/Makefile index 22ab4a08d28b..9985bbed6e15 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -543,6 +543,7 @@ SUBDIR += py-milter SUBDIR += py-notmuch SUBDIR += py-ppolicy + SUBDIR += py-pymailq SUBDIR += py-pyspf SUBDIR += py-spambayes SUBDIR += py-twistedMail diff --git a/mail/py-pymailq/Makefile b/mail/py-pymailq/Makefile new file mode 100644 index 000000000000..b207a4169cf7 --- /dev/null +++ b/mail/py-pymailq/Makefile @@ -0,0 +1,39 @@ +# Created by: Fukang Chen +# $FreeBSD$ + +PORTNAME= pymailq +PORTVERSION= 0.5.4 +CATEGORIES= mail python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= loader@FreeBSD.org +COMMENT= Postfix queue control python tool + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= postfix:mail/postfix + +NO_ARCH= yes +USES= python:2.7+ +USE_PYTHON= autoplist distutils concurrent + +.include + +PLIST_FILES+= man/man1/pqshell-${PYTHON_VER}.1.gz +.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} +PLIST_FILES+= man/man1/pqshell.1.gz +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/sbin/postqueue|${LOCALBASE}/sbin/postqueue|' \ + ${WRKSRC}/pymailq/store.py + +post-install: + ${INSTALL_MAN} ${WRKSRC}/man/pqshell.1 ${STAGEDIR}${MANPREFIX}/man/man1/pqshell-${PYTHON_VER}.1 +.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} + ${LN} -sf pqshell-${PYTHON_VER}.1 ${STAGEDIR}${MANPREFIX}/man/man1/pqshell.1 +.endif + +.include diff --git a/mail/py-pymailq/distinfo b/mail/py-pymailq/distinfo new file mode 100644 index 000000000000..d57979e25ca8 --- /dev/null +++ b/mail/py-pymailq/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1495872044 +SHA256 (pymailq-0.5.4.tar.gz) = 25e6afc496c5cbd46221ced5c3db2f0bf86acdbe2f0a8753493143b75768b493 +SIZE (pymailq-0.5.4.tar.gz) = 25038 diff --git a/mail/py-pymailq/files/patch-setup.py b/mail/py-pymailq/files/patch-setup.py new file mode 100644 index 000000000000..85d81687cf23 --- /dev/null +++ b/mail/py-pymailq/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2017-05-29 11:46:42 UTC ++++ setup.py +@@ -39,8 +39,6 @@ if __name__ == '__main__': + scripts=['bin/pqshell'], + packages=['pymailq'], + package_dir={'pymailq': 'pymailq'}, +- data_files=[('share/doc/pymailq', ['README.rst', 'LICENSE']), +- ('share/man/man1/', ['man/pqshell.1'])], + keywords=['postfix', 'shell', 'mailq', 'python', 'pqshell', 'postqueue'], + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', diff --git a/mail/py-pymailq/pkg-descr b/mail/py-pymailq/pkg-descr new file mode 100644 index 000000000000..e38e316e0c7c --- /dev/null +++ b/mail/py-pymailq/pkg-descr @@ -0,0 +1,6 @@ +The pymailq module makes it easy to view and control Postfix mails +queue. It provide several classes to store, view and interact with +mail queue using Postfix command line tools. This module is provided +for automation and monitoring developments. + +WWW: https://github.com/outini/pymailq