aboutsummaryrefslogtreecommitdiff
path: root/security/denyhosts/Makefile
blob: d0d204d97dd3eee0b63596bf8e33c16ab90f0567 (plain) (blame)
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
# Created by: Janos Mohacsi <janos.mohacsi@bsd.hu>

PORTNAME=	denyhosts
PORTVERSION=	3.1.2
CATEGORIES=	security
PKGNAMESUFFIX=	${PYTHON_PKGNAMESUFFIX}
MASTER_SITES=	https://github.com/denyhosts/denyhosts/releases/download/v${PORTVERSION:R}/
DISTNAME=	DenyHosts-${PORTVERSION}

MAINTAINER=	sunpoet@FreeBSD.org
COMMENT=	Script to thwart ssh and imap attacks

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

BUILD_DEPENDS=	${RUN_DEPENDS}
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}ipaddr>=0:devel/py-ipaddr@${PY_FLAVOR}

USES=		cpe python:3.6+ shebangfix
USE_PYTHON=	autoplist concurrent distutils

NO_ARCH=	yes
USE_RC_SUBR=	denyhosts

PLIST_FILES=	"@sample etc/denyhosts.conf.sample"
SUB_FILES=	pkg-message
SUB_LIST=	PYTHON=${PYTHON_CMD}

SHEBANG_FILES=	daemon-control-dist \
		plugins/test_deny.py \
		scripts/restricted_from_invalid.py \
		scripts/restricted_from_passwd.py

post-patch:
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/daemon-control-dist ${WRKSRC}/denyhosts.conf ${WRKSRC}/setup.py
	@${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' ${WRKSRC}/daemon-control-dist

post-install:
	${INSTALL_DATA} ${WRKSRC}/denyhosts.conf ${STAGEDIR}${PREFIX}/etc/denyhosts.conf.sample

.include <bsd.port.mk>