|
Line 0
Link Here
|
|
|
1 |
# $FreeBSD$ |
| 2 |
|
| 3 |
PORTNAME= ansible |
| 4 |
PORTVERSION?= 2.9.14 |
| 5 |
PORTREVISION?= 0 |
| 6 |
CATEGORIES= sysutils python |
| 7 |
MASTER_SITES= http://releases.ansible.com/ansible/ |
| 8 |
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} |
| 9 |
PKGNAMESUFFIX?= 29 |
| 10 |
|
| 11 |
MAINTAINER= lifanov@FreeBSD.org |
| 12 |
COMMENT= Radically simple IT automation |
| 13 |
|
| 14 |
LICENSE= GPLv3+ |
| 15 |
LICENSE_FILE= ${WRKSRC}/COPYING |
| 16 |
|
| 17 |
RUN_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ |
| 18 |
${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR} \ |
| 19 |
${PYTHON_PKGNAMEPREFIX}jmespath>0:devel/py-jmespath@${PY_FLAVOR} \ |
| 20 |
${PYTHON_PKGNAMEPREFIX}netaddr>0:net/py-netaddr@${PY_FLAVOR} \ |
| 21 |
${PYTHON_PKGNAMEPREFIX}paramiko>0:security/py-paramiko@${PY_FLAVOR} \ |
| 22 |
${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} |
| 23 |
TEST_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ |
| 24 |
${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR} \ |
| 25 |
${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \ |
| 26 |
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ |
| 27 |
${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \ |
| 28 |
${PYTHON_PKGNAMEPREFIX}boto3>0:www/py-boto3@${PY_FLAVOR} \ |
| 29 |
${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \ |
| 30 |
${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} |
| 31 |
|
| 32 |
USES?= cpe python shebangfix |
| 33 |
USE_PYTHON= distutils autoplist concurrent |
| 34 |
|
| 35 |
OPTIONS_DEFINE= DOCS EXAMPLES |
| 36 |
|
| 37 |
NO_ARCH= yes |
| 38 |
CPE_VENDOR= ansibleworks |
| 39 |
|
| 40 |
CONFLICTS?= *ansible-2* \ |
| 41 |
*ansible1-* \ |
| 42 |
*ansible23-* \ |
| 43 |
*ansible24-* \ |
| 44 |
*ansible25-* \ |
| 45 |
*ansible27-* \ |
| 46 |
*ansible26-* \ |
| 47 |
*ansible27-* \ |
| 48 |
*ansible28-* |
| 49 |
|
| 50 |
EXTRA_PATCHES?= |
| 51 |
|
| 52 |
SHEBANG_FILES?= \ |
| 53 |
test/lib/ansible_test/_data/injector/python.py \ |
| 54 |
test/lib/ansible_test/_data/versions.py \ |
| 55 |
test/lib/ansible_test/_data/virtualenvcheck.py \ |
| 56 |
test/lib/ansible_test/_data/yamlcheck.py \ |
| 57 |
test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py \ |
| 58 |
test/lib/ansible_test/_data/sanity/import/importer.py \ |
| 59 |
test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.py \ |
| 60 |
test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.py \ |
| 61 |
test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.py \ |
| 62 |
test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.py \ |
| 63 |
test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py \ |
| 64 |
test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.py \ |
| 65 |
test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.py \ |
| 66 |
test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.py \ |
| 67 |
test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.py \ |
| 68 |
test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.py \ |
| 69 |
test/lib/ansible_test/_data/sanity/code-smell/no-main-display.py \ |
| 70 |
test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.py \ |
| 71 |
test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.py \ |
| 72 |
test/lib/ansible_test/_data/sanity/code-smell/no-assert.py \ |
| 73 |
test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.py \ |
| 74 |
test/lib/ansible_test/_data/sanity/code-smell/line-endings.py \ |
| 75 |
test/lib/ansible_test/_data/sanity/code-smell/symlinks.py \ |
| 76 |
test/lib/ansible_test/_data/sanity/code-smell/shebang.py \ |
| 77 |
test/lib/ansible_test/_data/sanity/code-smell/empty-init.py \ |
| 78 |
test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py \ |
| 79 |
test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py \ |
| 80 |
test/lib/ansible_test/_data/sanity/compile/compile.py \ |
| 81 |
test/lib/ansible_test/_data/sanity/validate-modules/main.py |
| 82 |
|
| 83 |
SUB_FILES= pkg-message |
| 84 |
SUB_LIST+= PYTHON_CMD=${PYTHON_CMD} |
| 85 |
|
| 86 |
PLIST_FILES?= man/man1/ansible-config.1.gz \ |
| 87 |
man/man1/ansible-console.1.gz \ |
| 88 |
man/man1/ansible-doc.1.gz \ |
| 89 |
man/man1/ansible-galaxy.1.gz \ |
| 90 |
man/man1/ansible-inventory.1.gz \ |
| 91 |
man/man1/ansible-playbook.1.gz \ |
| 92 |
man/man1/ansible-pull.1.gz \ |
| 93 |
man/man1/ansible-vault.1.gz \ |
| 94 |
man/man1/ansible.1.gz |
| 95 |
|
| 96 |
PORTEXAMPLES= ansible.cfg hosts |
| 97 |
|
| 98 |
post-patch: |
| 99 |
${FIND} ${WRKSRC} -type f -print0 | ${XARGS} -0 ${REINPLACE_CMD} \ |
| 100 |
-e 's|/etc/ansible|${ETCDIR:S/${PY_FLAVOR}-//}|g' \ |
| 101 |
-e 's|/usr/share/ansible|${DATADIR}|g' |
| 102 |
${FIND} ${WRKSRC} -type f -name "*.bak" -delete |
| 103 |
|
| 104 |
post-install: |
| 105 |
@${MKDIR} ${STAGEDIR}${MAN1PREFIX}/man/man1 |
| 106 |
${INSTALL_MAN} ${WRKSRC}/docs/man/man1/*.1 \ |
| 107 |
${STAGEDIR}${MAN1PREFIX}/man/man1 |
| 108 |
|
| 109 |
post-install-EXAMPLES-on: |
| 110 |
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR} |
| 111 |
${INSTALL_DATA} ${WRKSRC}/examples/ansible.cfg ${STAGEDIR}${EXAMPLESDIR} |
| 112 |
${INSTALL_DATA} ${WRKSRC}/examples/hosts ${STAGEDIR}${EXAMPLESDIR} |
| 113 |
|
| 114 |
post-stage: |
| 115 |
${FIND} ${STAGEDIR}${PREFIX}/bin -type l -name ansible-\* -lname ansible \ |
| 116 |
-execdir ${RLN} ansible-${PYTHON_VER} {} \; |
| 117 |
# python autoplist doesn't add this file in plist |
| 118 |
${RM} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ansible_test/_data/injector/ansible-inventory |
| 119 |
|
| 120 |
# TEST_WRKSRC=${WRKSRC}/test |
| 121 |
# |
| 122 |
#do-test: |
| 123 |
# ${PYTHON_CMD} ${TEST_WRKSRC}/runner/ansible-test sanity --python ${PYTHON_VER} -v |
| 124 |
# ${RM} ${TEST_WRKSRC}/units/modules/net_tools/test_nmcli.py # not conditional/doesn't work with nose |
| 125 |
# ${PYTHON_CMD} ${TEST_WRKSRC}/runner/ansible-test units --python ${PYTHON_VER} -v |
| 126 |
|
| 127 |
.include <bsd.port.mk> |