summaryrefslogtreecommitdiffstats
path: root/mail/py-pyspf/Makefile
blob: 434b90163bae98f514fa9d3b1a5a09bd9e297237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Created by: Marcus Alves Grando <mnag@FreeBSD.org>
# $FreeBSD$

PORTNAME=	pyspf
PORTVERSION=	2.0.12
DISTVERSIONSUFFIX=	t
PORTREVISION=	4
CATEGORIES=	mail python
MASTER_SITES=	CHEESESHOP
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	sunpoet@FreeBSD.org
COMMENT=	SPF (Sender Policy Framework) implemented in Python

LICENSE=	PSFL

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}authres>=0:mail/py-authres
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml

NO_ARCH=	yes
USE_PYTHON=	autoplist concurrent distutils
USES=		python shebangfix
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}

PLIST_FILES=	bin/spf.py
SHEBANG_FILES=	spf.py

.include <bsd.port.pre.mk>

.if ${PYTHON_REL} >= 3000
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}py3dns>=0:dns/py-py3dns
.else
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}dns>=0:dns/py-dns
.endif

# Make the tests run as a module
post-patch:
	@${TOUCH} ${WRKSRC}/test/__init__.py

post-install:
	${CHMOD} ${BINMODE} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/spf.py
	${LN} -s ${PYTHONPREFIX_SITELIBDIR}/spf.py ${STAGEDIR}${PREFIX}/bin/

do-test:
	cd ${WRKSRC}/ && ${PYTHON_CMD} -m test.testspf

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud