--- sysutils/py-salt/Makefile (revision 434510) +++ sysutils/py-salt/Makefile (working copy) @@ -25,12 +25,22 @@ ${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 API MINION MASTER PROXY SYNDIC +OPTIONS_DEFAULT= ZEROMQ +options_SUB= yes +API_DESC= Enable API server ZEROMQ_DESC= Enable ZeroMQ transport RAET_DESC= Enable RAET transport +MINION_DESC= Enable Minion server +MASTER_DESC= Enable Master server +PROXY_DESC= Enable Proxy server +SYNDIC_DESC= Enable Syndic server +SYNDIC_IMPLIES= MASTER API +PROXY_IMPLIES= MINION +MASTER_IMPLIES= API + ZEROMQ_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq ZEROMQ_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq \ ${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6.1:security/py-pycrypto @@ -60,32 +70,73 @@ --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:MPROXY} +USE_RC_SUBR+= salt_proxy +POST_PATCH_LIST+= conf/proxy doc/man/salt-proxy.1 +PLIST+= ${PKGDIR}/pkg-plist.proxy +.endif + +.if ${PORT_OPTIONS:MSYNDIC} +PORT_OPTIONS:MMASTER true +USE_RC_SUBR+= salt_syndic +POST_PATCH_LIST+= doc/man/salt-syndic.1 +.endif + +.if ${PORT_OPTIONS:MMINION} +USE_RC_SUBR = salt_minion +POST_PATCH_LIST+= conf/minion doc/man/salt-minion.1 +PLIST+= ${PKGDIR}/pkg-plist.minion +.endif + +.if ${PORT_OPTIONS:MMASTER} +USE_RC_SUBR+= salt_master +POST_PATCH_LIST+= conf/master 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 +PLIST+= ${PKGDIR}/pkg-plist.master +.endif + +.if ${PORT_OPTIONS:MAPI} +USE_RC_SUBR+= salt_api +POST_PATCH_LIST+= 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} .endfor + +.if ${PORT_OPTIONS:MMINION} @${REINPLACE_CMD} -e 's|yumpkg5|pkgng|' ${WRKSRC}/conf/minion +.endif +.if ${PORT_OPTIONS:MPROXY} + @${REINPLACE_CMD} -e 's|yumpkg5|pkgng|' ${WRKSRC}/conf/proxy +.endif + post-install: @${MKDIR} ${STAGEDIR}${ETCDIR} - ${INSTALL_DATA} ${WRKSRC}/conf/master ${STAGEDIR}${ETCDIR}/master.sample - ${INSTALL_DATA} ${WRKSRC}/conf/minion ${STAGEDIR}${ETCDIR}/minion.sample +.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,3 @@ -%%ETCDIR%%/master.sample -%%ETCDIR%%/minion.sample %%PYTHON_SITELIBDIR%%/salt/_syspaths.py %%PYTHON_SITELIBDIR%%/salt/_syspaths.pyc %%PYTHON_SITELIBDIR%%/salt/_syspaths.pyo --- sysutils/py-salt/pkg-plist.master (nonexistent) +++ sysutils/py-salt/pkg-plist.master (working copy) @@ -0,0 +1, @@ +%%ETCDIR%%/master.sample --- sysutils/py-salt/pkg-plist.minion (nonexistent) +++ sysutils/py-salt/pkg-plist.minion (working copy) @@ -0,0 +1, @@ +%%ETCDIR%%/minion.sample --- sysutils/py-salt/pkg-plist.proxy (nonexistent) +++ sysutils/py-salt/pkg-plist.proxy (working copy) @@ -0,0 +1, @@ +%%ETCDIR%%/proxy.sample --- 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"