diff options
author | Steve Wills <swills@FreeBSD.org> | 2014-09-29 21:12:11 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2014-09-29 21:12:11 +0000 |
commit | 2bdfe66b9877fb98ccc07fb5757363c84b52a74a (patch) | |
tree | 4ac52e9467b208b72caa42beecdff2bf96f07453 /sysutils/rubygem-smart_proxy_salt | |
parent | 37b5ed38b0addb693931d1fa902f83f0f080c5b4 (diff) | |
download | ports-2bdfe66b9877fb98ccc07fb5757363c84b52a74a.tar.gz ports-2bdfe66b9877fb98ccc07fb5757363c84b52a74a.zip |
sysutils/rubygem-smart_proxy_salt: fix various bugs to make port functional
PR: 194014
Submitted by: Michael Moll <kvedulv@kvedulv.de>
Notes
Notes:
svn path=/head/; revision=369556
Diffstat (limited to 'sysutils/rubygem-smart_proxy_salt')
4 files changed, 34 insertions, 1 deletions
diff --git a/sysutils/rubygem-smart_proxy_salt/Makefile b/sysutils/rubygem-smart_proxy_salt/Makefile index d67795e79391..6f3538a08941 100644 --- a/sysutils/rubygem-smart_proxy_salt/Makefile +++ b/sysutils/rubygem-smart_proxy_salt/Makefile @@ -3,6 +3,7 @@ PORTNAME= smart_proxy_salt PORTVERSION= 0.0.2 +PORTREVISION= 1 CATEGORIES= sysutils ruby MASTER_SITES= RG @@ -12,14 +13,22 @@ COMMENT= SaltStack Plug-In for Foreman's Smart Proxy LICENSE= GPLv3 RUN_DEPENDS= foreman-proxy>=1.6.0:${PORTSDIR}/net/foreman-proxy \ - ${PYTHON_PKGNAMEPREFIX}salt:${PORTSDIR}/sysutils/py-salt + ${PYTHON_PKGNAMEPREFIX}salt>0:${PORTSDIR}/sysutils/py-salt +USE_PYTHON= yes USE_RUBY= yes USE_RUBYGEMS= yes RUBYGEM_AUTOPLIST= yes .include <bsd.port.pre.mk> +post-patch: + @${REINPLACE_CMD} \ + -e "s|/usr/bin/env ruby|${RUBY}|g" \ + -e "s|/usr/bin/env python|${PYTHON_CMD}|g" \ + -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \ + ${WRKSRC}/bin/foreman-node + post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/etc/foreman-proxy ${MKDIR} ${STAGEDIR}${PREFIX}/etc/foreman-proxy/settings.d @@ -27,5 +36,7 @@ post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/foreman-proxy ${MKDIR} ${STAGEDIR}${PREFIX}/share/foreman-proxy/bundler.d ${INSTALL_DATA} ${FILESDIR}/salt.rb ${STAGEDIR}${PREFIX}/share/foreman-proxy/bundler.d/salt.rb + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/salt + ${INSTALL_DATA} ${FILESDIR}/foreman.yaml.sample ${STAGEDIR}${PREFIX}/etc/salt/foreman.yaml.sample .include <bsd.port.post.mk> diff --git a/sysutils/rubygem-smart_proxy_salt/files/foreman.yaml.sample b/sysutils/rubygem-smart_proxy_salt/files/foreman.yaml.sample new file mode 100644 index 000000000000..67c3fe0529f8 --- /dev/null +++ b/sysutils/rubygem-smart_proxy_salt/files/foreman.yaml.sample @@ -0,0 +1,10 @@ +--- +:proto: http +:host: foreman.example.com +:port: 3000 +:ssl_ca: "" +:ssl_cert: "" +:ssl_key: "" +:timeout: 10 +:salt: /usr/local/bin/salt +:upload_grains: true diff --git a/sysutils/rubygem-smart_proxy_salt/files/patch-bin-foreman-node b/sysutils/rubygem-smart_proxy_salt/files/patch-bin-foreman-node new file mode 100644 index 000000000000..9fc3fa72e9a6 --- /dev/null +++ b/sysutils/rubygem-smart_proxy_salt/files/patch-bin-foreman-node @@ -0,0 +1,11 @@ +--- bin/foreman-node.orig 2014-09-27 23:35:54.000000000 +0200 ++++ bin/foreman-node 2014-09-27 23:39:19.000000000 +0200 +@@ -5,7 +5,7 @@ + + require 'yaml' + +-$settings_file = "/etc/salt/foreman.yaml" ++$settings_file = "%%LOCALBASE%%/etc/salt/foreman.yaml" + SETTINGS = YAML.load_file($settings_file) + + require 'net/http' diff --git a/sysutils/rubygem-smart_proxy_salt/pkg-plist b/sysutils/rubygem-smart_proxy_salt/pkg-plist index 3625dc936838..b5a82e6d3b0b 100644 --- a/sysutils/rubygem-smart_proxy_salt/pkg-plist +++ b/sysutils/rubygem-smart_proxy_salt/pkg-plist @@ -1,3 +1,4 @@ bin/foreman-node share/foreman-proxy/bundler.d/salt.rb @sample etc/foreman-proxy/settings.d/salt.yml.sample +@sample etc/salt/foreman.yaml.sample |