Tweak sysutils/dateutils version 0.4.1
[dports.git] / sysutils / py-salt / Makefile
1 # Created by: Christer Edwards <christer.edwards@gmail.com>
2 # $FreeBSD$
3
4 PORTNAME=       salt
5 PORTVERSION=    2016.11.5
6 CATEGORIES=     sysutils python
7 MASTER_SITES=   CHEESESHOP
8 PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
9
10 MAINTAINER=     christer.edwards@gmail.com
11 COMMENT=        Distributed remote execution and configuration management system
12
13 LICENSE=        APACHE20
14 LICENSE_FILE=   ${WRKSRC}/LICENSE
15
16 RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml \
17                 ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2 \
18                 ${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.3:devel/py-msgpack-python \
19                 ${PYTHON_PKGNAMEPREFIX}libcloud>=0.14.0:net/py-libcloud \
20                 ${PYTHON_PKGNAMEPREFIX}botocore>0:devel/py-botocore \
21                 ${PYTHON_PKGNAMEPREFIX}MarkupSafe>0:textproc/py-MarkupSafe \
22                 ${PYTHON_PKGNAMEPREFIX}requests>=1.0.0:www/py-requests \
23                 ${PYTHON_PKGNAMEPREFIX}enum34>0:devel/py-enum34 \
24                 ${PYTHON_PKGNAMEPREFIX}progressbar>0:misc/py-progressbar \
25                 ${PYTHON_PKGNAMEPREFIX}futures>=2.0:devel/py-futures \
26                 ${PYTHON_PKGNAMEPREFIX}tornado>=4.2.1:www/py-tornado
27
28 OPTIONS_DEFINE= ZEROMQ RAET
29 OPTIONS_DEFAULT=        ZEROMQ
30
31 ZEROMQ_DESC=    Enable ZeroMQ transport
32 RAET_DESC=      Enable RAET transport
33
34 ZEROMQ_BUILD_DEPENDS=   ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq
35 ZEROMQ_RUN_DEPENDS=     ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq \
36                 ${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6.1:security/py-pycrypto
37
38 RAET_RUN_DEPENDS=       ${PYTHON_PKGNAMEPREFIX}libnacl>=1.0.0:security/py-libnacl \
39                 ${PYTHON_PKGNAMEPREFIX}ioflo>=1.1.7:devel/py-ioflo \
40                 ${PYTHON_PKGNAMEPREFIX}raet>=0.6.0:net/py-raet
41
42 USES=           cpe python:2
43 CPE_VENDOR=     saltstack
44 CPE_PRODUCT=    salt
45 USE_PYTHON=     autoplist distutils
46 NO_ARCH=        yes
47
48 # we must pass these options before the target name, and python.mk has no
49 # early-arguments variable, so we have to manipulate the target
50 PYDISTUTILS_INSTALL_TARGET=\
51         --salt-root-dir=/ \
52         --salt-config-dir=${ETCDIR} \
53         --salt-cache-dir=/var/cache/salt \
54         --salt-sock-dir=/var/run/salt \
55         --salt-srv-root-dir=${ETCDIR} \
56         --salt-base-file-roots-dir=${ETCDIR}/states \
57         --salt-base-pillar-roots-dir=${ETCDIR}/pillar \
58         --salt-base-master-roots-dir=${ETCDIR}/salt-master \
59         --salt-logs-dir=/var/log/salt \
60         --salt-pidfile-dir=/var/run \
61         install
62
63 USE_RC_SUBR=    salt_api \
64                 salt_master \
65                 salt_minion \
66                 salt_proxy \
67                 salt_syndic
68
69 SUB_LIST+=      PYTHON_CMD=${PYTHON_CMD}
70
71 SUB_FILES=      pkg-message
72
73 post-patch:
74 .for file in conf/minion conf/master doc/man/salt-key.1 \
75         doc/man/salt-cp.1 doc/man/salt-minion.1 doc/man/salt-syndic.1 \
76         doc/man/salt-master.1 doc/man/salt-run.1 doc/man/salt.7 doc/man/salt.1 \
77         doc/man/salt-call.1 \
78         salt/modules/mysql.py salt/utils/parsers.py salt/modules/tls.py \
79         salt/modules/postgres.py salt/utils/migrations.py
80         @${REINPLACE_CMD} -e 's|/etc/salt|${ETCDIR}|' \
81                 -e 's|/srv/salt|${ETCDIR}/states|' \
82                 -e 's|/srv/pillar|${ETCDIR}/pillar|' ${WRKSRC}/${file}
83 .endfor
84         @${REINPLACE_CMD} -e 's|yumpkg5|pkgng|' ${WRKSRC}/conf/minion
85
86 post-install:
87         @${MKDIR} ${STAGEDIR}${ETCDIR}
88         ${INSTALL_DATA} ${WRKSRC}/conf/master ${STAGEDIR}${ETCDIR}/master.sample
89         ${INSTALL_DATA} ${WRKSRC}/conf/minion ${STAGEDIR}${ETCDIR}/minion.sample
90
91 .include <bsd.port.mk>