mirror of
https://git.freebsd.org/ports.git
synced 2025-05-20 02:53:10 -04:00
It has been common practice to have one or more URLs at the end of the ports' pkg-descr files, one per line and prefixed with "WWW:". These URLs should point at a project website or other relevant resources. Access to these URLs required processing of the pkg-descr files, and they have often become stale over time. If more than one such URL was present in a pkg-descr file, only the first one was tarnsfered into the port INDEX, but for many ports only the last line did contain the port specific URL to further information. There have been several proposals to make a project URL available as a macro in the ports' Makefiles, over time. This commit implements such a proposal and moves one of the WWW: entries of each pkg-descr file into the respective port's Makefile. A heuristic attempts to identify the most relevant URL in case there is more than one WWW: entry in some pkg-descr file. URLs that are not moved into the Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr files in order to preserve them. There are 1256 ports that had no WWW: entries in pkg-descr files. These ports will not be touched in this commit. The portlint port has been adjusted to expect a WWW entry in each port Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as deprecated. Approved by: portmgr (tcberner)
107 lines
4.1 KiB
Makefile
107 lines
4.1 KiB
Makefile
PORTNAME= ansible-core
|
|
DISTVERSION= 2.13.2
|
|
CATEGORIES= sysutils python
|
|
MASTER_SITES= CHEESESHOP
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= 0mp@FreeBSD.org
|
|
COMMENT= Radically simple IT automation
|
|
WWW= https://www.ansible.com/
|
|
|
|
LICENSE= GPLv3+
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}Jinja2>3.0.0:devel/py-Jinja2@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}resolvelib>=0.5.3<0.9:devel/py-resolvelib@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}yaml>5.1:devel/py-yaml@${PY_FLAVOR}
|
|
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bcrypt>=0:security/py-bcrypt@${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} \
|
|
${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pycrypto>=0:security/py-pycrypto@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
|
|
git:devel/git
|
|
|
|
USES= ansible:env cpe gmake python:3.8+ shebangfix
|
|
CPE_VENDOR= redhat
|
|
CPE_PRODUCT= ansible
|
|
USE_PYTHON= autoplist concurrent distutils
|
|
|
|
SHEBANG_REGEX= [.]/test/.*[.]py
|
|
|
|
TEST_ARGS= VERSION=${DISTVERSION} \
|
|
PYTHON=${PYTHON_CMD} \
|
|
DATE=
|
|
# Pass MAKE_ENV to TEST_ENV so that binary aliases via an updated PATH.
|
|
TEST_ENV= ${MAKE_ENV} PYTHON_VERSION=${PYTHON_VER}
|
|
TEST_TARGET= tests
|
|
|
|
CONFLICTS= py*-ansible-base py*-ansible2 py-ansible-core211
|
|
|
|
# The "python" binary alias is needed for the tests.
|
|
BINARY_ALIAS= python=${PYTHON_CMD}
|
|
NO_ARCH= yes
|
|
|
|
PLIST_FILES= share/man/man1/ansible-config.1.gz \
|
|
share/man/man1/ansible-console.1.gz \
|
|
share/man/man1/ansible-doc.1.gz \
|
|
share/man/man1/ansible-galaxy.1.gz \
|
|
share/man/man1/ansible-inventory.1.gz \
|
|
share/man/man1/ansible-playbook.1.gz \
|
|
share/man/man1/ansible-pull.1.gz \
|
|
share/man/man1/ansible-vault.1.gz \
|
|
share/man/man1/ansible.1.gz
|
|
PORTEXAMPLES= ansible.cfg hosts
|
|
|
|
OPTIONS_DEFINE= DOCS EXAMPLES
|
|
|
|
post-patch:
|
|
# Preserve the original paths in
|
|
# test/units/cli/galaxy/test_execute_list_collection.py.
|
|
# Replacing /usr/share/ansible breaks tests.
|
|
${FIND} ${WRKSRC} -not -regex '${WRKSRC}/test/units/cli/galaxy/test_execute_list_collection.py' -type f -print0 | \
|
|
${XARGS} -0 ${REINPLACE_CMD} \
|
|
-e 's|/etc/ansible|${ETCDIR}|g' \
|
|
-e 's|/usr/share/ansible|${DATADIR}|g'
|
|
${FIND} ${WRKSRC} -type f -name "*.bak" -delete
|
|
|
|
post-install:
|
|
@${MKDIR} ${STAGEDIR}${MAN1PREFIX}/man/man1
|
|
${INSTALL_MAN} ${WRKSRC}/docs/man/man1/*.1 \
|
|
${STAGEDIR}${MAN1PREFIX}/share/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} {} \;
|
|
# USE_PYTHON=autoplist doesn't add this file to pkg-plist.
|
|
${RM} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ansible_test/_data/injector/ansible-inventory
|
|
|
|
pre-test:
|
|
# This one file does not get its paths replaced correctly in post-patch.
|
|
${REINPLACE_CMD} 's|"/etc"|"${ETCDIR:H}"|g' \
|
|
${WRKSRC}/test/units/playbook/test_helpers.py
|
|
# This test constructs a Python script inline and uses an invalid path to it.
|
|
${REINPLACE_CMD} 's|/usr/bin/python|${PYTHON_CMD}|' \
|
|
${WRKSRC}/test/units/modules/test_async_wrapper.py
|
|
# Skip the SELinux tests, it's not present on FreeBSD.
|
|
${RM} ${WRKSRC}/test/units/module_utils/basic/test_selinux.py
|
|
# Disable some failing tests. They fail to detect that emoji are of width 2 istead of 1.
|
|
${RM} ${WRKSRC}/test/units/utils/test_display.py
|
|
|
|
.include <bsd.port.mk>
|
|
|
|
# Make sure that we override the unique DATADIR and ETCDIR set
|
|
# by the implicit USES=uniquefiles.
|
|
DATADIR= ${ANSIBLE_DATADIR}
|
|
ETCDIR= ${ANSIBLE_ETCDIR}
|