sthen 3cbe1c2f30 Reverse the polarity of MODPY_VERSION; default is now 3.x,
if a port needs 2.x then set MODPY_VERSION=${MODPY_DEFAULT_VERSION_2}.

This commit doesn't change any versions currently used; it may be that
some ports have MODPY_DEFAULT_VERSION_2 but don't require it, those
should be cleaned up in the course of updating ports where possible.

Python module ports providing py3-* packages should still use
FLAVOR=python3 so that we don't have a mixture of dependencies some
using ${MODPY_FLAVOR} and others not.
2021-02-23 19:39:08 +00:00

38 lines
966 B
Makefile

# $OpenBSD: Makefile,v 1.26 2021/02/23 19:39:29 sthen Exp $
COMMENT = Python interface to sendmail milter API
MODPY_EGG_VERSION = 1.0
DISTNAME = pymilter-${MODPY_EGG_VERSION}
PKGNAME = ${DISTNAME:S/py/py-/}
CATEGORIES = mail
HOMEPAGE = http://www.bmsi.com/python/milter.html
# GPLv2
PERMIT_PACKAGE = Yes
WANTLIB = milter ${MODPY_WANTLIB} pthread
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=pymilter/}
MODULES = lang/python
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
CFLAGS += -I${LOCALBASE}/include
LIB_DEPENDS = mail/sendmail,-libmilter
TEST_DEPENDS = net/py-dns
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/py-milter
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/py-milter
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-milter
${INSTALL_DATA} ${WRKSRC}/sample.py ${PREFIX}/share/examples/py-milter
do-test: fake
@cd ${WRKSRC} && ${MAKE_ENV} \
PYTHONPATH=${WRKINST}${MODPY_SITEPKG} ${MODPY_BIN} ./test.py
.include <bsd.port.mk>