--- sysutils/py-salt/Makefile (revision 434510) +++ sysutils/py-salt/Makefile (working copy) @@ -25,11 +25,15 @@ ${PYTHON_PKGNAMEPREFIX}futures>=2.0:devel/py-futures \ ${PYTHON_PKGNAMEPREFIX}tornado>=4.2.1:www/py-tornado -OPTIONS_DEFINE= ZEROMQ RAET -OPTIONS_DEFAULT= ZEROMQ - +OPTIONS_DEFINE= ZEROMQ RAET MINION SYNDIC MASTER PROXY +OPTIONS_DEFAULT= ZEROMQ +OPTIONS_SUB= yes ZEROMQ_DESC= Enable ZeroMQ transport RAET_DESC= Enable RAET transport +MINION_DESC= Enable Minion +MASTER_DESC= Enable Master +PROXY_DESC= Enable Proxy +SYNDIC_DESC= Enable Syndic ZEROMQ_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq ZEROMQ_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq \ @@ -60,23 +64,38 @@ --salt-pidfile-dir=/var/run \ install -USE_RC_SUBR= salt_api \ - salt_master \ - salt_minion \ - salt_proxy \ - salt_syndic +.include +POST_PATCH_LIST= doc/man/salt.7 doc/man/salt.1 salt/modules/tls.py + +CONFLICTS+= py-salt-[0-9]* + +.if ${PORT_OPTIONS:MMINION} +USE_RC_SUBR = salt_minion +POST_PATCH_LIST+= conf/minion doc/man/salt-minion.1 +.endif + +.if ${PORT_OPTIONS:MMASTER} +USE_RC_SUBR+= salt_master salt_api +POST_PATCH_LIST+= doc/man/salt-cp.1 doc/man/salt-master.1 doc/man/salt-run.1 salt/modules/mysql.py salt/utils/parsers.py salt/modules/postgres.py salt/utils/migrations.py doc/man/salt-api.1 +.endif + +.if ${PORT_OPTIONS:MPROXY} +USE_RC_SUBR+= salt_proxy salt_api +POST_PATCH_LIST+= conf/proxy doc/man/salt-proxy.1 doc/man/salt-api.1 +.endif + +.if ${PORT_OPTIONS:MSYNDIC} +USE_RC_SUBR+= salt_syndic salt_api +POST_PATCH_LIST+= doc/man/salt-syndic.1 doc/man/salt-api.1 +.endif + SUB_LIST+= PYTHON_CMD=${PYTHON_CMD} SUB_FILES= pkg-message 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 +.for file in ${POST_PATCH_LIST} @${REINPLACE_CMD} -e 's|/etc/salt|${ETCDIR}|' \ -e 's|/srv/salt|${ETCDIR}/states|' \ -e 's|/srv/pillar|${ETCDIR}/pillar|' ${WRKSRC}/${file} @@ -85,7 +104,17 @@ post-install: @${MKDIR} ${STAGEDIR}${ETCDIR} + +.if ${PORT_OPTIONS:MMASTER} ${INSTALL_DATA} ${WRKSRC}/conf/master ${STAGEDIR}${ETCDIR}/master.sample +.endif + +.if ${PORT_OPTIONS:MMINION} ${INSTALL_DATA} ${WRKSRC}/conf/minion ${STAGEDIR}${ETCDIR}/minion.sample +.endif +.if ${PORT_OPTIONS:MPROXY} + ${INSTALL_DATA} ${WRKSRC}/conf/proxy ${STAGEDIR}${ETCDIR}/proxy.sample +.endif + .include --- sysutils/py-salt/pkg-plist (revision 434510) +++ sysutils/py-salt/pkg-plist (working copy) @@ -1,5 +1,6 @@ -%%ETCDIR%%/master.sample -%%ETCDIR%%/minion.sample +%%MASTER%%%%ETCDIR%%/master.sample +%%MINION%%%%ETCDIR%%/minion.sample +%%PROXY%%%%ETCDIR%%/proxy.sample %%PYTHON_SITELIBDIR%%/salt/_syspaths.py %%PYTHON_SITELIBDIR%%/salt/_syspaths.pyc %%PYTHON_SITELIBDIR%%/salt/_syspaths.pyo --- sysutils/py-salt-master/Makefile (nonexistent) +++ sysutils/py-salt-master/Makefile (working copy) @@ -0,0 +1,10 @@ +# Created by: Marco Re +# $FreeBSD$ + +MASTERDIR= ${.CURDIR}/../../sysutils/py-salt + +OPTIONS_SLAVE= MASTER + +PKGNAMESUFFIX= -master + +.include "${MASTERDIR}/Makefile" --- sysutils/py-salt-minion/Makefile (nonexistent) +++ sysutils/py-salt-minion/Makefile (working copy) @@ -0,0 +1,10 @@ +# Created by: Marco Re +# $FreeBSD$ + +MASTERDIR= ${.CURDIR}/../../sysutils/py-salt + +OPTIONS_SLAVE= MINION + +PKGNAMESUFFIX= -minion + +.include "${MASTERDIR}/Makefile" --- sysutils/py-salt-proxy/Makefile (nonexistent) +++ sysutils/py-salt-proxy/Makefile (working copy) @@ -0,0 +1,10 @@ +# Created by: Marco Re +# $FreeBSD$ + +MASTERDIR= ${.CURDIR}/../../sysutils/py-salt + +OPTIONS_SLAVE= PROXY + +PKGNAMESUFFIX= -proxy + +.include "${MASTERDIR}/Makefile" --- sysutils/py-salt-syndic/Makefile (nonexistent) +++ sysutils/py-salt-syndic/Makefile (working copy) @@ -0,0 +1,10 @@ +# Created by: Marco Re +# $FreeBSD$ + +MASTERDIR= ${.CURDIR}/../../sysutils/py-salt + +OPTIONS_SLAVE= SYNDIC + +PKGNAMESUFFIX= -syndic + +.include "${MASTERDIR}/Makefile"