551be3c723
Ports using USE_PYTHON=distutils are now flavored. They will automatically get flavors (py27, py34, py35, py36) depending on what versions they support. There is also a USE_PYTHON=flavors for ports that do not use distutils but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if using distutils but flavors are not wanted. A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been added to cope with Python ports that did not have the Python PKGNAMEPREFIX but are flavored. USES=python now also exports a PY_FLAVOR variable that contains the current python flavor. It can be used in dependency lines when the port itself is not python flavored. For example, deskutils/calibre. By default, all the flavors are generated. To only generate flavors for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf. In all the ports with Python dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python module with Python flavors, as the content will be the same). For example: RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} PR: 223071 Reviewed by: portmgr, python Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D12464
111 lines
3.8 KiB
Makefile
111 lines
3.8 KiB
Makefile
# Created by: Christer Edwards <christer.edwards@gmail.com>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= salt
|
|
PORTVERSION= 2017.7.2
|
|
CATEGORIES= sysutils python
|
|
MASTER_SITES= CHEESESHOP
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= christer.edwards@gmail.com
|
|
COMMENT= Distributed remote execution and configuration management system
|
|
|
|
LICENSE= APACHE20
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
py34_BROKEN= fails to package
|
|
py35_BROKEN= fails to package
|
|
py36_BROKEN= fails to package
|
|
|
|
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}MarkupSafe>0:textproc/py-MarkupSafe@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}boto3>0:www/py-boto3@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}boto>=2.32.1:devel/py-boto@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}botocore>0:devel/py-botocore@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}libcloud>=0.14.0:net/py-libcloud@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.3:devel/py-msgpack-python@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}progressbar>0:misc/py-progressbar@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}requests>=1.0.0:www/py-requests@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}tornado>=4.2.1:www/py-tornado@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${FLAVOR}
|
|
|
|
USES= cpe python
|
|
|
|
CPE_VENDOR= saltstack
|
|
CPE_PRODUCT= salt
|
|
USE_PYTHON= autoplist distutils
|
|
NO_ARCH= yes
|
|
|
|
# we must pass these options before the target name, and python.mk has no
|
|
# early-arguments variable, so we have to manipulate the target
|
|
PYDISTUTILS_INSTALL_TARGET=\
|
|
--salt-root-dir=/ \
|
|
--salt-config-dir=${ETCDIR} \
|
|
--salt-cache-dir=/var/cache/salt \
|
|
--salt-sock-dir=/var/run/salt \
|
|
--salt-srv-root-dir=${ETCDIR} \
|
|
--salt-base-file-roots-dir=${ETCDIR}/states \
|
|
--salt-base-pillar-roots-dir=${ETCDIR}/pillar \
|
|
--salt-base-master-roots-dir=${ETCDIR}/salt-master \
|
|
--salt-logs-dir=/var/log/salt \
|
|
--salt-pidfile-dir=/var/run \
|
|
install
|
|
|
|
USE_RC_SUBR= salt_api \
|
|
salt_master \
|
|
salt_minion \
|
|
salt_proxy \
|
|
salt_syndic
|
|
|
|
SUB_LIST+= PYTHON_CMD=${PYTHON_CMD}
|
|
|
|
SUB_FILES= pkg-message
|
|
|
|
OPTIONS_DEFINE= RAET TCP ZEROMQ
|
|
OPTIONS_DEFAULT=ZEROMQ
|
|
|
|
RAET_DESC= Install dependencies required for RAET transport
|
|
TCP_DESC= Install dependencies required for TCP transport
|
|
ZEROMQ_DESC= Install dependencies required for ZeroMQ transport
|
|
|
|
RAET_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libnacl>=1.0.0:security/py-libnacl@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}ioflo>=1.1.7:devel/py-ioflo@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}raet>=0.6.0:net/py-raet@${FLAVOR}
|
|
|
|
TCP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6.1:security/py-pycrypto@${FLAVOR}
|
|
|
|
ZEROMQ_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq@${FLAVOR}
|
|
ZEROMQ_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6.1:security/py-pycrypto@${FLAVOR}
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
# Python 2.7-3.3 require enum34, unnecessary for Python 3.4+
|
|
.if ${PYTHON_REL} < 3400
|
|
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}enum34>0:devel/py-enum34@${FLAVOR}
|
|
.endif
|
|
|
|
# Python 3+ comes with futures built-in
|
|
.if ${PYTHON_REL} < 3200
|
|
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}futures>=2.0:devel/py-futures@${FLAVOR}
|
|
.endif
|
|
|
|
post-patch:
|
|
.for file in conf/minion conf/master doc/man/salt-key.1 \
|
|
doc/man/salt-cp.1 doc/man/salt-minion.1 doc/man/salt-syndic.1 \
|
|
doc/man/salt-master.1 doc/man/salt-run.1 doc/man/salt.7 doc/man/salt.1 \
|
|
doc/man/salt-call.1 \
|
|
salt/modules/mysql.py salt/utils/parsers.py salt/modules/tls.py \
|
|
salt/modules/postgres.py salt/utils/migrations.py
|
|
@${REINPLACE_CMD} -e 's|/etc/salt|${ETCDIR}|' \
|
|
-e 's|/srv/salt|${ETCDIR}/states|' \
|
|
-e 's|/srv/pillar|${ETCDIR}/pillar|' ${WRKSRC}/${file}
|
|
.endfor
|
|
@${REINPLACE_CMD} -e 's|yumpkg5|pkgng|' ${WRKSRC}/conf/minion
|
|
|
|
post-install:
|
|
@${MKDIR} ${STAGEDIR}${ETCDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/conf/master ${STAGEDIR}${ETCDIR}/master.sample
|
|
${INSTALL_DATA} ${WRKSRC}/conf/minion ${STAGEDIR}${ETCDIR}/minion.sample
|
|
|
|
.include <bsd.port.post.mk>
|