mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
84 lines
2.8 KiB
Makefile
84 lines
2.8 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= ansible
|
|
PORTVERSION?= 2.6.4
|
|
PORTREVISION?= 0
|
|
CATEGORIES= sysutils python
|
|
MASTER_SITES= http://releases.ansible.com/ansible/
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= lifanov@FreeBSD.org
|
|
COMMENT= Radically simple IT automation
|
|
|
|
LICENSE= GPLv3+
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
RUN_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}jmespath>0:devel/py-jmespath@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}netaddr>0:net/py-netaddr@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}paramiko>0:security/py-paramiko@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pycrypto>0:security/py-pycrypto@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR}
|
|
TEST_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}boto3>0:www/py-boto3@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR}
|
|
|
|
CONFLICTS?= ansible1-* ansible23-* ansible24-* ansible25-*
|
|
|
|
EXTRA_PATCHES?= ${FILESDIR}/extra-patch-sesu
|
|
|
|
NO_ARCH= yes
|
|
USES?= cpe python
|
|
USE_PYTHON= distutils autoplist concurrent
|
|
CPE_VENDOR= ansibleworks
|
|
|
|
SUB_FILES= pkg-message
|
|
SUB_LIST+= PYTHON_CMD=${PYTHON_CMD}
|
|
|
|
PLIST_FILES?= man/man1/ansible-config.1.gz \
|
|
man/man1/ansible-console.1.gz \
|
|
man/man1/ansible-doc.1.gz \
|
|
man/man1/ansible-galaxy.1.gz \
|
|
man/man1/ansible-inventory.1.gz \
|
|
man/man1/ansible-playbook.1.gz \
|
|
man/man1/ansible-pull.1.gz \
|
|
man/man1/ansible-vault.1.gz \
|
|
man/man1/ansible.1.gz
|
|
|
|
PORTEXAMPLES= ansible.cfg hosts
|
|
|
|
OPTIONS_DEFINE= DOCS EXAMPLES
|
|
|
|
post-patch:
|
|
${FIND} ${WRKSRC} -type f -print0 | ${XARGS} -0 ${REINPLACE_CMD} \
|
|
-e 's|/etc/ansible|${ETCDIR}|g' \
|
|
-e 's|/usr/share/ansible|${DATADIR}|g'
|
|
|
|
post-install:
|
|
@${MKDIR} ${STAGEDIR}${MAN1PREFIX}/man/man1
|
|
${INSTALL_MAN} ${WRKSRC}/docs/man/man1/*.1 \
|
|
${STAGEDIR}${MAN1PREFIX}/man/man1
|
|
|
|
post-install-EXAMPLES-on:
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/examples/ansible.cfg ${STAGEDIR}${EXAMPLESDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/examples/hosts ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
post-stage:
|
|
${FIND} ${STAGEDIR}${PREFIX}/bin -type l -name ansible-\* -lname ansible \
|
|
-execdir ${RLN} ansible-${PYTHON_VER} {} \;
|
|
|
|
TEST_WRKSRC=${WRKSRC}/test
|
|
|
|
do-test:
|
|
# ${PYTHON_CMD} ${TEST_WRKSRC}/runner/ansible-test sanity --python ${PYTHON_VER} -v
|
|
${RM} ${TEST_WRKSRC}/units/modules/net_tools/test_nmcli.py # not conditional/doesn't work with nose
|
|
${PYTHON_CMD} ${TEST_WRKSRC}/runner/ansible-test units --python ${PYTHON_VER} -v
|
|
|
|
.include <bsd.port.mk>
|